source: trunk/Include/objbase.sbp@ 334

Last change on this file since 334 was 303, checked in by イグトランス (egtra), 17 years ago

フルコンパイルでのミスあぶり出し。註:修正は全て@300や@301以前に行われた。

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