home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / msmqocm.cab / xolehlp.h < prev    next >
C/C++ Source or Header  |  1997-10-06  |  3KB  |  100 lines

  1. /* ----------------------------------------------------------------------------
  2. Microsoft    D.T.C (Distributed Transaction Coordinator)
  3.  
  4. (c)    1995    Microsoft Corporation.    All Rights Reserved
  5.  
  6.  
  7. @module        XOLEHLP.H    |
  8.         // contains DTC helper APIs used by SQL Server and application clients
  9.         // to obtain the transaction manager
  10. -------------------------------------------------------------------------------
  11. @rev    0    |    13-Mar-1995    |    GaganC    |    Created
  12.  
  13.     NB    |    14-Jan-97    | alexdad(in local copy):  ifdef cplusplus
  14. ----------------------------------------------------------------------------- */
  15.  
  16. #ifndef __XOLEHLP__H__
  17. #define __XOLEHLP__H__
  18.  
  19.  
  20. //----------------------------------------
  21. //    All defines and constants go here
  22. //----------------------------------------
  23. #define EXPORTAPI __declspec( dllexport )HRESULT
  24.  
  25. //----------------------------------------
  26. //    All function prototypes go here
  27. //----------------------------------------
  28.  
  29. //This API should be used to obtain an IUnknown or a ITransactionDispenser
  30. //interface from the Microsoft Distributed Transaction Coordinator's proxy.
  31. //Typically, a NULL is passed for the host name and the TM Name. In which 
  32. //case the MS DTC on the same host is contacted and the interface provided
  33. //for it.
  34. #ifndef _UNICODE
  35. EXPORTAPI DtcGetTransactionManager( LPTSTR  pszHost,
  36.                                     LPTSTR    pszTmName,
  37.                                     /* in */ REFIID rid,
  38.                                     /* in */ DWORD    dwReserved1,
  39.                                     /* in */ WORD    wcbReserved2,
  40.                                     /* in */ void FAR * pvReserved2,
  41.                                     /*out */ void** ppvObject )    ;
  42. #ifdef __cplusplus
  43. extern "C" 
  44. #endif
  45. EXPORTAPI DtcGetTransactionManagerC
  46.                                     (    LPTSTR  pszHost,
  47.                                         LPTSTR    pszTmName,
  48.                                         /* in */ REFIID rid,
  49.                                         /* in */ DWORD    dwReserved1,
  50.                                         /* in */ WORD    wcbReserved2,
  51.                                         /* in */ void FAR * pvReserved2,
  52.                                         /*out */ void** ppvObject )    ;
  53.  
  54. #else //if def unicode
  55. EXPORTAPI DtcGetTransactionManager( char *  pszHost,
  56.                                     char *    pszTmName,
  57.                                     /* in */ REFIID rid,
  58.                                     /* in */ DWORD    dwReserved1,
  59.                                     /* in */ WORD    wcbReserved2,
  60.                                     /* in */ void FAR * pvReserved2,
  61.                                     /*out */ void** ppvObject
  62.                                     )    ;
  63. #ifdef __cplusplus
  64. extern "C" 
  65. #endif
  66. EXPORTAPI DtcGetTransactionManagerC
  67.                                     (    char *  pszHost,
  68.                                         char *    pszTmName,
  69.                                         /* in */ REFIID rid,
  70.                                         /* in */ DWORD    dwReserved1,
  71.                                         /* in */ WORD    wcbReserved2,
  72.                                         /* in */ void FAR * pvReserved2,
  73.                                         /*out */ void** ppvObject
  74.                                     );
  75. #endif _UNICODE
  76.  
  77.  
  78. //The following API is here for historical purpose only and should
  79. //not be used as it will be phased out eventually.
  80. #ifndef _UNICODE
  81. EXPORTAPI  DtcSelectTransactionManager(     LPTSTR  pszHost,
  82.                                         LPTSTR    pszTmName,
  83.                                        /* in */ REFIID rid,
  84.                                        /* in */ DWORD    dwReserved1,
  85.                                        /* in */ WORD    wcbReserved2,
  86.                                        /* in */ void FAR * pvReserved2,
  87.                                        /*out */ void** ppvObject ) ;
  88. #else //if def unicode
  89. EXPORTAPI  DtcSelectTransactionManager(     char *  pszHost,
  90.                                         char *    pszTmName,
  91.                                        /* in */ REFIID rid,
  92.                                        /* in */ DWORD    dwReserved1,
  93.                                        /* in */ WORD    wcbReserved2,
  94.                                        /* in */ void FAR * pvReserved2,
  95.                                        /*out */ void** ppvObject ) ;
  96. #endif _UNICODE
  97.  
  98.  
  99. #endif // __XOLEHLP__H__
  100.