1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 7 * Source: $(DRUNTIMESRC core/sys/windows/_objbase.d) 8 */ 9 /// Automatically imported and edited from the druntime module 10 /// core.sys.windows.objbase for the auto-generated win32 package. 11 module win32.objbase; 12 //version (Windows): 13 @system: 14 version (Win32_UseLib) pragma(lib, "ole32"); 15 16 import win32.cguid, win32.objidl, win32.unknwn, win32.wtypes; 17 import win32.basetyps, win32.objfwd, win32.rpcdce, win32.winbase, 18 win32.windef; 19 20 // DAC: Not needed for D? 21 //MACRO #define LISet32(li, v) ((li).HighPart=(v)<0?-1:0, (li).LowPart=(v)) 22 //MACRO #define ULISet32(li, v) ((li).HighPart=0, (li).LowPart=(v)) 23 24 enum CLSCTX_ALL = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_INPROC_HANDLER|CLSCTX.CLSCTX_LOCAL_SERVER; 25 enum CLSCTX_INPROC = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_INPROC_HANDLER; 26 enum CLSCTX_SERVER = CLSCTX.CLSCTX_INPROC_SERVER|CLSCTX.CLSCTX_LOCAL_SERVER|CLSCTX.CLSCTX_REMOTE_SERVER; 27 enum MARSHALINTERFACE_MIN=500; 28 enum CWCSTORAGENAME=32; 29 30 enum STGM_DIRECT = 0; 31 enum STGM_TRANSACTED = 0x10000L; 32 enum STGM_SIMPLE = 0x8000000L; 33 enum STGM_READ = 0; 34 enum STGM_WRITE = 1; 35 enum STGM_READWRITE = 2; 36 enum STGM_SHARE_DENY_NONE = 0x40; 37 enum STGM_SHARE_DENY_READ = 0x30; 38 enum STGM_SHARE_DENY_WRITE = 0x20; 39 enum STGM_SHARE_EXCLUSIVE = 0x10; 40 enum STGM_PRIORITY = 0x40000L; 41 enum STGM_DELETEONRELEASE = 0x4000000; 42 enum STGM_NOSCRATCH = 0x100000; 43 enum STGM_CREATE = 0x1000; 44 enum STGM_CONVERT = 0x20000; 45 enum STGM_NOSNAPSHOT = 0x200000; 46 enum STGM_FAILIFTHERE = 0; 47 48 enum ASYNC_MODE_COMPATIBILITY = 1; 49 enum ASYNC_MODE_DEFAULT = 0; 50 51 enum STGTY_REPEAT = 256; 52 enum STG_TOEND = 0xFFFFFFFF; 53 enum STG_LAYOUT_SEQUENTIAL = 0; 54 enum STG_LAYOUT_INTERLEAVED = 1; 55 56 enum COM_RIGHTS_EXECUTE = 1; 57 enum COM_RIGHTS_SAFE_FOR_SCRIPTING = 2; 58 59 enum STGOPTIONS_VERSION = 2; 60 61 enum STGFMT { 62 STGFMT_STORAGE = 0, 63 STGFMT_FILE = 3, 64 STGFMT_ANY = 4, 65 STGFMT_DOCFILE = 5 66 } 67 68 struct STGOPTIONS { 69 USHORT usVersion; 70 USHORT reserved; 71 ULONG ulSectorSize; 72 const(WCHAR)* pwcsTemplateFile; 73 } 74 75 enum REGCLS { 76 REGCLS_SINGLEUSE = 0, 77 REGCLS_MULTIPLEUSE = 1, 78 REGCLS_MULTI_SEPARATE = 2 79 } 80 81 /* 82 BOOL IsEqualGUID()(GUID rguid1, GUID rguid2) { 83 return rguid1 == rguid2; 84 } 85 */ 86 87 extern (Windows) BOOL IsEqualGUID( 88 REFGUID rguid1, 89 REFGUID rguid2 90 ); 91 92 alias IsEqualGUID IsEqualIID; 93 alias IsEqualGUID IsEqualCLSID; 94 95 enum COINIT { 96 COINIT_APARTMENTTHREADED = 2, 97 COINIT_MULTITHREADED = 0, 98 COINIT_DISABLE_OLE1DDE = 4, 99 COINIT_SPEED_OVER_MEMORY = 8 100 } 101 102 enum STDMSHLFLAGS { 103 SMEXF_SERVER = 1, 104 SMEXF_HANDLER 105 } 106 107 extern(Windows) { 108 alias HRESULT function(REFCLSID, REFIID, PVOID*) LPFNGETCLASSOBJECT; 109 alias HRESULT function() LPFNCANUNLOADNOW; 110 111 DWORD CoBuildVersion(); 112 HRESULT CoInitialize(PVOID); 113 HRESULT CoInitializeEx(LPVOID, DWORD); 114 void CoUninitialize(); 115 HRESULT CoGetMalloc(DWORD, LPMALLOC*); 116 DWORD CoGetCurrentProcess(); 117 HRESULT CoRegisterMallocSpy(LPMALLOCSPY); 118 HRESULT CoRevokeMallocSpy(); 119 HRESULT CoCreateStandardMalloc(DWORD, IMalloc*); 120 //#ifdef DBG 121 ULONG DebugCoGetRpcFault(); 122 void DebugCoSetRpcFault(ULONG); 123 //#endif 124 HRESULT CoGetClassObject(REFCLSID, DWORD, COSERVERINFO*, REFIID, PVOID*); 125 HRESULT CoRegisterClassObject(REFCLSID, LPUNKNOWN, DWORD, DWORD, PDWORD); 126 HRESULT CoRevokeClassObject(DWORD); 127 HRESULT CoGetMarshalSizeMax(ULONG*, REFIID, LPUNKNOWN, DWORD, PVOID, DWORD); 128 HRESULT CoMarshalInterface(LPSTREAM, REFIID, LPUNKNOWN, DWORD, PVOID, DWORD); 129 HRESULT CoUnmarshalInterface(LPSTREAM, REFIID, PVOID*); 130 HRESULT CoMarshalHresult(LPSTREAM, HRESULT); 131 HRESULT CoUnmarshalHresult(LPSTREAM, HRESULT*); 132 HRESULT CoReleaseMarshalData(LPSTREAM); 133 HRESULT CoDisconnectObject(LPUNKNOWN, DWORD); 134 HRESULT CoLockObjectExternal(LPUNKNOWN, BOOL, BOOL); 135 HRESULT CoGetStandardMarshal(REFIID, LPUNKNOWN, DWORD, PVOID, DWORD, LPMARSHAL*); 136 HRESULT CoGetStdMarshalEx(LPUNKNOWN, DWORD, LPUNKNOWN*); 137 BOOL CoIsHandlerConnected(LPUNKNOWN); 138 BOOL CoHasStrongExternalConnections(LPUNKNOWN); 139 HRESULT CoMarshalInterThreadInterfaceInStream(REFIID, LPUNKNOWN, LPSTREAM*); 140 HRESULT CoGetInterfaceAndReleaseStream(LPSTREAM, REFIID, PVOID*); 141 HRESULT CoCreateFreeThreadedMarshaler(LPUNKNOWN, LPUNKNOWN*); 142 HINSTANCE CoLoadLibrary(LPOLESTR, BOOL); 143 void CoFreeLibrary(HINSTANCE); 144 void CoFreeAllLibraries(); 145 void CoFreeUnusedLibraries(); 146 HRESULT CoCreateInstance(REFCLSID, LPUNKNOWN, DWORD, REFIID, PVOID*); 147 HRESULT CoCreateInstanceEx(REFCLSID, IUnknown, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); 148 HRESULT StringFromCLSID(REFCLSID, LPOLESTR*); 149 HRESULT CLSIDFromString(LPOLESTR, LPCLSID); 150 HRESULT StringFromIID(REFIID, LPOLESTR*); 151 HRESULT IIDFromString(LPOLESTR, LPIID); 152 BOOL CoIsOle1Class(REFCLSID); 153 HRESULT ProgIDFromCLSID(REFCLSID, LPOLESTR*); 154 HRESULT CLSIDFromProgID(LPCOLESTR, LPCLSID); 155 int StringFromGUID2(REFGUID, LPOLESTR, int); 156 HRESULT CoCreateGuid(GUID*); 157 BOOL CoFileTimeToDosDateTime(FILETIME*, LPWORD, LPWORD); 158 BOOL CoDosDateTimeToFileTime(WORD, WORD, FILETIME*); 159 HRESULT CoFileTimeNow(FILETIME*); 160 HRESULT CoRegisterMessageFilter(LPMESSAGEFILTER, LPMESSAGEFILTER*); 161 HRESULT CoGetTreatAsClass(REFCLSID, LPCLSID); 162 HRESULT CoTreatAsClass(REFCLSID, REFCLSID); 163 HRESULT DllGetClassObject(REFCLSID, REFIID, PVOID*); 164 HRESULT DllCanUnloadNow(); 165 PVOID CoTaskMemAlloc(SIZE_T); 166 PVOID CoTaskMemRealloc(PVOID, SIZE_T); 167 void CoTaskMemFree(PVOID); 168 HRESULT CreateDataAdviseHolder(LPDATAADVISEHOLDER*); 169 HRESULT CreateDataCache(LPUNKNOWN, REFCLSID, REFIID, PVOID*); 170 HRESULT StgCreateDocfile(const(OLECHAR)*, DWORD, DWORD, IStorage*); 171 HRESULT StgCreateDocfileOnILockBytes(ILockBytes, DWORD, DWORD, IStorage*); 172 HRESULT StgOpenStorage(const(OLECHAR)*, IStorage, DWORD, SNB, DWORD, IStorage*); 173 HRESULT StgOpenStorageOnILockBytes(ILockBytes, IStorage, DWORD, SNB, DWORD, IStorage*); 174 HRESULT StgIsStorageFile(const(OLECHAR)*); 175 HRESULT StgIsStorageILockBytes(ILockBytes); 176 HRESULT StgSetTimes(OLECHAR *, FILETIME *, FILETIME *, FILETIME *); 177 HRESULT StgCreateStorageEx(const(WCHAR)*, DWORD, DWORD, DWORD, STGOPTIONS*, void*, REFIID, void**); 178 HRESULT StgOpenStorageEx(const(WCHAR)*, DWORD, DWORD, DWORD, STGOPTIONS*, void*, REFIID, void**); 179 HRESULT BindMoniker(LPMONIKER, DWORD, REFIID, PVOID*); 180 HRESULT CoGetObject(LPCWSTR, BIND_OPTS*, REFIID, void**); 181 HRESULT MkParseDisplayName(LPBC, LPCOLESTR, ULONG*, LPMONIKER*); 182 HRESULT MonikerRelativePathTo(LPMONIKER, LPMONIKER, LPMONIKER*, BOOL); 183 HRESULT MonikerCommonPrefixWith(LPMONIKER, LPMONIKER, LPMONIKER*); 184 HRESULT CreateBindCtx(DWORD, LPBC*); 185 HRESULT CreateGenericComposite(LPMONIKER, LPMONIKER, LPMONIKER*); 186 HRESULT GetClassFile (LPCOLESTR, CLSID*); 187 HRESULT CreateFileMoniker(LPCOLESTR, LPMONIKER*); 188 HRESULT CreateItemMoniker(LPCOLESTR, LPCOLESTR, LPMONIKER*); 189 HRESULT CreateAntiMoniker(LPMONIKER*); 190 HRESULT CreatePointerMoniker(LPUNKNOWN, LPMONIKER*); 191 HRESULT GetRunningObjectTable(DWORD, LPRUNNINGOBJECTTABLE*); 192 HRESULT CoInitializeSecurity(PSECURITY_DESCRIPTOR, LONG, SOLE_AUTHENTICATION_SERVICE*, void*, DWORD, DWORD, void*, DWORD, void*); 193 HRESULT CoGetCallContext(REFIID, void**); 194 HRESULT CoQueryProxyBlanket(IUnknown*, DWORD*, DWORD*, OLECHAR**, DWORD*, DWORD*, RPC_AUTH_IDENTITY_HANDLE*, DWORD*); 195 HRESULT CoSetProxyBlanket(IUnknown*, DWORD, DWORD, OLECHAR*, DWORD, DWORD, RPC_AUTH_IDENTITY_HANDLE, DWORD); 196 HRESULT CoCopyProxy(IUnknown*, IUnknown**); 197 HRESULT CoQueryClientBlanket(DWORD*, DWORD*, OLECHAR**, DWORD*, DWORD*, RPC_AUTHZ_HANDLE*, DWORD*); 198 HRESULT CoImpersonateClient(); 199 HRESULT CoRevertToSelf(); 200 HRESULT CoQueryAuthenticationServices(DWORD*, SOLE_AUTHENTICATION_SERVICE**); 201 HRESULT CoSwitchCallContext(IUnknown*, IUnknown**); 202 HRESULT CoGetInstanceFromFile(COSERVERINFO*, CLSID*, IUnknown*, DWORD, DWORD, OLECHAR*, DWORD, MULTI_QI*); 203 HRESULT CoGetInstanceFromIStorage(COSERVERINFO*, CLSID*, IUnknown*, DWORD, IStorage*, DWORD, MULTI_QI*); 204 ULONG CoAddRefServerProcess(); 205 ULONG CoReleaseServerProcess(); 206 HRESULT CoResumeClassObjects(); 207 HRESULT CoSuspendClassObjects(); 208 HRESULT CoGetPSClsid(REFIID, CLSID*); 209 HRESULT CoRegisterPSClsid(REFIID, REFCLSID); 210 }