source: Daodan/MinGW/include/objbase.h@ 1133

Last change on this file since 1133 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 8.3 KB
RevLine 
[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
54typedef enum tagSTGFMT {
55 STGFMT_STORAGE = 0,
56 STGFMT_FILE = 3,
57 STGFMT_ANY = 4,
58 STGFMT_DOCFILE = 5
59} STGFMT;
60typedef struct tagSTGOPTIONS {
61 USHORT usVersion;
62 USHORT reserved;
63 ULONG ulSectorSize;
64 const WCHAR *pwcsTemplateFile;
65} STGOPTIONS;
66typedef 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
76inline BOOL IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
77 { return !memcmp(&rguid1, &rguid2, sizeof(GUID)); }
78inline BOOL operator==(const GUID& guidOne, const GUID& guidOther)
79 { return !memcmp(&guidOne,&guidOther,sizeof(GUID)); }
80inline 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
89typedef enum tagCOINIT {
90 COINIT_APARTMENTTHREADED = 0x2,
91 COINIT_MULTITHREADED = 0x0,
92 COINIT_DISABLE_OLE1DDE = 0x4,
93 COINIT_SPEED_OVER_MEMORY = 0x8
94} COINIT;
95typedef enum tagSTDMSHLFLAGS {
96 SMEXF_SERVER = 0x01,
97 SMEXF_HANDLER = 0x02
98} STDMSHLFLAGS;
99
100WINOLEAPI_(DWORD) CoBuildVersion(void);
101WINOLEAPI CoInitialize(PVOID);
102WINOLEAPI CoInitializeEx(LPVOID,DWORD);
103WINOLEAPI_(void) CoUninitialize(void);
104WINOLEAPI CoGetMalloc(DWORD,LPMALLOC*);
105WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
106WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY);
107WINOLEAPI CoRevokeMallocSpy(void);
108WINOLEAPI CoCreateStandardMalloc(DWORD,IMalloc**);
109#ifdef DBG
110WINOLEAPI_(ULONG) DebugCoGetRpcFault(void);
111WINOLEAPI_(void) DebugCoSetRpcFault(ULONG);
112#endif
113WINOLEAPI CoGetClassObject(REFCLSID,DWORD,COSERVERINFO*,REFIID,PVOID*);
114WINOLEAPI CoRegisterClassObject(REFCLSID,LPUNKNOWN,DWORD,DWORD,PDWORD);
115WINOLEAPI CoRevokeClassObject(DWORD);
116WINOLEAPI CoGetMarshalSizeMax(ULONG*,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
117WINOLEAPI CoMarshalInterface(LPSTREAM,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
118WINOLEAPI CoUnmarshalInterface(LPSTREAM,REFIID,PVOID*);
119WINOLEAPI CoMarshalHresult(LPSTREAM,HRESULT);
120WINOLEAPI CoUnmarshalHresult(LPSTREAM,HRESULT*);
121WINOLEAPI CoReleaseMarshalData(LPSTREAM);
122WINOLEAPI CoDisconnectObject(LPUNKNOWN,DWORD);
123WINOLEAPI CoLockObjectExternal(LPUNKNOWN,BOOL,BOOL);
124WINOLEAPI CoGetStandardMarshal(REFIID,LPUNKNOWN,DWORD,PVOID,DWORD,LPMARSHAL*);
125WINOLEAPI CoGetStdMarshalEx(LPUNKNOWN,DWORD,LPUNKNOWN*);
126WINOLEAPI_(BOOL) CoIsHandlerConnected(LPUNKNOWN);
127WINOLEAPI_(BOOL) CoHasStrongExternalConnections(LPUNKNOWN);
128WINOLEAPI CoMarshalInterThreadInterfaceInStream(REFIID,LPUNKNOWN,LPSTREAM*);
129WINOLEAPI CoGetInterfaceAndReleaseStream(LPSTREAM,REFIID,PVOID*);
130WINOLEAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN,LPUNKNOWN*);
131WINOLEAPI_(HINSTANCE) CoLoadLibrary(LPOLESTR,BOOL);
132WINOLEAPI_(void) CoFreeLibrary(HINSTANCE);
133WINOLEAPI_(void) CoFreeAllLibraries(void);
134WINOLEAPI_(void) CoFreeUnusedLibraries(void);
135WINOLEAPI CoCreateInstance(REFCLSID,LPUNKNOWN,DWORD,REFIID,PVOID*);
136WINOLEAPI CoCreateInstanceEx(REFCLSID,IUnknown*,DWORD,COSERVERINFO*,DWORD,MULTI_QI*);
137WINOLEAPI StringFromCLSID(REFCLSID,LPOLESTR*);
138WINOLEAPI CLSIDFromString(LPOLESTR,LPCLSID);
139WINOLEAPI StringFromIID(REFIID,LPOLESTR*);
140WINOLEAPI IIDFromString(LPOLESTR,LPIID);
141WINOLEAPI_(BOOL) CoIsOle1Class(REFCLSID);
142WINOLEAPI ProgIDFromCLSID(REFCLSID,LPOLESTR*);
143WINOLEAPI CLSIDFromProgID(LPCOLESTR,LPCLSID);
144WINOLEAPI_(int) StringFromGUID2(REFGUID,LPOLESTR,int);
145WINOLEAPI CoCreateGuid(GUID*);
146WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(FILETIME*,LPWORD,LPWORD);
147WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(WORD,WORD,FILETIME*);
148WINOLEAPI CoFileTimeNow(FILETIME*);
149WINOLEAPI CoRegisterMessageFilter(LPMESSAGEFILTER,LPMESSAGEFILTER*);
150WINOLEAPI CoGetTreatAsClass(REFCLSID,LPCLSID);
151WINOLEAPI CoTreatAsClass(REFCLSID,REFCLSID);
152typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT)(REFCLSID,REFIID,PVOID*);
153typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW)(void);
154STDAPI DllGetClassObject(REFCLSID,REFIID,PVOID*);
155STDAPI DllCanUnloadNow(void);
156WINOLEAPI_(PVOID) CoTaskMemAlloc(ULONG);
157WINOLEAPI_(PVOID) CoTaskMemRealloc(PVOID,ULONG);
158WINOLEAPI_(void) CoTaskMemFree(PVOID);
159WINOLEAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER*);
160WINOLEAPI CreateDataCache(LPUNKNOWN,REFCLSID,REFIID,PVOID*);
161WINOLEAPI StgCreateDocfile(const OLECHAR*,DWORD,DWORD,IStorage**);
162WINOLEAPI StgCreateDocfileOnILockBytes(ILockBytes*,DWORD,DWORD,IStorage**);
163WINOLEAPI StgOpenStorage(const OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
164WINOLEAPI StgOpenStorageOnILockBytes(ILockBytes*,IStorage*,DWORD,SNB,DWORD,IStorage**);
165WINOLEAPI StgIsStorageFile(const OLECHAR*);
166WINOLEAPI StgIsStorageILockBytes(ILockBytes*);
167WINOLEAPI StgSetTimes(OLECHAR const*,FILETIME const*,FILETIME const*,FILETIME const*);
168WINOLEAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
169WINOLEAPI StgOpenStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
170WINOLEAPI BindMoniker(LPMONIKER,DWORD,REFIID,PVOID*);
171WINOLEAPI CoGetObject(LPCWSTR,BIND_OPTS*,REFIID,void**);
172WINOLEAPI MkParseDisplayName(LPBC,LPCOLESTR,ULONG*,LPMONIKER*);
173WINOLEAPI MonikerRelativePathTo(LPMONIKER,LPMONIKER,LPMONIKER*,BOOL);
174WINOLEAPI MonikerCommonPrefixWith(LPMONIKER,LPMONIKER,LPMONIKER*);
175WINOLEAPI CreateBindCtx(DWORD,LPBC*);
176WINOLEAPI CreateGenericComposite(LPMONIKER,LPMONIKER,LPMONIKER*);
177WINOLEAPI GetClassFile (LPCOLESTR,CLSID*);
178WINOLEAPI CreateFileMoniker(LPCOLESTR,LPMONIKER*);
179WINOLEAPI CreateItemMoniker(LPCOLESTR,LPCOLESTR,LPMONIKER*);
180WINOLEAPI CreateAntiMoniker(LPMONIKER*);
181WINOLEAPI CreatePointerMoniker(LPUNKNOWN,LPMONIKER*);
182WINOLEAPI GetRunningObjectTable(DWORD,LPRUNNINGOBJECTTABLE*);
183WINOLEAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR,LONG,SOLE_AUTHENTICATION_SERVICE*, void*,DWORD,DWORD,void*,DWORD,void*);
184WINOLEAPI CoGetCallContext(REFIID,void**);
185WINOLEAPI CoQueryProxyBlanket(IUnknown*, DWORD*,DWORD*,OLECHAR**,DWORD*,DWORD*,RPC_AUTH_IDENTITY_HANDLE*,DWORD*);
186WINOLEAPI CoSetProxyBlanket(IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,DWORD,RPC_AUTH_IDENTITY_HANDLE, DWORD);
187WINOLEAPI CoCopyProxy(IUnknown*,IUnknown**);
188WINOLEAPI CoQueryClientBlanket(DWORD*,DWORD*,OLECHAR**, DWORD*,DWORD*,RPC_AUTHZ_HANDLE*,DWORD*);
189WINOLEAPI CoImpersonateClient(void);
190WINOLEAPI CoRevertToSelf(void);
191WINOLEAPI CoQueryAuthenticationServices(DWORD*, SOLE_AUTHENTICATION_SERVICE**);
192WINOLEAPI CoSwitchCallContext(IUnknown*,IUnknown**);
193WINOLEAPI CoGetInstanceFromFile(COSERVERINFO*, CLSID*,IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,MULTI_QI*);
194WINOLEAPI CoGetInstanceFromIStorage(COSERVERINFO*,CLSID*, IUnknown*,DWORD,struct IStorage*, DWORD,MULTI_QI*);
195WINOLEAPI_(ULONG) CoAddRefServerProcess(void);
196WINOLEAPI_(ULONG) CoReleaseServerProcess(void);
197WINOLEAPI CoResumeClassObjects(void);
198WINOLEAPI CoSuspendClassObjects(void);
199WINOLEAPI CoGetPSClsid(REFIID,CLSID*);
200WINOLEAPI CoRegisterPSClsid(REFIID,REFCLSID);
201
202#pragma pack(pop)
203#endif
Note: See TracBrowser for help on using the repository browser.