source: branch/egtra-stream-without-en_dec/objbase.sbp@ 682

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

インクルードガードとその他不要な前処理定義などの削除

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