home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / objbase.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  6KB  |  145 lines

  1. #ifndef _OBJBASE_H
  2. #define _OBJBASE_H
  3. #include <rpc.h>
  4. #include <rpcndr.h>
  5. #include <stdlib.h>
  6. #pragma pack(push,8)
  7. #include <basetyps.h>
  8.  
  9. #define WINOLEAPI STDAPI
  10. #define WINOLEAPI_(type) STDAPI_(type)
  11. #define FARSTRUCT
  12. #define HUGEP
  13. #define LISet32(li,v) ((li).HighPart=(v)<0?-1:0,(li).LowPart=(v))
  14. #define ULISet32(li,v) ((li).HighPart=0,(li).LowPart=(v))
  15. #define CLSCTX_ALL (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER)
  16. #define CLSCTX_INPROC (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER)
  17. #define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER)
  18. #define MARSHALINTERFACE_MIN 500
  19. #define CWCSTORAGENAME 32
  20. #define STGM_DIRECT 0
  21. #define STGM_TRANSACTED 0x10000L
  22. #define STGM_SIMPLE 0x8000000L
  23. #define STGM_READ 0
  24. #define STGM_WRITE 1
  25. #define STGM_READWRITE 2
  26. #define STGM_SHARE_DENY_NONE 0x40
  27. #define STGM_SHARE_DENY_READ 0x30
  28. #define STGM_SHARE_DENY_WRITE 0x20
  29. #define STGM_SHARE_EXCLUSIVE 0x10
  30. #define STGM_PRIORITY 0x40000L
  31. #define STGM_DELETEONRELEASE 0x4000000
  32. #define STGM_NOSCRATCH 0x100000
  33. #define STGM_CREATE 0x1000
  34. #define STGM_CONVERT 0x20000
  35. #define STGM_FAILIFTHERE 0
  36. #define CWCSTORAGENAME 32
  37. #define ASYNC_MODE_COMPATIBILITY    1
  38. #define ASYNC_MODE_DEFAULT    0
  39. #define STGTY_REPEAT    256
  40. #define STG_TOEND    0xFFFFFFFF
  41. #define STG_LAYOUT_SEQUENTIAL    0
  42. #define STG_LAYOUT_INTERLEAVED    1
  43. typedef enum tagREGCLS {
  44.     REGCLS_SINGLEUSE = 0,
  45.     REGCLS_MULTIPLEUSE = 1,
  46.     REGCLS_MULTI_SEPARATE = 2
  47. } REGCLS;
  48. #include <wtypes.h>
  49. #include <unknwn.h>
  50. #include <objidl.h>
  51.  
  52. #ifdef __cplusplus
  53. inline BOOL IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
  54.     { return !memcmp(&rguid1, &rguid2, sizeof(GUID)); }
  55. inline BOOL operator==(const GUID& guidOne, const GUID& guidOther)
  56.     { return !memcmp(&guidOne,&guidOther,sizeof(GUID)); }
  57. inline BOOL operator!=(const GUID& g1, const GUID& g2)
  58.     { return !(g1 == g2); }
  59. #else
  60. #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
  61. #endif
  62. #define IsEqualIID(id1,id2) IsEqualGUID(id1,id2)
  63. #define IsEqualCLSID(id1,id2) IsEqualGUID(id1,id2)
  64. #include <cguid.h>
  65.  
  66. WINOLEAPI_(DWORD) CoBuildVersion(void);
  67. WINOLEAPI CoInitialize(PVOID);
  68. WINOLEAPI_(void) CoUninitialize(void);
  69. WINOLEAPI CoGetMalloc(DWORD,LPMALLOC*);
  70. WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
  71. WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY);
  72. WINOLEAPI CoRevokeMallocSpy(void);
  73. WINOLEAPI CoCreateStandardMalloc(DWORD,IMalloc**);
  74. #if DBG == 1
  75. WINOLEAPI_(ULONG) DebugCoGetRpcFault(void);
  76. WINOLEAPI_(void) DebugCoSetRpcFault(ULONG);
  77. #endif
  78. WINOLEAPI CoGetClassObject(REFCLSID,DWORD,PVOID,REFIID,PVOID*);
  79. WINOLEAPI CoRegisterClassObject(REFCLSID,LPUNKNOWN,DWORD,DWORD,PDWORD);
  80. WINOLEAPI CoRevokeClassObject(DWORD);
  81. WINOLEAPI CoGetMarshalSizeMax(ULONG*,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
  82. WINOLEAPI CoMarshalInterface(LPSTREAM,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
  83. WINOLEAPI CoUnmarshalInterface(LPSTREAM,REFIID,PVOID*);
  84. WINOLEAPI CoMarshalHresult(LPSTREAM,HRESULT);
  85. WINOLEAPI CoUnmarshalHresult(LPSTREAM,HRESULT*);
  86. WINOLEAPI CoReleaseMarshalData(LPSTREAM);
  87. WINOLEAPI CoDisconnectObject(LPUNKNOWN,DWORD);
  88. WINOLEAPI CoLockObjectExternal(LPUNKNOWN,BOOL,BOOL);
  89. WINOLEAPI CoGetStandardMarshal(REFIID,LPUNKNOWN,DWORD,PVOID,DWORD,LPMARSHAL*);
  90. WINOLEAPI_(BOOL) CoIsHandlerConnected(LPUNKNOWN);
  91. WINOLEAPI_(BOOL) CoHasStrongExternalConnections(LPUNKNOWN);
  92. WINOLEAPI CoMarshalInterThreadInterfaceInStream(REFIID,LPUNKNOWN,LPSTREAM*);
  93. WINOLEAPI CoGetInterfaceAndReleaseStream(LPSTREAM,REFIID,PVOID*);
  94. WINOLEAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN,LPUNKNOWN*);
  95. WINOLEAPI_(HINSTANCE) CoLoadLibrary(LPOLESTR,BOOL);
  96. WINOLEAPI_(void) CoFreeLibrary(HINSTANCE);
  97. WINOLEAPI_(void) CoFreeAllLibraries(void);
  98. WINOLEAPI_(void) CoFreeUnusedLibraries(void);
  99. WINOLEAPI CoCreateInstance(REFCLSID,LPUNKNOWN,DWORD,REFIID,PVOID*);
  100. WINOLEAPI StringFromCLSID(REFCLSID,LPOLESTR*);
  101. WINOLEAPI CLSIDFromString(LPOLESTR,LPCLSID);
  102. WINOLEAPI StringFromIID(REFIID,LPOLESTR*);
  103. WINOLEAPI IIDFromString(LPOLESTR,LPIID);
  104. WINOLEAPI_(BOOL) CoIsOle1Class(REFCLSID);
  105. WINOLEAPI ProgIDFromCLSID(REFCLSID,LPOLESTR*);
  106. WINOLEAPI CLSIDFromProgID(LPCOLESTR,LPCLSID);
  107. WINOLEAPI_(int) StringFromGUID2(REFGUID,LPOLESTR,int);
  108. WINOLEAPI CoCreateGuid(GUID*);
  109. WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(FILETIME*,LPWORD,LPWORD);
  110. WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(WORD,WORD,FILETIME*);
  111. WINOLEAPI CoFileTimeNow(FILETIME*);
  112. WINOLEAPI CoRegisterMessageFilter(LPMESSAGEFILTER,LPMESSAGEFILTER*);
  113. WINOLEAPI CoGetTreatAsClass(REFCLSID,LPCLSID);
  114. WINOLEAPI CoTreatAsClass(REFCLSID,REFCLSID);
  115. typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT)(REFCLSID,REFIID,PVOID*);
  116. typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW)(void);
  117. STDAPI DllGetClassObject(REFCLSID,REFIID,PVOID*);
  118. STDAPI DllCanUnloadNow(void);
  119. WINOLEAPI_(PVOID) CoTaskMemAlloc(ULONG);
  120. WINOLEAPI_(PVOID) CoTaskMemRealloc(PVOID,ULONG);
  121. WINOLEAPI_(void) CoTaskMemFree(PVOID);
  122. WINOLEAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER*);
  123. WINOLEAPI CreateDataCache(LPUNKNOWN,REFCLSID,REFIID,PVOID*);
  124. WINOLEAPI StgCreateDocfile(const OLECHAR*,DWORD,DWORD,IStorage**);
  125. WINOLEAPI StgCreateDocfileOnILockBytes(ILockBytes*,DWORD,DWORD,IStorage**);
  126. WINOLEAPI StgOpenStorage(const OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
  127. WINOLEAPI StgOpenStorageOnILockBytes(ILockBytes*,IStorage*,DWORD,SNB,DWORD,IStorage**);
  128. WINOLEAPI StgIsStorageFile(const OLECHAR*);
  129. WINOLEAPI StgIsStorageILockBytes(ILockBytes*);
  130. WINOLEAPI StgSetTimes(OLECHAR const*,FILETIME const*,FILETIME const*,FILETIME const*);
  131. WINOLEAPI BindMoniker(LPMONIKER,DWORD,REFIID,PVOID*);
  132. WINOLEAPI MkParseDisplayName(LPBC,LPCOLESTR,ULONG*,LPMONIKER*);
  133. WINOLEAPI MonikerRelativePathTo(LPMONIKER,LPMONIKER,LPMONIKER*,BOOL);
  134. WINOLEAPI MonikerCommonPrefixWith(LPMONIKER,LPMONIKER,LPMONIKER*);
  135. WINOLEAPI CreateBindCtx(DWORD,LPBC*);
  136. WINOLEAPI CreateGenericComposite(LPMONIKER,LPMONIKER,LPMONIKER*);
  137. WINOLEAPI GetClassFile (LPCOLESTR,CLSID*);
  138. WINOLEAPI CreateFileMoniker(LPCOLESTR,LPMONIKER*);
  139. WINOLEAPI CreateItemMoniker(LPCOLESTR,LPCOLESTR,LPMONIKER*);
  140. WINOLEAPI CreateAntiMoniker(LPMONIKER*);
  141. WINOLEAPI CreatePointerMoniker(LPUNKNOWN,LPMONIKER*);
  142. WINOLEAPI GetRunningObjectTable(DWORD,LPRUNNINGOBJECTTABLE*);
  143. #pragma pack(pop)
  144. #endif
  145.