Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
4.4 KiB

  1. /********************************************************************/
  2. /** Copyright(c) 1989 Microsoft Corporation. **/
  3. /********************************************************************/
  4. //***
  5. //
  6. // Filename: sechost.h
  7. //
  8. // Description: This header defines the interface between third party security
  9. // DLLs and the supervisor.
  10. //
  11. // History:
  12. // Nov 11,1994. NarenG Created original version.
  13. //
  14. #ifndef _SECHOST_
  15. #define _SECHOST_
  16. #include <lmcons.h> // Defines for DNLEN and UNLEN
  17. #define DEVICE_NAME_LEN 32
  18. // typedef DWORD HPORT;
  19. typedef struct _SECURITY_MESSAGE
  20. {
  21. DWORD dwMsgId;
  22. HPORT hPort;
  23. DWORD dwError; // Should be non-zero only if error
  24. // occurred during the security dialog.
  25. // Should contain errors from winerror.h
  26. // or raserror.h
  27. CHAR UserName[UNLEN+1]; // Should always contain username if
  28. // dwMsgId is SUCCESS/FAILURE
  29. CHAR Domain[DNLEN+1]; // Should always contain domain if
  30. // dwMsgId is SUCCESS/FAILURE
  31. } SECURITY_MESSAGE, *PSECURITY_MESSAGE;
  32. // Values for dwMsgId in SECURITY_MESSAGE structure
  33. #define SECURITYMSG_SUCCESS 1
  34. #define SECURITYMSG_FAILURE 2
  35. #define SECURITYMSG_ERROR 3
  36. // Used by RasSecurityGetInfo call
  37. typedef struct _RAS_SECURITY_INFO
  38. {
  39. DWORD LastError; // SUCCESS = receive completed
  40. // PENDING = receive pending
  41. // else completed with error
  42. DWORD BytesReceived; // only valid if LastError == SUCCESS
  43. CHAR DeviceName[DEVICE_NAME_LEN+1];
  44. }RAS_SECURITY_INFO,*PRAS_SECURITY_INFO;
  45. typedef DWORD (WINAPI *RASSECURITYPROC)();
  46. //
  47. // Called by third party DLL to notify the supervisor of termination of
  48. // the security dialog
  49. //
  50. VOID WINAPI
  51. RasSecurityDialogComplete(
  52. IN SECURITY_MESSAGE * pSecMsg // Pointer to the above info. structure
  53. );
  54. //
  55. // Called by supervisor into the security DLL to notify it to begin the
  56. // security dialog for a client.
  57. //
  58. // Should return errors from winerror.h or raserror.h
  59. //
  60. DWORD WINAPI
  61. RasSecurityDialogBegin(
  62. IN HPORT hPort, // RAS handle to port
  63. IN PBYTE pSendBuf, // Pointer to the buffer used in
  64. // RasSecurityDialogSend
  65. IN DWORD SendBufSize, // Size of above bufer in bytes
  66. IN PBYTE pRecvBuf, // Pointer to the buffer used in
  67. // RasSecurityDialogReceive
  68. IN DWORD RecvBufSize, // Size of above buffer
  69. IN VOID (WINAPI *RasSecurityDialogComplete)( SECURITY_MESSAGE* )
  70. // Pointer to function RasSecurityDialogComplete.
  71. // Guaranteed to be the same on every call.
  72. );
  73. //
  74. // Called by supervisor into the security DLL to notify it to stop the
  75. // security dialog for a client. If this call returns an error, then it is not
  76. // neccesary for the dll to call RasSecurityDialogComplete. Otherwise the DLL
  77. // must call RasSecurityDialogComplete.
  78. //
  79. // Should return errors from winerror.h or raserror.h
  80. //
  81. DWORD WINAPI
  82. RasSecurityDialogEnd(
  83. IN HPORT hPort // RAS handle to port.
  84. );
  85. //
  86. // Called to send data to remote host
  87. // Will return errors from winerror.h or raserror.h
  88. //
  89. DWORD WINAPI
  90. RasSecurityDialogSend(
  91. IN HPORT hPort, // RAS handle to port.
  92. IN PBYTE pBuffer, // Pointer to buffer containing data to send
  93. IN WORD BufferLength // Length of above buffer.
  94. );
  95. //
  96. // Called to receive data from remote host
  97. // Will return errors from winerror.h or raserror.h
  98. //
  99. DWORD WINAPI
  100. RasSecurityDialogReceive(
  101. IN HPORT hPort, // RAS handle to port.
  102. IN PBYTE pBuffer, // Pointer to buffer to receive data
  103. IN PWORD pBufferLength, // length of data received in bytes.
  104. IN DWORD Timeout, // in seconds
  105. IN HANDLE hEvent // Event to set when receive completes or
  106. // timeouts
  107. );
  108. //
  109. // Called to get Information about port.
  110. // Will return errors from winerror.h or raserror.h
  111. //
  112. DWORD WINAPI
  113. RasSecurityDialogGetInfo(
  114. IN HPORT hPort, // RAS handle to port.
  115. IN RAS_SECURITY_INFO* pBuffer // Pointer to get info structure.
  116. );
  117. #endif