home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / temacd / devc++ / devcpp-4.9.9.2_setup.exe / unknwn.h < prev    next >
C/C++ Source or Header  |  2005-01-29  |  3KB  |  77 lines

  1. #ifndef COM_NO_WINDOWS_H
  2. #include <windows.h>
  3. #endif
  4.  
  5. #ifndef _UNKNWN_H
  6. #define _UNKNWN_H
  7. #if __GNUC__ >=3
  8. #pragma GCC system_header
  9. #endif
  10.  
  11. #ifdef __cplusplus
  12. extern "C"{
  13. #endif
  14. #include <objfwd.h>
  15. #include <wtypes.h>
  16.  
  17. void * __RPC_USER MIDL_user_allocate(size_t);
  18. void __RPC_USER MIDL_user_free(void*);
  19. EXTERN_C const IID IID_IUnknown;
  20. EXTERN_C const IID IID_IClassFactory;
  21. #ifndef __IUnknown_INTERFACE_DEFINED__
  22. #define __IUnknown_INTERFACE_DEFINED__
  23. #undef INTERFACE
  24. #define INTERFACE IUnknown
  25. DECLARE_INTERFACE(IUnknown)
  26. {
  27.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  28.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  29.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  30. };
  31. typedef IUnknown *LPUNKNOWN;
  32. #endif
  33. #ifndef __IClassFactory_INTERFACE_DEFINED__
  34. #define __IClassFactory_INTERFACE_DEFINED__
  35. #undef INTERFACE
  36. #define INTERFACE IClassFactory
  37. DECLARE_INTERFACE_(IClassFactory,IUnknown)
  38. {
  39.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  40.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  41.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  42.     STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
  43.     STDMETHOD(LockServer)(THIS_ BOOL) PURE;
  44. };
  45. typedef IClassFactory *LPCLASSFACTORY;
  46. #endif
  47. HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(IUnknown*,REFIID,void**);
  48. void __RPC_STUB IUnknown_QueryInterface_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
  49. ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(IUnknown*);
  50. void __RPC_STUB IUnknown_AddRef_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
  51. ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(IUnknown*);
  52. void __RPC_STUB IUnknown_Release_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
  53. HRESULT STDMETHODCALLTYPE IClassFactory_RemoteCreateInstance_Proxy(IClassFactory*,REFIID,IUnknown**);
  54. void __RPC_STUB IClassFactory_RemoteCreateInstance_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
  55. HRESULT __stdcall IClassFactory_RemoteLockServer_Proxy(IClassFactory*,BOOL);
  56. void __RPC_STUB IClassFactory_RemoteLockServer_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
  57. HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Proxy(IClassFactory*,IUnknown*,REFIID,void**);
  58. HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Stub(IClassFactory*,REFIID,IUnknown**);
  59. HRESULT STDMETHODCALLTYPE IClassFactory_LockServer_Proxy(IClassFactory*,BOOL);
  60. HRESULT STDMETHODCALLTYPE IClassFactory_LockServer_Stub(IClassFactory*,BOOL);
  61.  
  62. #if (!defined (__cplusplus) || defined (CINTERFACE)) \
  63.     && defined (COBJMACROS)
  64. #define IUnknown_QueryInterface(T,r,O) (T)->lpVtbl->QueryInterface(T,r,O)
  65. #define IUnknown_AddRef(T) (T)->lpVtbl->AddRef(T)
  66. #define IUnknown_Release(T) (T)->lpVtbl->Release(T)
  67. #define IClassFactory_QueryInterface(T,r,O) (T)->lpVtbl->QueryInterface(T,r,O)
  68. #define IClassFactory_AddRef(T) (T)->lpVtbl->AddRef(T)
  69. #define IClassFactory_Release(T) (T)->lpVtbl->Release(T)
  70. #define IClassFactory_CreateInstance(T,p,r,O) (T)->lpVtbl->CreateInstance(T,p,r,O)
  71. #define IClassFactory_LockServer(T,f) (T)->lpVtbl->LockServer(T,f)
  72. #endif /* COBJMACROS */
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif
  77.