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