[1046] | 1 | /* Include here to prevent circular dependencies if windows.h
|
---|
| 2 | not already included */
|
---|
| 3 | #include <rpc.h>
|
---|
| 4 | #include <rpcndr.h>
|
---|
| 5 |
|
---|
| 6 | #ifndef _OBJBASE_H
|
---|
| 7 | #define _OBJBASE_H
|
---|
| 8 | #if __GNUC__ >=3
|
---|
| 9 | #pragma GCC system_header
|
---|
| 10 | #endif
|
---|
| 11 |
|
---|
| 12 | #include <stdlib.h>
|
---|
| 13 | #pragma pack(push,8)
|
---|
| 14 | #include <basetyps.h>
|
---|
| 15 |
|
---|
| 16 | #define WINOLEAPI STDAPI
|
---|
| 17 | #define WINOLEAPI_(type) STDAPI_(type)
|
---|
| 18 | #define FARSTRUCT
|
---|
| 19 | #define HUGEP
|
---|
| 20 | #define LISet32(li,v) ((li).HighPart=(v)<0?-1:0,(li).LowPart=(v))
|
---|
| 21 | #define ULISet32(li,v) ((li).HighPart=0,(li).LowPart=(v))
|
---|
| 22 | #define CLSCTX_ALL (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER)
|
---|
| 23 | #define CLSCTX_INPROC (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER)
|
---|
| 24 | #define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER)
|
---|
| 25 | #define MARSHALINTERFACE_MIN 500
|
---|
| 26 | #define CWCSTORAGENAME 32
|
---|
| 27 | #define STGM_DIRECT 0
|
---|
| 28 | #define STGM_TRANSACTED 0x10000L
|
---|
| 29 | #define STGM_SIMPLE 0x8000000L
|
---|
| 30 | #define STGM_READ 0
|
---|
| 31 | #define STGM_WRITE 1
|
---|
| 32 | #define STGM_READWRITE 2
|
---|
| 33 | #define STGM_SHARE_DENY_NONE 0x40
|
---|
| 34 | #define STGM_SHARE_DENY_READ 0x30
|
---|
| 35 | #define STGM_SHARE_DENY_WRITE 0x20
|
---|
| 36 | #define STGM_SHARE_EXCLUSIVE 0x10
|
---|
| 37 | #define STGM_PRIORITY 0x40000L
|
---|
| 38 | #define STGM_DELETEONRELEASE 0x4000000
|
---|
| 39 | #define STGM_NOSCRATCH 0x100000
|
---|
| 40 | #define STGM_CREATE 0x1000
|
---|
| 41 | #define STGM_CONVERT 0x20000
|
---|
| 42 | #define STGM_NOSNAPSHOT 0x200000
|
---|
| 43 | #define STGM_FAILIFTHERE 0
|
---|
| 44 | #define CWCSTORAGENAME 32
|
---|
| 45 | #define ASYNC_MODE_COMPATIBILITY 1
|
---|
| 46 | #define ASYNC_MODE_DEFAULT 0
|
---|
| 47 | #define STGTY_REPEAT 256
|
---|
| 48 | #define STG_TOEND 0xFFFFFFFF
|
---|
| 49 | #define STG_LAYOUT_SEQUENTIAL 0
|
---|
| 50 | #define STG_LAYOUT_INTERLEAVED 1
|
---|
| 51 | #define COM_RIGHTS_EXECUTE 1
|
---|
| 52 | #define COM_RIGHTS_SAFE_FOR_SCRIPTING 2
|
---|
| 53 | #define STGOPTIONS_VERSION 2
|
---|
| 54 | typedef enum tagSTGFMT {
|
---|
| 55 | STGFMT_STORAGE = 0,
|
---|
| 56 | STGFMT_FILE = 3,
|
---|
| 57 | STGFMT_ANY = 4,
|
---|
| 58 | STGFMT_DOCFILE = 5
|
---|
| 59 | } STGFMT;
|
---|
| 60 | typedef struct tagSTGOPTIONS {
|
---|
| 61 | USHORT usVersion;
|
---|
| 62 | USHORT reserved;
|
---|
| 63 | ULONG ulSectorSize;
|
---|
| 64 | const WCHAR *pwcsTemplateFile;
|
---|
| 65 | } STGOPTIONS;
|
---|
| 66 | typedef enum tagREGCLS {
|
---|
| 67 | REGCLS_SINGLEUSE = 0,
|
---|
| 68 | REGCLS_MULTIPLEUSE = 1,
|
---|
| 69 | REGCLS_MULTI_SEPARATE = 2
|
---|
| 70 | } REGCLS;
|
---|
| 71 | #include <wtypes.h>
|
---|
| 72 | #include <unknwn.h>
|
---|
| 73 | #include <objidl.h>
|
---|
| 74 |
|
---|
| 75 | #ifdef __cplusplus
|
---|
| 76 | inline BOOL IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
|
---|
| 77 | { return !memcmp(&rguid1, &rguid2, sizeof(GUID)); }
|
---|
| 78 | inline BOOL operator==(const GUID& guidOne, const GUID& guidOther)
|
---|
| 79 | { return !memcmp(&guidOne,&guidOther,sizeof(GUID)); }
|
---|
| 80 | inline BOOL operator!=(const GUID& g1, const GUID& g2)
|
---|
| 81 | { return !(g1 == g2); }
|
---|
| 82 | #else
|
---|
| 83 | #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
|
---|
| 84 | #endif
|
---|
| 85 | #define IsEqualIID(id1,id2) IsEqualGUID(id1,id2)
|
---|
| 86 | #define IsEqualCLSID(id1,id2) IsEqualGUID(id1,id2)
|
---|
| 87 | #include <cguid.h>
|
---|
| 88 |
|
---|
| 89 | typedef enum tagCOINIT {
|
---|
| 90 | COINIT_APARTMENTTHREADED = 0x2,
|
---|
| 91 | COINIT_MULTITHREADED = 0x0,
|
---|
| 92 | COINIT_DISABLE_OLE1DDE = 0x4,
|
---|
| 93 | COINIT_SPEED_OVER_MEMORY = 0x8
|
---|
| 94 | } COINIT;
|
---|
| 95 | typedef enum tagSTDMSHLFLAGS {
|
---|
| 96 | SMEXF_SERVER = 0x01,
|
---|
| 97 | SMEXF_HANDLER = 0x02
|
---|
| 98 | } STDMSHLFLAGS;
|
---|
| 99 |
|
---|
| 100 | WINOLEAPI_(DWORD) CoBuildVersion(void);
|
---|
| 101 | WINOLEAPI CoInitialize(PVOID);
|
---|
| 102 | WINOLEAPI CoInitializeEx(LPVOID,DWORD);
|
---|
| 103 | WINOLEAPI_(void) CoUninitialize(void);
|
---|
| 104 | WINOLEAPI CoGetMalloc(DWORD,LPMALLOC*);
|
---|
| 105 | WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
|
---|
| 106 | WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY);
|
---|
| 107 | WINOLEAPI CoRevokeMallocSpy(void);
|
---|
| 108 | WINOLEAPI CoCreateStandardMalloc(DWORD,IMalloc**);
|
---|
| 109 | #ifdef DBG
|
---|
| 110 | WINOLEAPI_(ULONG) DebugCoGetRpcFault(void);
|
---|
| 111 | WINOLEAPI_(void) DebugCoSetRpcFault(ULONG);
|
---|
| 112 | #endif
|
---|
| 113 | WINOLEAPI CoGetClassObject(REFCLSID,DWORD,COSERVERINFO*,REFIID,PVOID*);
|
---|
| 114 | WINOLEAPI CoRegisterClassObject(REFCLSID,LPUNKNOWN,DWORD,DWORD,PDWORD);
|
---|
| 115 | WINOLEAPI CoRevokeClassObject(DWORD);
|
---|
| 116 | WINOLEAPI CoGetMarshalSizeMax(ULONG*,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
|
---|
| 117 | WINOLEAPI CoMarshalInterface(LPSTREAM,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
|
---|
| 118 | WINOLEAPI CoUnmarshalInterface(LPSTREAM,REFIID,PVOID*);
|
---|
| 119 | WINOLEAPI CoMarshalHresult(LPSTREAM,HRESULT);
|
---|
| 120 | WINOLEAPI CoUnmarshalHresult(LPSTREAM,HRESULT*);
|
---|
| 121 | WINOLEAPI CoReleaseMarshalData(LPSTREAM);
|
---|
| 122 | WINOLEAPI CoDisconnectObject(LPUNKNOWN,DWORD);
|
---|
| 123 | WINOLEAPI CoLockObjectExternal(LPUNKNOWN,BOOL,BOOL);
|
---|
| 124 | WINOLEAPI CoGetStandardMarshal(REFIID,LPUNKNOWN,DWORD,PVOID,DWORD,LPMARSHAL*);
|
---|
| 125 | WINOLEAPI CoGetStdMarshalEx(LPUNKNOWN,DWORD,LPUNKNOWN*);
|
---|
| 126 | WINOLEAPI_(BOOL) CoIsHandlerConnected(LPUNKNOWN);
|
---|
| 127 | WINOLEAPI_(BOOL) CoHasStrongExternalConnections(LPUNKNOWN);
|
---|
| 128 | WINOLEAPI CoMarshalInterThreadInterfaceInStream(REFIID,LPUNKNOWN,LPSTREAM*);
|
---|
| 129 | WINOLEAPI CoGetInterfaceAndReleaseStream(LPSTREAM,REFIID,PVOID*);
|
---|
| 130 | WINOLEAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN,LPUNKNOWN*);
|
---|
| 131 | WINOLEAPI_(HINSTANCE) CoLoadLibrary(LPOLESTR,BOOL);
|
---|
| 132 | WINOLEAPI_(void) CoFreeLibrary(HINSTANCE);
|
---|
| 133 | WINOLEAPI_(void) CoFreeAllLibraries(void);
|
---|
| 134 | WINOLEAPI_(void) CoFreeUnusedLibraries(void);
|
---|
| 135 | WINOLEAPI CoCreateInstance(REFCLSID,LPUNKNOWN,DWORD,REFIID,PVOID*);
|
---|
| 136 | WINOLEAPI CoCreateInstanceEx(REFCLSID,IUnknown*,DWORD,COSERVERINFO*,DWORD,MULTI_QI*);
|
---|
| 137 | WINOLEAPI StringFromCLSID(REFCLSID,LPOLESTR*);
|
---|
| 138 | WINOLEAPI CLSIDFromString(LPOLESTR,LPCLSID);
|
---|
| 139 | WINOLEAPI StringFromIID(REFIID,LPOLESTR*);
|
---|
| 140 | WINOLEAPI IIDFromString(LPOLESTR,LPIID);
|
---|
| 141 | WINOLEAPI_(BOOL) CoIsOle1Class(REFCLSID);
|
---|
| 142 | WINOLEAPI ProgIDFromCLSID(REFCLSID,LPOLESTR*);
|
---|
| 143 | WINOLEAPI CLSIDFromProgID(LPCOLESTR,LPCLSID);
|
---|
| 144 | WINOLEAPI_(int) StringFromGUID2(REFGUID,LPOLESTR,int);
|
---|
| 145 | WINOLEAPI CoCreateGuid(GUID*);
|
---|
| 146 | WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(FILETIME*,LPWORD,LPWORD);
|
---|
| 147 | WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(WORD,WORD,FILETIME*);
|
---|
| 148 | WINOLEAPI CoFileTimeNow(FILETIME*);
|
---|
| 149 | WINOLEAPI CoRegisterMessageFilter(LPMESSAGEFILTER,LPMESSAGEFILTER*);
|
---|
| 150 | WINOLEAPI CoGetTreatAsClass(REFCLSID,LPCLSID);
|
---|
| 151 | WINOLEAPI CoTreatAsClass(REFCLSID,REFCLSID);
|
---|
| 152 | typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT)(REFCLSID,REFIID,PVOID*);
|
---|
| 153 | typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW)(void);
|
---|
| 154 | STDAPI DllGetClassObject(REFCLSID,REFIID,PVOID*);
|
---|
| 155 | STDAPI DllCanUnloadNow(void);
|
---|
| 156 | WINOLEAPI_(PVOID) CoTaskMemAlloc(ULONG);
|
---|
| 157 | WINOLEAPI_(PVOID) CoTaskMemRealloc(PVOID,ULONG);
|
---|
| 158 | WINOLEAPI_(void) CoTaskMemFree(PVOID);
|
---|
| 159 | WINOLEAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER*);
|
---|
| 160 | WINOLEAPI CreateDataCache(LPUNKNOWN,REFCLSID,REFIID,PVOID*);
|
---|
| 161 | WINOLEAPI StgCreateDocfile(const OLECHAR*,DWORD,DWORD,IStorage**);
|
---|
| 162 | WINOLEAPI StgCreateDocfileOnILockBytes(ILockBytes*,DWORD,DWORD,IStorage**);
|
---|
| 163 | WINOLEAPI StgOpenStorage(const OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
|
---|
| 164 | WINOLEAPI StgOpenStorageOnILockBytes(ILockBytes*,IStorage*,DWORD,SNB,DWORD,IStorage**);
|
---|
| 165 | WINOLEAPI StgIsStorageFile(const OLECHAR*);
|
---|
| 166 | WINOLEAPI StgIsStorageILockBytes(ILockBytes*);
|
---|
| 167 | WINOLEAPI StgSetTimes(OLECHAR const*,FILETIME const*,FILETIME const*,FILETIME const*);
|
---|
| 168 | WINOLEAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
|
---|
| 169 | WINOLEAPI StgOpenStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
|
---|
| 170 | WINOLEAPI BindMoniker(LPMONIKER,DWORD,REFIID,PVOID*);
|
---|
| 171 | WINOLEAPI CoGetObject(LPCWSTR,BIND_OPTS*,REFIID,void**);
|
---|
| 172 | WINOLEAPI MkParseDisplayName(LPBC,LPCOLESTR,ULONG*,LPMONIKER*);
|
---|
| 173 | WINOLEAPI MonikerRelativePathTo(LPMONIKER,LPMONIKER,LPMONIKER*,BOOL);
|
---|
| 174 | WINOLEAPI MonikerCommonPrefixWith(LPMONIKER,LPMONIKER,LPMONIKER*);
|
---|
| 175 | WINOLEAPI CreateBindCtx(DWORD,LPBC*);
|
---|
| 176 | WINOLEAPI CreateGenericComposite(LPMONIKER,LPMONIKER,LPMONIKER*);
|
---|
| 177 | WINOLEAPI GetClassFile (LPCOLESTR,CLSID*);
|
---|
| 178 | WINOLEAPI CreateFileMoniker(LPCOLESTR,LPMONIKER*);
|
---|
| 179 | WINOLEAPI CreateItemMoniker(LPCOLESTR,LPCOLESTR,LPMONIKER*);
|
---|
| 180 | WINOLEAPI CreateAntiMoniker(LPMONIKER*);
|
---|
| 181 | WINOLEAPI CreatePointerMoniker(LPUNKNOWN,LPMONIKER*);
|
---|
| 182 | WINOLEAPI GetRunningObjectTable(DWORD,LPRUNNINGOBJECTTABLE*);
|
---|
| 183 | WINOLEAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR,LONG,SOLE_AUTHENTICATION_SERVICE*, void*,DWORD,DWORD,void*,DWORD,void*);
|
---|
| 184 | WINOLEAPI CoGetCallContext(REFIID,void**);
|
---|
| 185 | WINOLEAPI CoQueryProxyBlanket(IUnknown*, DWORD*,DWORD*,OLECHAR**,DWORD*,DWORD*,RPC_AUTH_IDENTITY_HANDLE*,DWORD*);
|
---|
| 186 | WINOLEAPI CoSetProxyBlanket(IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,DWORD,RPC_AUTH_IDENTITY_HANDLE, DWORD);
|
---|
| 187 | WINOLEAPI CoCopyProxy(IUnknown*,IUnknown**);
|
---|
| 188 | WINOLEAPI CoQueryClientBlanket(DWORD*,DWORD*,OLECHAR**, DWORD*,DWORD*,RPC_AUTHZ_HANDLE*,DWORD*);
|
---|
| 189 | WINOLEAPI CoImpersonateClient(void);
|
---|
| 190 | WINOLEAPI CoRevertToSelf(void);
|
---|
| 191 | WINOLEAPI CoQueryAuthenticationServices(DWORD*, SOLE_AUTHENTICATION_SERVICE**);
|
---|
| 192 | WINOLEAPI CoSwitchCallContext(IUnknown*,IUnknown**);
|
---|
| 193 | WINOLEAPI CoGetInstanceFromFile(COSERVERINFO*, CLSID*,IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,MULTI_QI*);
|
---|
| 194 | WINOLEAPI CoGetInstanceFromIStorage(COSERVERINFO*,CLSID*, IUnknown*,DWORD,struct IStorage*, DWORD,MULTI_QI*);
|
---|
| 195 | WINOLEAPI_(ULONG) CoAddRefServerProcess(void);
|
---|
| 196 | WINOLEAPI_(ULONG) CoReleaseServerProcess(void);
|
---|
| 197 | WINOLEAPI CoResumeClassObjects(void);
|
---|
| 198 | WINOLEAPI CoSuspendClassObjects(void);
|
---|
| 199 | WINOLEAPI CoGetPSClsid(REFIID,CLSID*);
|
---|
| 200 | WINOLEAPI CoRegisterPSClsid(REFIID,REFCLSID);
|
---|
| 201 |
|
---|
| 202 | #pragma pack(pop)
|
---|
| 203 | #endif
|
---|