home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / gwmain.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  8.5 KB  |  195 lines

  1. // --gwmain.h-------------------------------------------------------------------
  2. //
  3. // Gateway shell header file.
  4. //
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  6. // -----------------------------------------------------------------------------
  7.  
  8. #ifndef _GWMAIN_H
  9. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  10. #define _GWMAIN_H
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif // __cplusplus
  15.  
  16. #include <windows.h>
  17.  
  18. //$--GetGWExchangeServerName------------------------------------------------------
  19. //  Get Exchange server name.
  20. // -----------------------------------------------------------------------------
  21. LPSTR GetGWExchangeServerName(void);
  22.  
  23. //$--GetGWSession-------------------------------------------------------------
  24. //  Get MAPI session pointer.
  25. // -----------------------------------------------------------------------------
  26. LPMAPISESSION GetGWSession(void);
  27.  
  28. //$--GetGWDefaultStore------------------------------------------------------------
  29. //  Get default store pointer.
  30. // -----------------------------------------------------------------------------
  31. LPMDB GetGWDefaultStore(void);
  32.  
  33. //$--GetGWRootFolder-------------------------------------------------------------
  34. //  Get root folder pointer.
  35. // -----------------------------------------------------------------------------
  36. LPMAPIFOLDER GetGWRootFolder(void);
  37.  
  38. //$--GetGWMtsInFolder-------------------------------------------------------------
  39. //  Get MTS-IN folder pointer.
  40. // -----------------------------------------------------------------------------
  41. LPMAPIFOLDER GetGWMtsInFolder(void);
  42.  
  43. //$--GetGWMtsOutFolder------------------------------------------------------------
  44. //  Get MTS-OUT folder pointer.
  45. // -----------------------------------------------------------------------------
  46. LPMAPIFOLDER GetGWMtsOutFolder(void);
  47.  
  48. //$--GetGWGALEntryIdSize--------------------------------------------------------------
  49. //  Get count of bytes in GAL entry ID.
  50. // -----------------------------------------------------------------------------
  51. ULONG GetGWGALEntryIdSize(void);
  52.  
  53. //$--GetGWGALEntryId------------------------------------------------------------------
  54. //  Get GAL entry ID pointer.
  55. // -----------------------------------------------------------------------------
  56. LPENTRYID GetGWGALEntryId(void);
  57.  
  58. //$--GetAdrBookPtr--------------------------------------------------------------
  59. //  Get address book pointer pointer.
  60. // -----------------------------------------------------------------------------
  61. LPADRBOOK GetAdrBookPtr(void);
  62.  
  63. //$--GetGWGAL------------------------------------------------------------------
  64. //  Get GAL pointer.
  65. // -----------------------------------------------------------------------------
  66. LPABCONT GetGWGAL(void);
  67.  
  68. //$--GetGWNewMailEvent------------------------------------------------------------
  69. //  Get new mail event.
  70. // -----------------------------------------------------------------------------
  71. HANDLE GetGWNewMailEvent(void);
  72.  
  73. //$--GetGWNewMailStatus-----------------------------------------------------------
  74. //  Get new mail status.
  75. // -----------------------------------------------------------------------------
  76. BOOL GetGWNewMailStatus(void);
  77.  
  78. //$--HrGWWaitForStop----------------------------------------------------
  79. //  Wait for the gateway to stop.
  80. // -----------------------------------------------------------------------------
  81. HRESULT HrGWWaitForStop(                // RETURNS: return code
  82.     void);                                      // no arguments
  83.  
  84. //$--HrGWStartNewMailHandler@--------------------------------------------------
  85. //  Start a thread to handle processing of new mail.
  86. // -----------------------------------------------------------------------------
  87. HRESULT HrGWStartNewMailHandlerW(
  88.     IN DWORD   dwSubmitInterval,                // submit interval
  89.     IN DWORD   dwPollingInterval,               // polling interval
  90.     IN DWORD   cMessages,                       // #messages/thread
  91.     IN DWORD   cThreads,                        // #threads
  92.     IN LPCWSTR lpszAddrType,                    // address type
  93.     IN LPCWSTR lpszPath,                        // path
  94.     IN LPTHREAD_START_ROUTINE lpStartAddress);  // thread function
  95.  
  96. HRESULT HrGWStartNewMailHandlerA(
  97.     IN DWORD   dwSubmitInterval,                // submit interval
  98.     IN DWORD   dwPollingInterval,               // polling interval
  99.     IN DWORD   cMessages,                       // #messages/thread
  100.     IN DWORD   cThreads,                        // #threads
  101.     IN LPCSTR  lpszAddrType,                    // address type
  102.     IN LPCSTR  lpszPath,                        // path
  103.     IN LPTHREAD_START_ROUTINE lpStartAddress);  // thread function
  104.  
  105. #ifdef UNICODE
  106. #define HrGWStartNewMailHandler    HrGWStartNewMailHandlerW
  107. #else
  108. #define HrGWStartNewMailHandler    HrGWStartNewMailHandlerA
  109. #endif
  110.  
  111. //$--HrGWStartNewFileHandler@--------------------------------------------------
  112. //  Start a thread to handle processing of new files.
  113. // -----------------------------------------------------------------------------
  114. HRESULT HrGWStartNewFileHandlerW(
  115.     IN DWORD   dwSubmitInterval,                // submit interval
  116.     IN DWORD   dwPollingInterval,               // polling interval
  117.     IN DWORD   cMessages,                       // #messages/thread
  118.     IN DWORD   cThreads,                        // #threads
  119.     IN LPCWSTR lpszAddrType,                    // address type
  120.     IN LPCWSTR lpszFileMask,                    // file mask
  121.     IN LPCWSTR lpszPath,                        // path
  122.     IN LPTHREAD_START_ROUTINE lpStartAddress);  // thread function
  123.  
  124. HRESULT HrGWStartNewFileHandlerA(
  125.     IN DWORD   dwSubmitInterval,                // submit interval
  126.     IN DWORD   dwPollingInterval,               // polling interval
  127.     IN DWORD   cMessages,                       // #messages/thread
  128.     IN DWORD   cThreads,                        // #threads
  129.     IN LPCSTR  lpszAddrType,                    // address type
  130.     IN LPCSTR  lpszFileMask,                    // file mask
  131.     IN LPCSTR  lpszPath,                        // path
  132.     IN LPTHREAD_START_ROUTINE lpStartAddress);  // thread function
  133.  
  134. #ifdef UNICODE
  135. #define HrGWStartNewFileHandler    HrGWStartNewFileHandlerW
  136. #else
  137. #define HrGWStartNewFileHandler    HrGWStartNewFileHandlerA
  138. #endif
  139.  
  140. //$--GetGWPath----------------------------------------------------------------
  141. //  Get a gateway path pointer.
  142. // -----------------------------------------------------------------------------
  143. LPSTR GetGWPath(LPVOID lpParameter);
  144.  
  145. //$--GetGWSRowSet-----------------------------------------------------------------
  146. //  Get a SRowSet pointer.
  147. // -----------------------------------------------------------------------------
  148. LPSRowSet GetGWSRowSet(LPVOID lpParameter);
  149.  
  150. //$--GetGWFindData-----------------------------------------------------------
  151. //  Get a WIN32_FIND_DATA pointer.
  152. // -----------------------------------------------------------------------------
  153. LPWIN32_FIND_DATA GetGWFindData(LPVOID lpParameter);
  154.  
  155. //$--GetGWFindDataSize-------------------------------------------------------
  156. //  Get a WIN32_FIND_DATA size.
  157. // -----------------------------------------------------------------------------
  158. ULONG GetGWFindDataSize(LPVOID lpParameter);
  159.  
  160. //$--GetGWSubmitInterval----------------------------------------------------------
  161. //  Get the submit interval.
  162. // -----------------------------------------------------------------------------
  163. DWORD GetGWSubmitInterval(LPVOID lpParameter);
  164.  
  165. //$--FreeThreadParameter--------------------------------------------------------
  166. //  Free the thread parameter.
  167. // -----------------------------------------------------------------------------
  168. VOID FreeThreadParameter(LPVOID lpParameter);
  169.  
  170. //
  171. //  The following functions are defined by the application writer.
  172. //
  173.  
  174. //$--GWMain----------------------------------------------------------------
  175. //  This function is given its own thread to execute.
  176. // -----------------------------------------------------------------------------
  177. void GWMain(void);
  178.  
  179. //$--HrGWLogon-------------------------------------------------------------
  180. //  Logon to the gateway.
  181. // -----------------------------------------------------------------------------
  182. HRESULT HrGWLogon(void);
  183.  
  184. //$--HrGWLogoff------------------------------------------------------------
  185. //  Logoff of the gateway.
  186. // -----------------------------------------------------------------------------
  187. HRESULT HrGWLogoff(void);
  188.  
  189. #ifdef __cplusplus
  190. }
  191. #endif // __cplusplus
  192.  
  193. #pragma option pop /*P_O_Pop*/
  194. #endif
  195.