home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 November / PCWorld_2000-11_cd.bin / Software / Topware / devc40 / _SETUP.5 / Group3 / unknwn.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  3KB  |  68 lines

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