source: Include/objbase.sbp@ 187

Last change on this file since 187 was 175, checked in by イグトランス (egtra), 18 years ago

Variant, VBObjectの追加

File size: 22.7 KB
Line 
1' objbase.sbp
2
3
4#ifndef _INC_OBJBASE
5#define _INC_OBJBASE
6
7Type CSPLATFORM 'wtypes.sbp
8 dwPlatformId As DWord
9 dwVersionHi As DWord
10 dwVersionLo As DWord
11 dwProcessorArch As DWord
12End Type
13
14Type QUERYCONTEXT 'wtypes.sbp
15 dwContext As DWord
16 latform As CSPLATFORM
17 Locale As LCID
18 dwVersionHi As DWord
19 dwVersionLo As DWord
20End Type
21
22TypeDef RPC_AUTH_IDENTITY_HANDLE = VoidPtr 'Declared in Rpcdce.sbp; include Rpc.sbp.
23TypeDef RPC_AUTHZ_HANDLE = VoidPtr 'Declared in Rpcdce.sbp; include Rpc.sbp.
24
25Sub LISet32(ByRef li As LARGE_INTEGER, v As Long)
26 With li
27 If v < 0 Then
28 .HighPart = -1
29 Else
30 .HighPart = 0
31 End If
32 .LowPart = v
33 End With
34End Sub
35Sub ULISet32(ByRef li As ULARGE_INTEGER, v As DWord)
36 With li
37 .HighPart = 0
38 .LowPart = v
39 End With
40End Sub
41
42Const MARSHALINTERFACE_MIN = 500
43
44Const CWCSTORAGENAME = 32
45
46/* Storage instantiation modes */
47Const STGM_DIRECT = &h00000000
48Const STGM_TRANSACTED = &h00010000
49Const STGM_SIMPLE = &h08000000
50
51Const STGM_READ = &h00000000
52Const STGM_WRITE = &h00000001
53Const STGM_READWRITE = &h00000002
54
55Const STGM_SHARE_DENY_NONE = &h00000040
56Const STGM_SHARE_DENY_READ = &h00000030
57Const STGM_SHARE_DENY_WRITE = &h00000020
58Const STGM_SHARE_EXCLUSIVE = &h00000010
59
60Const STGM_PRIORITY = &h00040000
61Const STGM_DELETEONRELEASE = &h04000000
62'#if (WINVER >= &h400)
63Const STGM_NOSCRATCH = &h00100000
64'#endif /* WINVER */
65
66Const STGM_CREATE = &h00001000
67Const STGM_CONVERT = &h00020000
68Const STGM_FAILIFTHERE = &h00000000
69
70Const STGM_NOSNAPSHOT = &h00200000
71'#if (_WIN32_WINNT >= &h0500)
72Const STGM_DIRECT_SWMR = &h00400000
73'#endif
74
75/* flags for internet asyncronous and layout docfile */
76Const ASYNC_MODE_COMPATIBILITY = &h00000001
77Const ASYNC_MODE_DEFAULT = &h00000000
78
79Const STGTY_REPEAT = &h00000100
80Const STG_TOEND = &hFFFFFFFF
81
82Const STG_LAYOUT_SEQUENTIAL = &h00000000
83Const STG_LAYOUT_INTERLEAVED = &h00000001
84
85Const STGFMT_STORAGE = 0
86Const STGFMT_NATIVE = 1
87Const STGFMT_FILE = 3
88Const STGFMT_ANY = 4
89Const STGFMT_DOCFILE = 5
90
91Const STGFMT_DOCUMENT = 0
92
93'/* here is where we pull in the MIDL generated headers for the interfaces */
94'typedef interface IRpcStubBuffer IRpcStubBuffer;
95'typedef interface IRpcChannelBuffer IRpcChannelBuffer;
96
97#include <unknwn.sbp>
98#include <objidl.sbp>
99
100'-------------------
101' IStream Interface
102'-------------------
103
104Const CLSCTX_INPROC_SERVER = &H01
105Const CLSCTX_INPROC_HANDLER = &H02
106Const CLSCTX_LOCAL_SERVER = &H4
107Const CLSCTX_INPROC_SERVER16 = &H8
108Const CLSCTX_REMOTE_SERVER = &H10
109Const CLSCTX_INPROC_HANDLER16 = &H20
110Const CLSCTX_INPROC_SERVERX86 = &H40
111Const CLSCTX_INPROC_HANDLERX86 = &H80
112Const CLSCTX_ESERVER_HANDLER = &H100
113
114Const CLSCTX_INPROC = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER
115Const CLSCTX_ALL = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER or CLSCTX_LOCAL_SERVER or CLSCTX_REMOTE_SERVER
116Const CLSCTX_SERVER = CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER or CLSCTX_REMOTE_SERVER
117
118Const Enum REGCLS
119 REGCLS_SINGLEUSE = 0
120 REGCLS_MULTIPLEUSE = 1
121 REGCLS_MULTI_SEPARATE = 2
122 REGCLS_SUSPENDED = 4
123 REGCLS_SURROGATE = 8
124End Enum
125
126Type COAUTHIDENTITY
127 User As *Word
128 UserLength As DWord
129 Domain As *Word
130 DomainLength As DWord
131 Password As *Word
132 PasswordLength As DWord
133 Flags As DWord
134End Type
135Type COAUTHINFO
136 dwAuthnSvc As DWord
137 dwAuthzSvc As DWord
138 pwszServerPrincName As LPWSTR
139 dwAuthnLevel As DWord
140 dwImpersonationLevel As DWord
141 pAuthIdentityData As *COAUTHIDENTITY
142 dwCapabilities As DWord
143End Type
144Type COSERVERINFO
145 dwReserved1 As DWord
146 pwszName As LPWSTR
147 pAuthInfo As *COAUTHINFO
148 dwReserved2 As DWord
149End Type
150Declare Function CoInitialize Lib "ole32" (pvReserved As VoidPtr) As HRESULT
151Declare Sub CoUninitialize Lib "ole32" ()
152'Declare Sub CoGetMalloc Lib "ole32" (dwMemContext As DWord, ByRef pMalloc As *IMalloc) As HRESULT
153Declare Function CoGetCurrentProcess Lib "ole32" () As DWord
154'Declare Function CoRegisterMallocSpy Lib "ole32" (pMallocSpy As *IMallocSpy) As HRESULT
155Declare Function CoRevokeMallocSpy Lib "ole32" () As HRESULT
156'Declare Function CoCreateStandardMalloc Lib "ole32" (memctx As DWord, ByRef pMalloc As *IMalloc) As HRESULT
157
158
159'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM)
160#ifdef _WIN32_DCOM
161Const Enum COINIT
162 COINIT_MULTITHREADED = &h0
163 COINIT_APARTMENTTHREADED = &h2
164 COINIT_DISABLE_OLE1DDE = &h4
165 COINIT_SPEED_OVER_MEMORY = &h8
166End Enum
167Declare Function CoInitializeEx Lib "ole32" (pvReserved As VoidPtr, dwCoInit As DWord) As HRESULT
168Declare Function CoGetCallerTID Lib "ole32" (ByRef dwTID AS DWord) As HRESULT
169#endif
170
171#ifdef __UNDECLARED__
172'#if (_WIN32_WINNT >= &h0501)
173' 注意:このcokkieは本来ULARGE_INTEGER型
174'Declare Function CoRegisterInitializeSpy Lib "ole32" (pSpy As *IInitializeSpy, ByRef uliCokkie As QWord) As HRESULT
175Declare Function CoRevokeInitializeSpy Lib "ole32" (uliCookie As QWord) As HRESULT
176
177Declare Function CoGetContextToken Lib "ole32" (ByRef token As ULONG_PTR) As HRESULT
178
179Const Enum COMSD
180 SD_LAUNCHPERMISSIONS = 0
181 SD_ACCESSPERMISSIONS = 1
182 SD_LAUNCHRESTRICTIONS = 2
183 SD_ACCESSRESTRICTIONS = 3
184End Enum
185'Declare Function CoGetSystemSecurityPermissions(comSDType As COMSD, ByRef ppSD As *SECURITY_DESCRIPTOR) As HRESULT
186#endif
187
188'#if DBG == 1
189'Declare Function DebugCoGetRpcFault Lib "" () As DWord
190'Declare Sub DebugCoSetRpcFault Lib "" (ul As DWord)
191'#endif
192
193'#if (_WIN32_WINNT >= &h0500)
194
195Type SOleTlsDataPublic
196 pvReserved0[ELM(2)] As VoidPtr
197 dwReserved0[ELM(3)] As DWord
198 pvReserved1[ELM(1)] As VoidPtr
199 dwReserved1[ELM(3)] As DWord
200 pvReserved2[ELM(4)] As VoidPtr
201 dwReserved2[ELM(1)] As DWord
202 pCurrentCtx As VoidPtr
203End Type
204
205'#endif
206
207/* COM+ APIs */
208
209Declare Function CoGetObjectContext Lib "ole32" (ByRef riid As IID, ByRef ppv As Any) As HRESULT
210
211/* register/revoke/get class objects */
212
213Declare Function CoGetClassObject Lib "ole32" (ByRef rclsid As CLSID, dwClsContext As DWord, pServerInfo As *COSERVERINFO, ByRef refiid As IID, ByRef ppv As Any) As HRESULT
214Declare Function CoRegisterClassObject Lib "ole32" (ByRef rclsid As CLSID, pUnk As *IUnknown, dwClsContext As DWord, flags As DWord, ByRef dwRegister As DWord) As HRESULT
215Declare Function CoRevokeClassObject Lib "ole32" (dwRegister As DWord) As HRESULT
216Declare Function CoResumeClassObjects Lib "ole32" () As HRESULT
217Declare Function CoSuspendClassObjects Lib "ole32" () As HRESULT
218Declare Function CoAddRefServerProcess Lib "ole32" () As DWord
219Declare Function CoReleaseServerProcess Lib "ole32" () As DWord
220Declare Function CoGetPSClsid Lib "ole32" (ByRef riid As IID, ByRef rclsid As CLSID) As HRESULT
221Declare Function CoRegisterPSClsid Lib "ole32" (ByRef riid As IID, ByRef rclsid As CLSID) As HRESULT
222
223/* Registering surrogate processes */
224'Declare Function CoRegisterSurrogate Lib "ole32" (pSurrogate As *ISurrogate) As HRESULT
225
226/* marshaling interface pointers */
227
228Declare Function CoGetMarshalSizeMax Lib "ole32" (ByRef ulSize As DWord, ByRef riid As IID, pUnk As *IUnknown, dwDestContext As DWord, pvDestContext As VoidPtr, mshlflags As DWord) As HRESULT
229Declare Function CoMarshalInterface Lib "ole32" (pStm As *IStream, ByRef riid As IID, pUnk As *IUnknown, dwDestContext As DWord, pvDestContext As VoidPtr, mshlflags As DWord) As HRESULT
230Declare Function CoUnmarshalInterface Lib "ole32" (pstm As *IStream, ByRef riid As IID, ByRef ppv As Any) As HRESULT
231Declare Function CoMarshalHresult Lib "ole32" (pstm As *IStream, hresult As HRESULT) As HRESULT
232Declare Function CoUnmarshalHresult Lib "ole32" (pstm As *IStream, ByRef phresult As HRESULT) As HRESULT
233Declare Function CoReleaseMarshalData Lib "ole32" (pstm As *IStream) As HRESULT
234Declare Function CoDisconnectObject Lib "ole32" (pUnk As *IUnknown, dwReserved As DWord) As HRESULT
235Declare Function CoLockObjectExternal Lib "ole32" (pUnk As *IUnknown, fLock As BOOL, fLastUnlockReleases As BOOL) As HRESULT
236'Declare Function CoGetStandardMarshal Lib "ole32" (ByRef riid As IID, pUnk As *IUnknown, dwDestContext As DWord, pvDestContext As VoidPtr, mshlflags As DWord, ByRef pMarshal As *IMarshal) As HRESULT
237
238Declare Function CoGetStdMarshalEx Lib "ole32" (pUnkOuter As *IUnknown, smexflags As DWord, ByRef pUnkInner As *IUnknown) As HRESULT
239
240/* flags for CoGetStdMarshalEx */
241Const Enum STDMSHLFLAGS
242 SMEXF_SERVER = &h01
243 SMEXF_HANDLER = &h02
244End Enum
245
246Declare Function CoIsHandlerConnected Lib "ole32" (pUnk As *IUnknown) As BOOL
247
248/* Apartment model inter-thread interface passing helpers */
249Declare Function CoMarshalInterThreadInterfaceInStream Lib "ole32" (ByRef riid As IID, pUnk As *IUnknown, ByRef pStm As *IStream) As HRESULT
250
251Declare Function CoGetInterfaceAndReleaseStream Lib "ole32" (pStm As *IStream, ByRef riid As IID, ByRef ppv As Any) As HRESULT
252Declare Function CoCreateFreeThreadedMarshaler Lib "ole32" (punkOuter As *IUnknown, ByRef punkMarshal As *IUnknown) As HRESULT
253
254/* dll loading helpers; keeps track of ref counts and unloads all on exit */
255
256Declare Function CoLoadLibrary Lib "ole32" (lpszLibName As LPOLESTR, bAutoFree As BOOL) As HINSTANCE
257Declare Sub CoFreeLibrary Lib "ole32" (hInst As HINSTANCE)
258Declare Sub CoFreeAllLibraries Lib "ole32" ()
259Declare Sub CoFreeUnusedLibraries Lib "ole32" ()
260'#if (_WIN32_WINNT >= &h0501)
261Declare Sub CoFreeUnusedLibrariesEx Lib "ole32" (dwUnloadDelay As DWord, dwReserved As DWord)
262'#endif
263
264'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM) 'DCOM
265#ifdef _WIN32_DCOM
266
267/* Call Security. */
268
269Declare Function CoInitializeSecurity Lib "ole32" (
270 ByVal pSecDesc As *SECURITY_DESCRIPTOR,
271 ByVal cAuthSvc As *SOLE_AUTHENTICATION_SERVICE,
272 ByVal pReserved1 As VoidPtr,
273 ByVal dwAuthnLevel As DWord,
274 ByVal dwImpLevel As DWord,
275 ByVal pAuthList As VoidPtr,
276 ByVal dwCapabilities As DWord
277 ByVal pReserved3 As VoidPtr) As HRESULT
278Declare Function CoGetCallContext Lib "ole32" (
279 ByRef riid As IID,
280 ByRef pInterface As Any) As HRESULT
281Declare Function CoQueryProxyBlanket Lib "ole32" (
282 ByVal pProxy As *IUnknown,
283 ByRef AuthnSvc As DWord,
284 ByVal pAuthzSvc As *DWord,
285 ByVal pServerPrincName As **OLECHAR,
286 ByVal pAuthnLevel As *DWord,
287 ByVal pImpLevel As *DWord,
288 ByVal pAuthInfo As *RPC_AUTH_IDENTITY_HANDLE
289 ByVal pCapabilites As *DWord) As HRESULT
290Declare Function CoSetProxyBlanket Lib "ole32" (
291 ByVal pProxy As *IUnknown,
292 ByVal dwAuthnSvc As DWord,
293 ByVal dwAuthzSvc As DWord,
294 ByVal pServerPrincName As *OLECHAR,
295 ByVal dwAuthnLevel As DWord,
296 ByVal dwImpLevel As DWord,
297 ByVal pAuthInfo As RPC_AUTH_IDENTITY_HANDLE,
298 ByVal dwCapabilities As DWord) As HRESULT
299Declare Function CoCopyProxy Lib "ole32" (
300 ByVal pProxySrc As *IUnknown,
301 ByRef pProxyDst As *IUnknown) As HRESULT
302Declare Function CoQueryClientBlanket Lib "ole32" (
303 ByVal pAuthnSvc As *DWord,
304 ByVal pAuthzSvc As *DWord,
305 ByVal pServerPrincName As **OLECHAR,
306 ByVal pAuthnLevel As *DWord,
307 ByVal pImpLevel As *DWord,
308 ByVal pPrivs As *RPC_AUTHZ_HANDLE
309 ByVal pCapabilities As *DWord) As HRESULT
310Declare Function CoImpersonateClient Lib "ole32" () As HRESULT
311Declare Function CoRevertToSelf Lib "ole32" () As HRESULT
312/*
313Declare Function CoRevertToSelf Lib "ole32" (
314 ByRef cAuthSvc As DWord,
315 ByRef asAuthSvc As *SOLE_AUTHENTICATION_SERVICE) As HRESULT
316*/
317Declare Function CoSwitchCallContext Lib "ole32" (
318 ByVal pNewObject As *IUnknown,
319 ByRef ppOldObject As *IUnknown) As HRESULT
320
321Const COM_RIGHTS_EXECUTE = 1
322Const COM_RIGHTS_EXECUTE_LOCAL = 2
323Const COM_RIGHTS_EXECUTE_REMOTE = 4
324Const COM_RIGHTS_ACTIVATE_LOCAL = 8
325Const COM_RIGHTS_ACTIVATE_REMOTE = 16
326
327#endif ' DCOM
328
329Declare Function CoCreateInstance Lib "ole32" (ByRef clsid As CLSID, pUnknown As *IUnknown, dwClsContext As DWord, ByRef refiid As IID, ByRef pObj As Any) As HRESULT
330
331'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM) 'DCOM
332#ifdef _WIN32_DCOM
333Declare Function CoGetInstanceFromFile Lib "ole32" (
334 ByVal pServerInfo As *COSERVERINFO,
335 ByRef clsid As CLSID,
336 ByVal punkOuter As *IUnknown,
337 ByVal dwClsCtx As DWord,
338 ByVal grfMode As DWord,
339 ByVal pwszName As *OLECHAR
340 ByVal dwCount As DWord,
341 ByVal pResults As *MULTI_QI) As HRESULT
342
343Declare Function CoGetInstanceFromIStorage Lib "ole32" (
344 ByVal pServerInfo As *COSERVERINFO,
345 ByRef clsid As CLSID,
346 ByVal punkOuter As *IUnknown,
347 ByVal dwClsCtx As DWord,
348 ByVal grfMode As DWord,
349 ByVal pstg As *IStorage
350 ByVal dwCount As DWord,
351 ByVal pResults As *MULTI_QI) As HRESULT
352
353Declare Function CoCreateInstanceEx Lib "ole32" (
354 ByRef clsid As CLSID,
355 ByVal punkOuter As *IUnknown,
356 ByVal dwClsCtx As DWord,
357 ByVal pServerInfo As COSERVERINFO,
358 ByVal dwCount As DWord,
359 ByVal pResults As *MULTI_QI) As HRESULT
360#endif ' DCOM
361
362/* Call related APIs */
363'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM) 'DCOM
364#ifdef _WIN32_DCOM
365
366Declare Function CoGetCancelObject Lib "ole32" (dwThreadId As DWord, ByRef iid As IID, ByRef pUnk As Any) As HRESULT
367Declare Function CoSetCancelObject Lib "ole32" (pUnk As *IUnknown) As HRESULT
368Declare Function CoCancelCall Lib "ole32" (dwThreadId As DWord, ulTimeout As DWord) As HRESULT
369Declare Function CoTestCancel Lib "ole32" () As HRESULT
370Declare Function CoEnableCallCancellation Lib "ole32" (pReserved As VoidPtr) As HRESULT
371Declare Function CoDisableCallCancellation Lib "ole32" (pReserved As VoidPtr) As HRESULT
372Declare Function CoAllowSetForegroundWindow Lib "ole32" (pUnk As *IUnknown, pvReserved As VoidPtr) As HRESULT
373Declare Function DcomChannelSetHResult Lib "ole32" (pvReserved As HRESULT, pulReserved As DWord, appsHR As HRESULT) As HRESULT
374
375#endif
376
377/* other helpers */
378
379Declare Function StringFromCLSID Lib "ole32" (ByRef rclsid As CLSID, ByRef lpsz As LPOLESTR) As HRESULT
380Declare Function CLSIDFromString Lib "ole32" (lpsz As LPOLESTR, ByRef clsid As CLSID) As HRESULT
381Declare Function StringFromIID Lib "ole32" (ByRef iid As IID, ByRef lpsz As LPOLESTR) As HRESULT
382Declare Function IIDFromString Lib "ole32" (lpsz As LPOLESTR, ByRef iid As IID) As HRESULT
383Declare Function CoIsOle1Class Lib "ole32" (ByRef rclsid As CLSID) As BOOL
384Declare Function ProgIDFromCLSID Lib "ole32" (ByRef clsid As CLSID, ByRef lpszProgID As LPOLESTR) As HRESULT
385Declare Function CLSIDFromProgID Lib "ole32" (lpszProgID As LPCOLESTR, ByRef clsid As CLSID) As HRESULT
386Declare Function CLSIDFromProgIDEx Lib "ole32" (lpszProgID As LPCOLESTR, ByRef clsid As CLSID) As HRESULT
387Declare Function StringFromGUID2 Lib "ole32" (ByRef rguid As GUID, lpsz As LPOLESTR, cchMax As Long) As Long
388
389Declare Function CoCreateGuid Lib "ole32" (ByRef guid As GUID) As HRESULT
390
391Declare Function CoFileTimeToDosDateTime Lib "ole32" (ByRef FileTime As FILETIME, ByRef DosDate As Word, ByRef DosTime As Word) As BOOL
392Declare Function CoDosDateTimeToFileTime Lib "ole32" (nDosDate As Word, nDosTime As Word, ByRef FileTime As FILETIME) As BOOL
393Declare Function CoFileTimeNow Lib "ole32" (ByRef FileTime As FILETIME) As HRESULT
394
395Declare Function CoRegisterMessageFilter Lib "ole32" (pMessageFilter As *IMessageFilter, ByRef pMessageFilter As *IMessageFilter) As HRESULT
396
397'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM) 'DCOM
398#ifdef _WIN32_DCOM
399Declare Function CoRegisterChannelHook Lib "ole32" (ByRef ExtensionUuid As GUID, pChannelHook As *IChannelHook) As HRESULT
400#endif ' DCOM
401
402'#if (_WIN32_WINNT >= &h0400) Or defined(_WIN32_DCOM) 'DCOM
403#ifdef _WIN32_DCOM
404
405Declare Function CoWaitForMultipleHandles Lib "ole32" (
406 ByVal dwFlags As DWord,
407 ByVal dwTimeout As DWord,
408 ByVal cHandles As DWord,
409 ByVal pHandles As *HANDLE,
410 ByRef dwindex As DWord) As HRESULT
411
412/* Flags for Synchronization API and Classes */
413
414Const Enum COWAIT_FLAGS
415 COWAIT_WAITALL = 1
416 COWAIT_ALERTABLE = 2
417 COWAIT_INPUTAVAILABLE = 4
418End Enum
419
420#endif ' DCOM
421
422/* for flushing OLESCM remote binding handles */
423
424#ifdef __UNDECLARED__
425'#if (_WIN32_WINNT >= &h0501)
426Declare Function CoInvalidateRemoteMachineBindings Lib "ole32" (pszMachineName As LPOLESTR) As HRESULT
427#endif
428
429/* TreatAs APIS */
430
431Declare Function CoGetTreatAsClass Lib "ole32" (ByRef clsidOld As CLSID, ByRef ClsidNew As CLSID) As HRESULT
432Declare Function CoTreatAsClass Lib "ole32" (ByRef clsidOld As CLSID, ByRef clsidNew As CLSID) As HRESULT
433
434/* the server dlls must define their DllGetClassObject and DllCanUnloadNow
435 * to match these; the typedefs are located here to ensure all are changed at
436 * the same time.
437 */
438
439TypeDef LPFNGETCLASSOBJECT = *Function(ByRef rclsid As CLSID, ByRef riid As IID, ByRef ppv As Any) As HRESULT
440TypeDef LPFNCANUNLOADNOW = *Function() As HRESULT
441
442/*
443Declare Function DllGetClassObject(ByRef rclsid As CLSID, ByRef riid As IID, ByVal ppv As *VoidPtr) As HRESULT
444Declare Function DllCanUnloadNow() As HRESULT
445*/
446
447/****** Default Memory Allocation ******************************************/
448Declare Function CoTaskMemAlloc Lib "ole32" (cb As SIZE_T) As VoidPtr
449Declare Function CoTaskMemRealloc Lib "ole32" (pv As VoidPtr, cb As SIZE_T) As VoidPtr
450Declare Sub CoTaskMemFree Lib "ole32" (pv As VoidPtr)
451
452/****** DV APIs ***********************************************************/
453
454/* This function is declared in objbase.h and ole2.h */
455Declare Function CreateDataAdviseHolder Lib "ole32" (ByRef pDAHolder As *IDataAdviseHolder) As HRESULT
456Declare Function CreateDataCache Lib "ole32" (pUnkOuter As *IUnknown, ByRef rclsid As CLSID, ByRef riid As IID, ByRef ppv As Any) As HRESULT
457
458/****** Storage API Prototypes ********************************************/
459
460
461Declare Function StgCreateDocfile Lib "ole32" (
462 ByVal pwcsName As *OLECHAR,
463 ByVal grfMode As DWord,
464 ByVal reserved As DWord,
465 ByRef pstgOpen As *IStorage) As HRESULT
466
467Declare Function StgCreateDocfileOnILockBytes Lib "ole32" (
468 ByVal plkbyt As *ILockBytes,
469 ByVal grfMode As DWord,
470 ByVal reserved As DWord,
471 ByRef pstgOpen As *IStorage) As HRESULT
472
473Declare Function StgOpenStorage Lib "ole32" (
474 ByVal pwcsName As *OLECHAR,
475 ByVal pstgPriority As *IStorage,
476 ByVal grfMode As DWord,
477 ByVal snbExclude As SNB,
478 ByVal reserved As DWord,
479 ByRef pstgOpen As *IStorage) As HRESULT
480Declare Function StgOpenStorageOnILockBytes Lib "ole32" (
481 ByVal plkbyt As *ILockBytes,
482 ByVal pstgPriority As *IStorage,
483 ByVal grfMode As DWord,
484 ByVal snbExclude As SNB,
485 ByVal reserved As DWord,
486 ByRef pstgOpen As *IStorage) As HRESULT
487
488Declare Function StgIsStorageFile Lib "ole32" (pwcsName As *OLECHAR) As HRESULT
489Declare Function StgIsStorageILockBytes Lib "ole32" (plkbyt As *ILockBytes) As HRESULT
490
491Declare Function StgSetTimes Lib "ole32" (
492 ByVal pszName As *OLECHAR,
493 ByRef pctime As FILETIME,
494 ByRef patime As FILETIME,
495 ByRef pmtime As FILETIME) As HRESULT
496
497Declare Function StgOpenAsyncDocfileOnIFillLockBytes Lib "ole32" (
498 ByVal pflb As *IFillLockBytes,
499 ByVal grfMode As DWord,
500 ByVal asyncFlags As DWord,
501 ByRef pstgOpen As *IStorage) As HRESULT
502
503Declare Function StgGetIFillLockBytesOnILockBytes Lib "ole32" (
504 ByVal pilb As *ILockBytes,
505 ByRef pflb As *IFillLockBytes) As HRESULT
506
507Declare Function StgGetIFillLockBytesOnFile Lib "ole32" (
508 ByVal pwcsName As *OLECHAR,
509 ByRef pflb As *IFillLockBytes) As HRESULT
510/*
511Declare Function StgOpenLayoutDocfile Lib "ole32" (
512 ByVal pwcsName As *OLECHAR,
513 ByVal grfMode As DWord,
514 ByVal reserved As DWord,
515 ByRef pstgOpen As *IStorage) As HRESULT
516*/
517/*
518// STG initialization options for StgCreateStorageEx and StgOpenStorageEx
519#if _WIN32_WINNT == &h500
520#define STGOPTIONS_VERSION 1
521#elif _WIN32_WINNT > &h500
522#define STGOPTIONS_VERSION 2
523#else
524#define STGOPTIONS_VERSION 0
525#endif
526*/
527Type STGOPTIONS
528 usVersion As Word
529 reserved As Word
530 ulSectorSize As DWord
531'#if STGOPTIONS_VERSION >= 2
532' pwcsTemplateFile As PCWSTR /' version 2 or above
533'#endif
534End Type
535
536Declare Function StgCreateStorageEx Lib "ole32" (
537 ByVal pwcsName As *OLECHAR,
538 ByVal grfMode As DWord,
539 ByVal stgfmt As DWord,
540 ByVal grfAttrs As DWord,
541 ByVal pStgOptions As *STGOPTIONS,
542 ByVal reserved As VoidPtr,
543 ByRef riid As IID,
544 ByRef pObjectOpen As Any) As HRESULT
545
546Declare Function StgOpenStorageEx Lib "ole32" (
547 ByVal pwcsName As *OLECHAR,
548 ByVal grfMode As DWord,
549 ByVal stgfmt As DWord,
550 ByVal grfAttrs As DWord,
551 ByVal pStgOptions As *STGOPTIONS,
552 ByVal reserved As VoidPtr,
553 ByRef riid As IID,
554 ByRef pObjectOpen As Any) As HRESULT
555
556
557' Moniker APIs
558
559Declare Function BindMoniker Lib "ole32" (pmk As *IMoniker, grfOpt As DWord, ByRef iidResult As IID, ByRef pvResult As Any) As HRESULT
560/*
561Declare Function CoInstall Lib "ole32" (
562 ByVal pbc As *IBindCtx,
563 ByVal dwFlags As DWord,
564 ByRef pClassSpec As uCLSSPEC,
565 ByRef pQuery As QUERYCONTEXT,
566 ByVal pszCodeBase As PWSTR) As HRESULT
567*/
568Declare Function CoGetObject Lib "ole32" (pszName As PCWSTR, pBindOptions As *BIND_OPTS, ByRef riid As IID, ByRef ppv As Any) As HRESULT
569Declare Function MkParseDisplayName Lib "ole32" (pbc As *IBindCtx, szUserName As LPCOLESTR, ByRef pchEaten As DWord, ByRef pmk As *IMoniker) As HRESULT
570Declare Function MonikerRelativePathTo Lib "ole32" (pmkSrc As *IMoniker, pmkDest As *IMoniker, ByRef pmkRelPath As *IMoniker, dwReserved As BOOL) As HRESULT
571Declare Function MonikerCommonPrefixWith Lib "ole32" (pmkThis As *IMoniker, pmkOther As *IMoniker, ByRef ppmkCommon As *IMoniker) As HRESULT
572Declare Function CreateBindCtx Lib "ole32" (reserved As DWord, ByRef pbc As *IBindCtx) As HRESULT
573Declare Function CreateGenericComposite Lib "ole32" ( pmkFirst As *IMoniker, pmkRest As *IMoniker, ByRef pmkComposite As *IMoniker) As HRESULT
574Declare Function GetClassFile Lib "ole32" (szFilename As LPCOLESTR, ByRef clsid As CLSID) As HRESULT
575Declare Function CreateClassMoniker Lib "ole32" (ByRef rclsid As CLSID, ByRef pmk As *IMoniker) As HRESULT
576Declare Function CreateFileMoniker Lib "ole32" (lpszPathName As LPCOLESTR, ByRef pmk As *IMoniker) As HRESULT
577Declare Function CreateItemMoniker Lib "ole32" (lpszDelim As LPCOLESTR, lpszItem As LPCOLESTR, ByRef pmk As *IMoniker) As HRESULT
578Declare Function CreateAntiMoniker Lib "ole32" (ByRef pmk As *IMoniker) As HRESULT
579Declare Function CreatePointerMoniker Lib "ole32" (punk As *IUnknown, ByRef pmk As *IMoniker) As HRESULT
580Declare Function CreateObjrefMoniker Lib "ole32" (punk As *IUnknown, ByRef pmk As *IMoniker) As HRESULT
581Declare Function GetRunningObjectTable Lib "ole32" (reserved As DWord, ByRef prot As *IRunningObjectTable) As HRESULT
582
583Interface IBindStatusCallback ' urlmon.sbp
584 Inherits IUnknown
585End Interface
586'#include <urlmon.sbp>
587'#include <propidl.sbp>
588
589' Standard Progress Indicator impolementation
590
591Declare Function CreateStdProgressIndicator Lib "ole32" (
592 ByVal hwndParent As HWND,
593 ByVal pszTitle As LPCOLESTR,
594 ByVal pIbscCaller As *IBindStatusCallback,
595 ByRef pIbsc As *IBindStatusCallback) As HRESULT
596
597
598#endif '_INC_OBJBASE
Note: See TracBrowser for help on using the repository browser.