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

  1. /* ----------------------------------------------------------------------------
  2.  Microsoft Distributed Transaction Coordinator (Microsoft Confidential)
  3.      Copyright 1995 - 1995 Microsoft Corporation.  All Rights Reserved.
  4.  
  5.  @doc
  6.  
  7.  @module TXDTC.H | <nl>Header for 
  8.                                  <i IResourceManagerFactory>,
  9.                                 <i IResourceManager>,
  10.                                 <i IXATransLookup>,
  11.                                 <i IPrepareInfo>,
  12.                                 <i IGetDispenser>.<nl><nl>
  13.  
  14. -------------------------------------------------------------------------------
  15.  @rev 7 | 09/30/96 | gaganc        | Added interfaces IXAResourceManagerFactoryCreate,
  16.                                         IXAResourceManager, and IXATransaction
  17.  @rev 6 | 08/13/96 | gaganc        | Added IRMInfo, and IXAObtainRMInfo interfaces
  18.  @rev 5 | 04/20/96 | gaganc        | Added IXaConfig
  19.  @rev 4 | 09/14/95 | gaganc        | Added IID_IXATransLookUp
  20.  @rev 3 | 08/25/95 | gaganc        | Added IResourceManagerSink interface
  21.  @rev 2 | 05/16/95 | gaganc        | Added guids for the RM to Proxy int. guids
  22.  @rev 1 | 05/05/95 | mohsena         | Created: For M0.2 from msdtcprx.h
  23.  @rev 0 | 03/28/95 | gaganc        | Created msdtcprx.h
  24. ----------------------------------------------------------------------------- */
  25.  
  26. #ifndef __TXDTC_H__
  27. #    define __TXDTC_H__
  28.  
  29. // ===============================
  30. // INCLUDES:
  31. // ===============================
  32. #ifdef WIN32                                // OLE inclusions:
  33. #    include <objbase.h>                                         
  34. #else
  35. #    include <windows.h>
  36. #    include <ole2.h>
  37. #endif WIN32
  38.  
  39. #include "transact.h"                        // Definition of ITransaction, ...etc
  40. #include "txcoord.h"                        // Definition of ITransactionResource,...etc
  41. #include "xa.h"
  42.  
  43. //---------------------------------------------------------
  44. //    Macros
  45. //---------------------------------------------------------
  46. #define XACTTOMSG(dwXact) (dwXact-0x00040000+0x40000000)
  47.  
  48.  
  49. //---------------------------------------------------------
  50. //    Error Messages
  51. //---------------------------------------------------------
  52. #define XACT_E_CONNECTION_REQUEST_DENIED    0x8004D100L
  53. #define XACT_E_TOOMANY_ENLISTMENTS            0x8004D101L
  54. #define XACT_E_DUPLICATE_GUID                0x8004D102L
  55. #define XACT_E_NOTSINGLEPHASE                0x8004D103L
  56. #define XACT_E_RECOVERYALREADYDONE            0x8004D104L
  57. #define XACT_E_PROTOCOL                        0x8004D105L
  58. #define    XACT_E_RM_FAILURE                    0x8004D106L
  59. #define XACT_E_RECOVERY_FAILED                0x8004D107L
  60.  
  61.  
  62. //---------------------------------------------------------
  63. //    Status Messages
  64. //---------------------------------------------------------
  65. #define XACT_S_NONOTIFY                        0x0004D100L
  66. #define XACT_OK_NONOTIFY                    0x0004D101L
  67.  
  68. //---------------------------------------------------------
  69. //             Consts
  70. //---------------------------------------------------------
  71. const    DWORD    dwUSER_MS_SQLSERVER            = 0x0000FFFF;
  72.  
  73.  
  74. //---------------------------------------------------------
  75. //             GUIDs
  76. //---------------------------------------------------------
  77. //IID_IResourceManagerFactory 13741d20-87eb-11ce-8081-0080c758527e
  78. DEFINE_GUID(IID_IResourceManagerFactory,
  79.             0x13741d20,
  80.             0x87eb,
  81.             0x11ce,
  82.             0x80, 0x81, 0x00, 0x80, 0xc7, 0x58, 0x52, 0x7e);
  83.  
  84.  
  85. //IID_IResourceManager 13741d21-87eb-11ce-8081-0080c758527e 
  86. DEFINE_GUID(IID_IResourceManager,
  87.             0x13741d21,
  88.             0x87eb,
  89.             0x11ce,
  90.             0x80, 0x81, 0x00, 0x80, 0xc7, 0x58, 0x52, 0x7e);
  91.  
  92.  
  93.  
  94. //IID_IPrepareInfo 80c7bfd0-87ee-11ce-8081-0080c758527e
  95. DEFINE_GUID(IID_IPrepareInfo,
  96.             0x80c7bfd0,
  97.             0x87ee,
  98.             0x11ce,
  99.             0x80, 0x81, 0x00, 0x80, 0xc7, 0x58, 0x52, 0x7e);
  100.  
  101.  
  102. //IID_IGetDispenser c23cc370-87ef-11ce-8081-0080c758527e
  103. DEFINE_GUID(IID_IGetDispenser,
  104.             0xc23cc370,
  105.             0x87ef,
  106.             0x11ce,
  107.             0x80, 0x81, 0x00, 0x80, 0xc7, 0x58, 0x52, 0x7e);
  108.  
  109.  
  110. //IID_IResourceManagerSink {0D563181-DEFB-11ce-AED1-00AA0051E2C4}
  111. DEFINE_GUID(IID_IResourceManagerSink, 
  112.             0xd563181,
  113.             0xdefb,
  114.             0x11ce,
  115.             0xae, 0xd1, 0x0, 0xaa, 0x0, 0x51, 0xe2, 0xc4);
  116.  
  117. //IID_IXATransLookup {F3B1F131-EEDA-11ce-AED4-00AA0051E2C4}
  118. DEFINE_GUID(IID_IXATransLookup, 
  119.             0xf3b1f131,
  120.             0xeeda,
  121.             0x11ce,
  122.             0xae, 0xd4, 0x0, 0xaa, 0x0, 0x51, 0xe2, 0xc4);
  123.  
  124.  
  125. // IID_IXAConfig {C8A6E3A1-9A8C-11cf-A308-00A0C905416E}
  126. DEFINE_GUID(IID_IXAConfig, 
  127.             0xc8a6e3a1,
  128.             0x9a8c,
  129.             0x11cf,
  130.             0xa3, 0x8, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  131.  
  132. //IID_IRMInfo {E793F6D1-F53D-11cf-A60D-00A0C905416E}
  133. DEFINE_GUID(IID_IRMInfo, 
  134.             0xe793f6d1,
  135.             0xf53d,
  136.             0x11cf,
  137.             0xa6, 0xd, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  138.  
  139.  
  140. //IID_IXAObtainRMInfo {E793F6D2-F53D-11cf-A60D-00A0C905416E}
  141. DEFINE_GUID(IID_IXAObtainRMInfo, 
  142.             0xe793f6d2,
  143.             0xf53d,
  144.             0x11cf,
  145.             0xa6, 0xd, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  146.  
  147.  
  148. // IID_ITransactionVoterFactory {319FAC10-A391-11cf-A535-00AA006887C3}
  149. DEFINE_GUID(IID_ITransactionVoterFactory, 
  150.             0x319fac10, 
  151.             0xa391, 
  152.             0x11cf, 
  153.             0xa5, 0x35, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  154.  
  155.  
  156. // IID_ITransactionVoterNotifyAsync {319FAC11-A391-11cf-A535-00AA006887C3}
  157. DEFINE_GUID(IID_ITransactionVoterNotifyAsync, 
  158.             0x319fac11, 
  159.             0xa391, 
  160.             0x11cf, 
  161.             0xa5, 0x35, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  162.  
  163.  
  164. // IID_ITransactionVoterBallotAsync {319FAC12-A391-11cf-A535-00AA006887C3}
  165. DEFINE_GUID(IID_ITransactionVoterBallotAsync, 
  166.             0x319fac12, 
  167.             0xa391, 
  168.             0x11cf, 
  169.             0xa5, 0x35, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  170.  
  171.  
  172. // IID_ITransactionTransmitterFactory {59313E00-B36C-11cf-A539-00AA006887C3}
  173. DEFINE_GUID(IID_ITransactionTransmitterFactory, 
  174.             0x59313e00, 
  175.             0xb36c, 
  176.             0x11cf, 
  177.             0xa5, 0x39, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  178.  
  179.  
  180. // IID_ITransactionTransmitter {59313E01-B36C-11cf-A539-00AA006887C3}
  181. DEFINE_GUID(IID_ITransactionTransmitter, 
  182.             0x59313e01, 
  183.             0xb36c, 
  184.             0x11cf, 
  185.             0xa5, 0x39, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  186.  
  187.  
  188. // IID_ITransactionReceiverFactory {59313E02-B36C-11cf-A539-00AA006887C3}
  189. DEFINE_GUID(IID_ITransactionReceiverFactory, 
  190.             0x59313e02, 
  191.             0xb36c, 
  192.             0x11cf, 
  193.             0xa5, 0x39, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  194.  
  195.  
  196. // IID_ITransactionReceiver {59313E03-B36C-11cf-A539-00AA006887C3}
  197. DEFINE_GUID(IID_ITransactionReceiver, 
  198.             0x59313e03, 
  199.             0xb36c, 
  200.             0x11cf, 
  201.             0xa5, 0x39, 0x0, 0xaa, 0x0, 0x68, 0x87, 0xc3);
  202.  
  203.  
  204.  
  205.  
  206. //IID_ITransactionDisableCommit {C27D5D20-F79B-11cf-8CB5-00C04FD658E5}
  207. DEFINE_GUID(IID_ITransactionDisableCommit, 
  208.             0xc27d5d20, 
  209.             0xf79b, 
  210.             0x11cf, 
  211.             0x8c, 0xb5, 0x0, 0xc0, 0x4f, 0xd6, 0x58, 0xe5);
  212.  
  213.  
  214. //IID_ITransactionEnableCommit {C27D5D21-F79B-11cf-8CB5-00C04FD658E5}
  215. DEFINE_GUID(IID_ITransactionEnableCommit, 
  216.             0xc27d5d21, 
  217.             0xf79b, 
  218.             0x11cf, 
  219.             0x8c, 0xb5, 0x0, 0xc0, 0x4f, 0xd6, 0x58, 0xe5);
  220.  
  221.  
  222.  
  223. //IID_IXAResourceManagerFactory {4131E750-1AEA-11d0-944B-00A0C905416E}
  224. DEFINE_GUID(IID_IXAResourceManagerFactory, 
  225.             0x4131e750,
  226.             0x1aea,
  227.             0x11d0,
  228.             0x94, 0x4b, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  229.  
  230. //IID_IXAResourceManager {4131E751-1AEA-11d0-944B-00A0C905416E}
  231. DEFINE_GUID(IID_IXAResourceManager, 
  232.             0x4131e751,
  233.             0x1aea,
  234.             0x11d0,
  235.             0x94, 0x4b, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  236.  
  237. //IID_IXATransaction {4131E752-1AEA-11d0-944B-00A0C905416E}
  238. DEFINE_GUID(IID_IXATransaction, 
  239.             0x4131e752,
  240.             0x1aea,
  241.             0x11d0,
  242.             0x94, 0x4b, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x6e);
  243.  
  244.  
  245. //---------------------------------------------------------
  246. //        typedefs
  247. //---------------------------------------------------------
  248.  
  249. typedef struct _ProxyConfigParams
  250.             {
  251.                 WORD    wcThreadsMax;
  252.             }    PROXY_CONFIG_PARAMS;
  253.  
  254.  
  255.  
  256. // @interface IXATransLookup | See class <c IXATransLookup>. 
  257. // -----------------------------------------------------------------------
  258. // @class IXATransLookup | XA Lookup support interface.<nl>
  259. // Description:<nl>
  260. // Usage:<nl>
  261. // Notes:<nl>
  262. //    UNDONE:
  263. // .
  264. // -----------------------------------------------------------------------
  265. // @rev 0 | 03/05/96 |gaganc | created
  266. // -----------------------------------------------------------------------
  267. #undef INTERFACE
  268. #define INTERFACE IXATransLookup
  269.  
  270. DECLARE_INTERFACE_ (IXATransLookup, IUnknown)    // @base public | IUnknown
  271. {
  272.     // IUnknown interface methods:
  273.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID FAR * ppv) PURE;
  274.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  275.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  276.  
  277.     STDMETHOD    (Lookup) ( /* [out] */
  278.                  ITransaction ** ppTransaction) PURE;
  279. };
  280.  
  281.  
  282.  
  283. // @interface IResourceManagerSink | See class <c IResourceManager>. 
  284. // -----------------------------------------------------------------------
  285. // @class IResourceManager | SQL Server enlistment support.<nl>
  286. // Description:<nl>
  287. // Usage:<nl>
  288. // -----------------------------------------------------------------------
  289. // @rev 0 | 08/25/95 |gaganc | created
  290. // -----------------------------------------------------------------------
  291. #undef INTERFACE
  292. #define INTERFACE IResourceManagerSink
  293.  
  294. DECLARE_INTERFACE_ (IResourceManagerSink, IUnknown)    // @base public | IUnknown
  295. {
  296.     // IUnknown interface methods:
  297.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID FAR * ppv) PURE;
  298.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  299.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  300.  
  301.     STDMETHOD    (TMDown) (void) PURE;
  302. };
  303.  
  304.  
  305.  
  306. // @interface IResourceManager | See class <c IResourceManager>. 
  307. // -----------------------------------------------------------------------
  308. // @class IResourceManager | SQL Server enlistment support.<nl>
  309. // -----------------------------------------------------------------------
  310. // @rev 0 | 05/06/95 |gaganc | created
  311. // -----------------------------------------------------------------------
  312. #undef INTERFACE
  313. #define INTERFACE IResourceManager
  314.  
  315. DECLARE_INTERFACE_ (IResourceManager, IUnknown)    // @base public | IUnknown
  316. {
  317.     // IUnknown interface methods:
  318.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  319.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  320.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  321.  
  322.     STDMETHOD    (Enlist) ( 
  323.         /* [in] */ ITransaction  *pTransaction,
  324.         /* [in] */ ITransactionResourceAsync  *pRes,
  325.         /* [out][in] */ GUID  *pUOW,
  326.         /* [out] */ LONG  *pisoLevel,
  327.         /* [out] */ ITransactionEnlistmentAsync  ** ppEnlist) PURE;
  328.  
  329.     STDMETHOD (Reenlist) ( 
  330.         /* [in] */ unsigned char  *pPrepInfo,
  331.         /* [in] */ ULONG cbPrepInfo,
  332.         /* [in] */ DWORD lTimeout,
  333.         /* [in-out] */ XACTSTAT *pXactStat) PURE;
  334.     
  335.     // @cmember .
  336.     STDMETHOD (ReenlistmentComplete) ( void) PURE;
  337.     
  338.     //\@cmember .
  339.     STDMETHOD (GetDistributedTransactionManager) ( 
  340.         /* [in] */ REFIID rid, 
  341.         /* [out] */ void  ** ppvObject) PURE;
  342. };
  343.  
  344.  
  345.  
  346. // @interface IXAConfig 
  347. /* ----------------------------------------------------------------------------
  348.     @class IXAConfig | XA RM support.<nl>
  349.  
  350. -------------------------------------------------------------------------------
  351.  @rev 0 | 04/20/96 |gaganc | created
  352. ---------------------------------------------------------------------------- */
  353. #undef INTERFACE
  354. #define INTERFACE IXAConfig
  355.  
  356. DECLARE_INTERFACE_ (IXAConfig, IUnknown)
  357. {
  358.     // IUnknown interface methods:
  359.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  360.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  361.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  362.  
  363.     STDMETHOD    (Initialize) (GUID clsidHelperDll) PURE;
  364.  
  365.     STDMETHOD (Terminate) ( void) PURE;
  366. };
  367.  
  368.  
  369. // @interface IRMHelper
  370. /* ----------------------------------------------------------------------------
  371.     @class IRMHelper | XA RM support.<nl>
  372.  
  373. -------------------------------------------------------------------------------
  374.  @rev 0 | 08/13/96 |gaganc | created
  375. ---------------------------------------------------------------------------- */
  376. #undef INTERFACE
  377. #define INTERFACE IRMHelper
  378.  
  379. DECLARE_INTERFACE_ (IRMHelper, IUnknown)
  380. {
  381.     // IUnknown interface methods:
  382.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  383.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  384.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  385.  
  386.     STDMETHOD    (RMCount) (DWORD dwcTotalNumberOfRMs) PURE;
  387.  
  388.     STDMETHOD    (RMInfo)    (
  389.                                 xa_switch_t * pXa_Switch,
  390.                                 BOOL    fCDeclCallingConv,
  391.                                 char * pszOpenString,
  392.                                 char * pszCloseString,
  393.                                 GUID guidRMRecovery    
  394.                             ) PURE;
  395. };
  396.  
  397.  
  398.  
  399. // @interface IXAObtainRMInfo 
  400. /* ----------------------------------------------------------------------------
  401.     @class IXAObtainRMInfo | XA RM support.<nl>
  402.  
  403. -------------------------------------------------------------------------------
  404.  @rev 0 | 08/13/96 |gaganc | created
  405. ---------------------------------------------------------------------------- */
  406. #undef INTERFACE
  407. #define INTERFACE IXAObtainRMInfo
  408.  
  409. DECLARE_INTERFACE_ (IXAObtainRMInfo, IUnknown)
  410. {
  411.     // IUnknown interface methods:
  412.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  413.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  414.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  415.  
  416.     STDMETHOD    (ObtainRMInfo) (IRMHelper * pIRMHelper) PURE;
  417. };
  418.  
  419.  
  420. // @interface IXAResourceManager
  421. /* ----------------------------------------------------------------------------
  422.     @class IXAResourceManager | XA RM support.<nl>
  423.  
  424. -------------------------------------------------------------------------------
  425.  @rev 0 | 09/30/96 |gaganc | created
  426. ---------------------------------------------------------------------------- */
  427. #undef INTERFACE
  428. #define INTERFACE IXAResourceManager
  429.  
  430. DECLARE_INTERFACE_ (IXAResourceManager, IUnknown)
  431. {
  432.     // IUnknown interface methods:
  433.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  434.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  435.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  436.  
  437. }; //end interface IXAResourceManager
  438.  
  439.  
  440. // @interface IXAResourceManagerFactory
  441. /* ----------------------------------------------------------------------------
  442.     @class IXAResourceManagerFactory | XA RM support.<nl>
  443.  
  444. -------------------------------------------------------------------------------
  445.  @rev 0 | 09/30/96 |gaganc | created
  446. ---------------------------------------------------------------------------- */
  447. #undef INTERFACE
  448. #define INTERFACE IXAResourceManagerFactory
  449.  
  450. DECLARE_INTERFACE_ (IXAResourceManagerFactory, IUnknown)
  451. {
  452.     // IUnknown interface methods:
  453.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  454.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  455.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  456.  
  457.     STDMETHOD (Create) ( 
  458.                         /*[in] */ char * pszDSN, 
  459.                         /*[in] */ CLSID pclsidRMHelper,
  460.                         /*[out] */ IXAResourceManager ** ppIXaResMgr
  461.                         ) PURE;
  462.     
  463. }; //end interface IXAResourceManagerFactory
  464.  
  465.  
  466.  
  467.  
  468. // @interface IXATransaction
  469. /* ----------------------------------------------------------------------------
  470.     @class IXATransaction | XA RM support.<nl>
  471.  
  472. -------------------------------------------------------------------------------
  473.  @rev 0 | 09/30/96 |gaganc | created
  474. ---------------------------------------------------------------------------- */
  475. #undef INTERFACE
  476. #define INTERFACE IXATransaction
  477.  
  478. DECLARE_INTERFACE_ (IXATransaction, ITransaction)
  479. {
  480.     // IUnknown interface methods:
  481.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  482.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  483.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  484.  
  485.     //methods from ITransaction
  486.     STDMETHOD (Commit)
  487.         (
  488.             /*[in]*/ BOOL  fRetaining, 
  489.             /*[in]*/ DWORD grfTC,
  490.             /*[in]*/ DWORD grfRM
  491.         ) PURE;
  492.  
  493.     STDMETHOD (Abort)
  494.         (
  495.             /*[in]*/ BOID* pboidReason,
  496.             /*[in]*/ BOOL  fRetaining,
  497.             /*[in]*/ BOOL  fAsync
  498.         )PURE;
  499.  
  500.     STDMETHOD (GetTransactionInfo)
  501.         (
  502.             /* [out] */ XACTTRANSINFO* pinfo
  503.         ) PURE;    
  504.  
  505.  
  506.     //additional methods
  507.     STDMETHOD (Join)
  508.         (
  509.             /*[in]*/ IXAResourceManager * pIXAResourceManager
  510.         ) PURE;
  511.         
  512.  
  513.     STDMETHOD (UnJoin)
  514.         (
  515.             void    
  516.         ) PURE;
  517.                     
  518. }; //end interface IXATransaction
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525. // @interface IResourceManagerFactory | See class <c IResourceManagerFactory>. 
  526. // -----------------------------------------------------------------------
  527. // @class IResourceManagerFactory | Creates <c IResourceManager> instances.<nl>
  528. // Description:<nl>
  529. // Usage:<nl>
  530. // Notes:<nl>
  531. //    UNDONE:
  532. // .
  533. // -----------------------------------------------------------------------
  534. // @rev 0 | 05/06/95 |mohsena | created
  535. // -----------------------------------------------------------------------
  536. DECLARE_INTERFACE_ (IResourceManagerFactory, IUnknown)        // @base public | IUnknown
  537. {
  538.     // IUnknown interface methods:
  539.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  540.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  541.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  542.  
  543.     // IResourceManagerFactory interface methods
  544.     STDMETHOD    (Create)            (
  545.                                     THIS_ 
  546.                                     GUID __RPC_FAR *pguidRM,
  547.                                     TCHAR __RPC_FAR *pszRMName,
  548.                                     IResourceManagerSink    * pIResMgrSink,
  549.                                     IResourceManager __RPC_FAR *__RPC_FAR *ppResMgr
  550.                                     ) PURE;
  551.     
  552. };
  553.  
  554. // @interface IPrepareInfo | See class <c IPrepareInfo>. 
  555. // -----------------------------------------------------------------------
  556. // @class IPrepareInfo | Defines <i IPrepareInfo>.<nl>
  557. // Description:<nl>
  558. // Usage:<nl>
  559. // Notes:<nl>
  560. //    UNDONE:
  561. // .
  562. // -----------------------------------------------------------------------
  563. // @rev 0 | 03/28/95 |gaganc | created
  564. // -----------------------------------------------------------------------
  565. DECLARE_INTERFACE_ (IPrepareInfo, IUnknown)            // @base public | IUnknown
  566. {
  567.     // IUnknown interface methods:
  568.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  569.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  570.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  571.  
  572.     // IPrepareInfo methods
  573.     STDMETHOD    (GetPrepareInfoSize)    (THIS_ 
  574.                                         /*[out]*/ ULONG __RPC_FAR *pcbPrepInfo) PURE;
  575.         
  576.     STDMETHOD    (GetPrepareInfo)        (THIS_
  577.                                         /*[in/out]*/ unsigned char __RPC_FAR *pPrepInfo) PURE;
  578. };
  579.  
  580.  
  581. // @interface IGetDispenser | See class <c IGetDispenser>. 
  582. // -----------------------------------------------------------------------
  583. // @class IGetDispenser | Defines <i IGetDispenser>.<nl>
  584. // Description:<nl>
  585. // Usage:<nl>
  586. // Notes:<nl>
  587. //    UNDONE:
  588. // .
  589. // -----------------------------------------------------------------------
  590. // @rev 0 | 03/28/95 |gaganc | created
  591. // -----------------------------------------------------------------------
  592. DECLARE_INTERFACE_ (IGetDispenser, IUnknown)            // @base public | IUnknown
  593. {
  594.     // IUnknown interface methods:
  595.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  596.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  597.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  598.  
  599.     // IGetDispenser methods
  600.     STDMETHOD    (GetDispenser)        (THIS_
  601.                                     /*[in]*/ REFIID rid,
  602.                                     /*[in/out]*/ void** ppvObject) PURE;
  603. };
  604.  
  605.  
  606. // @interface ITransactionVoterNotifyAsync | <nl>. 
  607. // -----------------------------------------------------------------------
  608. // @class ITransactionVoterNotifyAsync | Defines <i ITransactionVoterNotifyAsync>.<nl>
  609. // Description: This interface is implemented by a voters object.<nl>
  610. // Usage: Register an object supporting this interface with the DTC proxy
  611. //          using the ITransactionVoterFactory::Create <nl>
  612. // Notes:<nl>
  613. //    UNDONE:
  614. // .
  615. // -----------------------------------------------------------------------
  616. // @rev 0 | 05/01/95 | shaiwals | created
  617. // -----------------------------------------------------------------------
  618. DECLARE_INTERFACE_ (ITransactionVoterNotifyAsync, ITransactionOutcomeEvents)    
  619.                     // @base public | ITransactionOutcomeEvents
  620. {
  621.     // IUnknown interface methods:
  622.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  623.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  624.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  625.  
  626.     // ITransactionOutcomeEvents methods
  627.     STDMETHOD    (Committed)            (THIS_
  628.                                     /*[in]*/ BOOL fRetaining,
  629.                                     /*[in]*/ XACTUOW __RPC_FAR *pNewUOW,
  630.                                     /*[in]*/ HRESULT hr) PURE;
  631.     
  632.     STDMETHOD    (Aborted)            (THIS_
  633.                                     /*[in]*/ BOID __RPC_FAR *pboidReason,
  634.                                     /*[in]*/ BOOL fRetaining,
  635.                                     /*[in]*/ XACTUOW __RPC_FAR *pNewUOW,
  636.                                     /*[in]*/ HRESULT hr) PURE;
  637.     
  638.     STDMETHOD    (HeuristicDecision)    (THIS_
  639.                                     /*[in]*/ DWORD dwDecision,
  640.                                     /*[in]*/ BOID __RPC_FAR *pboidReason,
  641.                                     /*[in]*/ HRESULT hr) PURE;
  642.     
  643.     STDMETHOD    (Indoubt)            (THIS) PURE;
  644.  
  645.     // ITransactionVoterNotifyAsync methods
  646.     STDMETHOD    (VoteRequest)        (THIS) PURE;
  647. };
  648.  
  649.  
  650. // @interface ITransactionVoterBallotAsync | See class <c CImpTxVoterBallotAsync>. 
  651. // -----------------------------------------------------------------------
  652. // @class ITransactionVoterBallotAsync | Defines <i ITransactionVoterBallotAsync>.<nl>
  653. // Description:<nl>
  654. // Usage:<nl>
  655. // Notes:<nl>
  656. //    UNDONE:
  657. // .
  658. // -----------------------------------------------------------------------
  659. // @rev 0 | 05/01/95 | shaiwals | created
  660. // -----------------------------------------------------------------------
  661. DECLARE_INTERFACE_ (ITransactionVoterBallotAsync, IUnknown)    // @base public | IUnknown
  662. {
  663.     // IUnknown interface methods:
  664.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  665.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  666.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  667.  
  668.     // ITransactionVoterBallotAsync methods
  669.     STDMETHOD    (VoteRequestDone)    (THIS_
  670.                                     /*[in]*/ HRESULT hr,
  671.                                     /*[in]*/ BOID * pboidReason
  672.                                     ) PURE;
  673. };
  674.  
  675.  
  676. // @interface ITransactionVoterFactory | See class <c CImpTxVoterFactory>. 
  677. // -----------------------------------------------------------------------
  678. // @class ITransactionVoterFactory | Defines <i ITransactionVoterFactory>.<nl>
  679. // Description:<nl>
  680. // Usage:<nl>
  681. // Notes:<nl>
  682. //    UNDONE:
  683. // .
  684. // -----------------------------------------------------------------------
  685. // @rev 0 | 05/01/95 | shaiwals | created
  686. // -----------------------------------------------------------------------
  687. DECLARE_INTERFACE_ (ITransactionVoterFactory, IUnknown)    // @base public | IUnknown
  688. {
  689.     // IUnknown interface methods:
  690.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  691.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  692.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  693.  
  694.     // ITransactionVoterFactory methods
  695.     STDMETHOD    (Create)            (THIS_
  696.                                     /*[in]*/ ITransaction * pTransaction,
  697.                                     /*[in]*/ ITransactionVoterNotifyAsync * pVoterNotify,
  698.                                     /*[in/out]*/ ITransactionVoterBallotAsync ** ppVoterBallot
  699.                                     ) PURE;
  700. };
  701.  
  702.  
  703. // @interface ITransactionTransmitter | See class <c CImpTxTransmitter>. 
  704. // -----------------------------------------------------------------------
  705. // @class ITransactionTransmitter | Defines <i ITransactionTransmitter>.<nl>
  706. // Description:<nl>
  707. // Usage:<nl>
  708. // Notes:<nl>
  709. //    UNDONE:
  710. // .
  711. // -----------------------------------------------------------------------
  712. // @rev 0 | 05/01/95 | shaiwals | created
  713. // -----------------------------------------------------------------------
  714. DECLARE_INTERFACE_ (ITransactionTransmitter, IUnknown)    // @base public | IUnknown
  715. {
  716.     // IUnknown interface methods:
  717.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  718.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  719.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  720.  
  721.     // ITransactionTransmitter methods
  722.     STDMETHOD    (Set)                (THIS_
  723.                                     /*[in]*/ ITransaction * pTransaction
  724.                                     ) PURE;
  725.  
  726.     STDMETHOD    (GetPropagationTokenSize)(THIS_
  727.                                     /*[in/out]*/ ULONG *pcbToken
  728.                                     ) PURE;
  729.  
  730.     STDMETHOD    (MarshalPropagationToken)(THIS_
  731.                                     /*[in]*/ ULONG pcbToken,
  732.                                     /*[in/out]*/ BYTE *rgbToken,
  733.                                     /*[in/out]*/ ULONG *pcbUsed
  734.                                     ) PURE;
  735.  
  736.     STDMETHOD    (UnmarshalReturnToken)(THIS_
  737.                                     /*[in]*/ ULONG pcbReturnToken,
  738.                                     /*[in]*/ BYTE *rgbReturnToken
  739.                                     ) PURE;
  740.  
  741.     STDMETHOD    (Reset)                (THIS) PURE;
  742. };
  743.  
  744.  
  745. // @interface ITransactionTransmitterFactory | See class <c CImpTxTransmitterFactory>. 
  746. // -----------------------------------------------------------------------
  747. // @class ITransactionTransmitterFactory | Defines <i ITransactionTransmitterFactory>.<nl>
  748. // Description:<nl>
  749. // Usage:<nl>
  750. // Notes:<nl>
  751. //    UNDONE:
  752. // .
  753. // -----------------------------------------------------------------------
  754. // @rev 0 | 05/01/95 | shaiwals | created
  755. // -----------------------------------------------------------------------
  756. DECLARE_INTERFACE_ (ITransactionTransmitterFactory, IUnknown)    // @base public | IUnknown
  757. {
  758.     // IUnknown interface methods:
  759.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  760.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  761.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  762.  
  763.     // ITransactionTransmitterFactory methods
  764.     STDMETHOD    (Create)            ( THIS_
  765.                                     /*[in/out]*/ ITransactionTransmitter ** ppTransmitter
  766.                                     ) PURE;
  767. };
  768.  
  769.  
  770. // @interface ITransactionReceiver | See class <c CImpTxReceiver>. 
  771. // -----------------------------------------------------------------------
  772. // @class ITransactionReceiver | Defines <i ITransactionReceiver>.<nl>
  773. // Description:<nl>
  774. // Usage:<nl>
  775. // Notes:<nl>
  776. //    UNDONE:
  777. // .
  778. // -----------------------------------------------------------------------
  779. // @rev 0 | 05/01/95 | shaiwals | created
  780. // -----------------------------------------------------------------------
  781. DECLARE_INTERFACE_ (ITransactionReceiver, IUnknown)    // @base public | IUnknown
  782. {
  783.     // IUnknown interface methods:
  784.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  785.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  786.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  787.  
  788.     // ITransactionReceiver methods
  789.     STDMETHOD    (UnmarshalPropagationToken)(THIS_
  790.                                     /*[in]*/ ULONG pcbToken,
  791.                                     /*[in]*/ BYTE *rgbToken,
  792.                                     /*[in/out]*/ ITransaction ** ppTransaction
  793.                                     ) PURE;
  794.  
  795.     STDMETHOD    (GetReturnTokenSize)(THIS_
  796.                                     /*[in/out]*/ ULONG *pcbReturnToken
  797.                                     ) PURE;
  798.  
  799.     STDMETHOD    (MarshalReturnToken)(THIS_
  800.                                     /*[in]*/ ULONG pcbReturnToken,
  801.                                     /*[in\out]*/ BYTE *rgbReturnToken,
  802.                                     /*[in\out]*/ ULONG *pcbUsed
  803.                                     ) PURE;
  804.  
  805.     STDMETHOD    (Reset)                (THIS) PURE;
  806. };
  807.  
  808.  
  809. // @interface ITransactionReceiverFactory | See class <c CImpTxReceiverFactory>. 
  810. // -----------------------------------------------------------------------
  811. // @class ITransactionReceiverFactory | Defines <i ITransactionReceiverFactory>.<nl>
  812. // Description:<nl>
  813. // Usage:<nl>
  814. // Notes:<nl>
  815. //    UNDONE:
  816. // .
  817. // -----------------------------------------------------------------------
  818. // @rev 0 | 05/01/95 | shaiwals | created
  819. // -----------------------------------------------------------------------
  820. DECLARE_INTERFACE_ (ITransactionReceiverFactory, IUnknown)    // @base public | IUnknown
  821. {
  822.     // IUnknown interface methods:
  823.     STDMETHOD    (QueryInterface)    (THIS_ REFIID riid, LPVOID * ppv) PURE;
  824.      STDMETHOD_    (ULONG, AddRef)        (THIS)     PURE;
  825.      STDMETHOD_    (ULONG, Release)    (THIS)     PURE;
  826.  
  827.     // ITransactionReceiverFactory methods
  828.     STDMETHOD    (Create)            (THIS_
  829.                                     /*[in/out]*/ ITransactionReceiver ** ppReceiver
  830.                                     ) PURE;
  831. };
  832.  
  833.  
  834. #endif