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.

133 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. smtpext.h
  5. Abstract:
  6. SMTP server extension header file. These definitions are available
  7. to server extension writers.
  8. Author:
  9. Microsoft Corporation June, 1996
  10. Revision History:
  11. --*/
  12. #ifndef _SMTPEXT_H_
  13. #define _SMTPEXT_H_
  14. // ====================================================================
  15. // Include files
  16. //
  17. // ====================================================================
  18. // Version Information
  19. //
  20. #define SSE_VERSION_MAJOR 1 // Major version
  21. #define SSE_VERSION_MINOR 0 // Minor version
  22. #define SSE_VERSION MAKELONG( SSE_VERSION_MINOR, SSE_VERSION_MAJOR )
  23. // ====================================================================
  24. // Generic defines
  25. //
  26. #define SSE_MAX_EXT_DLL_NAME_LEN 256 // Max length of Ext. DLL name
  27. #define SSE_MAX_STRING_LEN_ANY 512 // Max length of any string
  28. // ====================================================================
  29. // Return codes
  30. //
  31. #define SSE_STATUS_SUCCESS 0
  32. #define SSE_STATUS_RETRY 1
  33. #define SSE_STATUS_ABORT_DELIVERY 2
  34. #define SSE_STATUS_BAD_MAIL 3
  35. // ====================================================================
  36. // Server support fucntions request codes
  37. //
  38. #define SSE_REQ_GET_USER_PROFILE_INFO 1
  39. #define SSE_REQ_SET_USER_PROFILE_INFO 2
  40. // ====================================================================
  41. // Server extension version data structure
  42. //
  43. typedef struct _SSE_VERSION_INFO
  44. {
  45. DWORD dwServerVersion; // Server version
  46. DWORD dwExtensionVersion; // Extension version
  47. CHAR lpszExtensionDesc[SSE_MAX_EXT_DLL_NAME_LEN]; // Description
  48. } SSE_VERSION_INFO;
  49. // ====================================================================
  50. // SMTP Extension Control Block data structure
  51. //
  52. typedef LPVOID LPSSECTXT;
  53. typedef struct _SSE_EXTENSION_CONTROL_BLOCK
  54. {
  55. DWORD cbSize; // Size of this struct
  56. DWORD dwVersion; // Version of this spec
  57. LPSSECTXT lpContext; // Server context (DO NOT MODIFY)
  58. LPSTR lpszSender; // Name of sender of message
  59. LPSTR lpszCurrentRecipient; // Current recipient being processed
  60. DWORD cbTotalBytes; // Total size of message in bytes
  61. DWORD cbAvailable; // Available number of bytes
  62. LPBYTE lpbData; // Pointer to message data
  63. LPVOID lpvReserved; // Reserved, must be NULL
  64. // Server callbacks
  65. BOOL (WINAPI * GetServerVariable) ( LPSSECTXT lpContext,
  66. LPSTR lpszVeriableName,
  67. LPVOID lpvBuffer,
  68. LPDWORD lpdwSize );
  69. BOOL (WINAPI * ServerSupportFunction) ( LPSSECTXT lpContext,
  70. DWORD dwSSERequest,
  71. LPVOID lpvBuffer,
  72. LPDWORD lpdwSize,
  73. LPDWORD lpdwDataType );
  74. } SSE_EXTENSION_CONTROL_BLOCK, *LPSSE_EXTENSION_CONTROL_BLOCK;
  75. // ====================================================================
  76. // Data structures for server support functions
  77. //
  78. typedef struct _SSE_USER_PROFILE_INFO
  79. {
  80. LPTSTR lpszExtensionDllName; // Name of calling DLL
  81. LPTSTR lpszKey; // Key to look for
  82. LPTSTR lpszValue; // Value to set/get
  83. DWORD dwSize; // Buffer size on a get
  84. } SSE_USER_PROFILE_INFO, *LPSSE_USER_PROFILE_INFO;
  85. #endif