From 889edacdad297bc0f7bf5395fba05bd756fa5106 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 16 Aug 2013 22:05:23 +0000 Subject: [PATCH] [PSDK] * Annotate objbase.h. svn path=/trunk/; revision=59756 --- reactos/include/psdk/objbase.h | 724 ++++++++++++++++++++++++++++----- 1 file changed, 628 insertions(+), 96 deletions(-) diff --git a/reactos/include/psdk/objbase.h b/reactos/include/psdk/objbase.h index e9295de6cf3..1db973dc8a7 100644 --- a/reactos/include/psdk/objbase.h +++ b/reactos/include/psdk/objbase.h @@ -322,37 +322,108 @@ typedef enum tagCOINIT COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */ } COINIT; -HRESULT WINAPI CoInitialize(LPVOID lpReserved); -HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit); +_Check_return_ HRESULT WINAPI CoInitialize(_In_opt_ LPVOID lpReserved); + +_Check_return_ +HRESULT +WINAPI +CoInitializeEx( + _In_opt_ LPVOID lpReserved, + _In_ DWORD dwCoInit); + void WINAPI CoUninitialize(void); DWORD WINAPI CoGetCurrentProcess(void); -HINSTANCE WINAPI CoLoadLibrary(LPOLESTR lpszLibName, BOOL bAutoFree); +HINSTANCE WINAPI CoLoadLibrary(_In_ LPOLESTR lpszLibName, _In_ BOOL bAutoFree); void WINAPI CoFreeAllLibraries(void); -void WINAPI CoFreeLibrary(HINSTANCE hLibrary); +void WINAPI CoFreeLibrary(_In_ HINSTANCE hLibrary); void WINAPI CoFreeUnusedLibraries(void); -void WINAPI CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved); -HRESULT WINAPI CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv); -HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid, - LPUNKNOWN pUnkOuter, - DWORD dwClsContext, - COSERVERINFO* pServerInfo, - ULONG cmq, - MULTI_QI* pResults); +void +WINAPI +CoFreeUnusedLibrariesEx( + _In_ DWORD dwUnloadDelay, + _In_ DWORD dwReserved); -HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, DWORD grfMode, OLECHAR* pwszName, DWORD dwCount, MULTI_QI* pResults); -HRESULT WINAPI CoGetInstanceFromIStorage(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, IStorage* pstg, DWORD dwCount, MULTI_QI* pResults); +_Check_return_ +HRESULT +WINAPI +CoCreateInstance( + _In_ REFCLSID rclsid, + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ DWORD dwClsContext, + _In_ REFIID iid, + _Outptr_ _At_(*ppv, _Post_readable_size_(_Inexpressible_(varies))) LPVOID *ppv); -HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC* lpMalloc); -LPVOID WINAPI CoTaskMemAlloc(ULONG size) __WINE_ALLOC_SIZE(1); -void WINAPI CoTaskMemFree(LPVOID ptr); -LPVOID WINAPI CoTaskMemRealloc(LPVOID ptr, ULONG size); +_Check_return_ +HRESULT +WINAPI +CoCreateInstanceEx( + _In_ REFCLSID rclsid, + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ DWORD dwClsContext, + _In_opt_ COSERVERINFO *pServerInfo, + _In_ ULONG cmq, + _Inout_updates_(cmq) MULTI_QI *pResults); -HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy); +_Check_return_ +HRESULT +WINAPI +CoGetInstanceFromFile( + _In_opt_ COSERVERINFO *pServerInfo, + _In_opt_ CLSID *pClsid, + _In_opt_ IUnknown *punkOuter, + _In_ DWORD dwClsCtx, + _In_ DWORD grfMode, + _In_ _Null_terminated_ OLECHAR *pwszName, + _In_ DWORD dwCount, + _Inout_updates_(dwCount) MULTI_QI *pResults); + +_Check_return_ +HRESULT +WINAPI +CoGetInstanceFromIStorage( + _In_opt_ COSERVERINFO *pServerInfo, + _In_opt_ CLSID *pClsid, + _In_opt_ IUnknown *punkOuter, + _In_ DWORD dwClsCtx, + _In_ IStorage *pstg, + _In_ DWORD dwCount, + _Inout_updates_(dwCount) MULTI_QI *pResults); + +_Check_return_ +HRESULT +WINAPI +CoGetMalloc( + _In_ DWORD dwMemContext, + _Outptr_ LPMALLOC *lpMalloc); + +_Ret_opt_ +_Post_writable_byte_size_(size) +__drv_allocatesMem(Mem) +_Check_return_ +LPVOID +WINAPI +CoTaskMemAlloc(_In_ ULONG size) __WINE_ALLOC_SIZE(1); + +void +WINAPI +CoTaskMemFree( + _In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr); + +_Ret_opt_ +_Post_writable_byte_size_(size) +_When_(size > 0, __drv_allocatesMem(Mem) _Check_return_) +LPVOID +WINAPI +CoTaskMemRealloc( + _In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr, + _In_ ULONG size); + +HRESULT WINAPI CoRegisterMallocSpy(_In_ LPMALLOCSPY pMallocSpy); HRESULT WINAPI CoRevokeMallocSpy(void); -HRESULT WINAPI CoGetContextToken( ULONG_PTR *token ); +_Check_return_ HRESULT WINAPI CoGetContextToken(_Out_ ULONG_PTR *token); /* class registration flags; passed to CoRegisterClassObject */ typedef enum tagREGCLS @@ -364,60 +435,286 @@ typedef enum tagREGCLS REGCLS_SURROGATE = 8 } REGCLS; -HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv); -HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsContext,DWORD flags,LPDWORD lpdwRegister); -HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister); -HRESULT WINAPI CoGetPSClsid(REFIID riid,CLSID *pclsid); -HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid); -HRESULT WINAPI CoRegisterSurrogate(LPSURROGATE pSurrogate); -HRESULT WINAPI CoSuspendClassObjects(void); -HRESULT WINAPI CoResumeClassObjects(void); +_Check_return_ +HRESULT +WINAPI +CoGetClassObject( + _In_ REFCLSID rclsid, + _In_ DWORD dwClsContext, + _In_opt_ COSERVERINFO *pServerInfo, + _In_ REFIID iid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoRegisterClassObject( + _In_ REFCLSID rclsid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwClsContext, + _In_ DWORD flags, + _Out_ LPDWORD lpdwRegister); + +_Check_return_ +HRESULT +WINAPI +CoRevokeClassObject( + _In_ DWORD dwRegister); + +_Check_return_ +HRESULT +WINAPI +CoGetPSClsid( + _In_ REFIID riid, + _Out_ CLSID *pclsid); + +_Check_return_ +HRESULT +WINAPI +CoRegisterPSClsid( + _In_ REFIID riid, + _In_ REFCLSID rclsid); + +_Check_return_ HRESULT WINAPI CoRegisterSurrogate(_In_ LPSURROGATE pSurrogate); +_Check_return_ HRESULT WINAPI CoSuspendClassObjects(void); +_Check_return_ HRESULT WINAPI CoResumeClassObjects(void); ULONG WINAPI CoAddRefServerProcess(void); ULONG WINAPI CoReleaseServerProcess(void); /* marshalling */ -HRESULT WINAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter, LPUNKNOWN* ppunkMarshal); -HRESULT WINAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID iid, LPVOID* ppv); -HRESULT WINAPI CoGetMarshalSizeMax(ULONG* pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags); -HRESULT WINAPI CoGetStandardMarshal(REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL* ppMarshal); -HRESULT WINAPI CoMarshalHresult(LPSTREAM pstm, HRESULT hresult); -HRESULT WINAPI CoMarshalInterface(LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags); -HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM* ppStm); -HRESULT WINAPI CoReleaseMarshalData(LPSTREAM pStm); -HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved); -HRESULT WINAPI CoUnmarshalHresult(LPSTREAM pstm, HRESULT* phresult); -HRESULT WINAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID* ppv); -HRESULT WINAPI CoLockObjectExternal(LPUNKNOWN pUnk, BOOL fLock, BOOL fLastUnlockReleases); -BOOL WINAPI CoIsHandlerConnected(LPUNKNOWN pUnk); + +_Check_return_ +HRESULT +WINAPI +CoCreateFreeThreadedMarshaler( + _In_opt_ LPUNKNOWN punkOuter, + _Outptr_ LPUNKNOWN *ppunkMarshal); + +_Check_return_ +HRESULT +WINAPI +CoGetInterfaceAndReleaseStream( + _In_ LPSTREAM pStm, + _In_ REFIID iid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoGetMarshalSizeMax( + _Out_ ULONG *pulSize, + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags); + +_Check_return_ +HRESULT +WINAPI +CoGetStandardMarshal( + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags, + _Outptr_ LPMARSHAL *ppMarshal); + +HRESULT WINAPI CoMarshalHresult(_In_ LPSTREAM pstm, _In_ HRESULT hresult); + +_Check_return_ +HRESULT +WINAPI +CoMarshalInterface( + _In_ LPSTREAM pStm, + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _In_ DWORD dwDestContext, + _In_opt_ LPVOID pvDestContext, + _In_ DWORD mshlflags); + +_Check_return_ +HRESULT +WINAPI +CoMarshalInterThreadInterfaceInStream( + _In_ REFIID riid, + _In_ LPUNKNOWN pUnk, + _Outptr_ LPSTREAM *ppStm); + +_Check_return_ HRESULT WINAPI CoReleaseMarshalData(_In_ LPSTREAM pStm); + +_Check_return_ +HRESULT +WINAPI +CoDisconnectObject( + _In_ LPUNKNOWN lpUnk, + _In_ DWORD reserved); + +HRESULT WINAPI CoUnmarshalHresult(_In_ LPSTREAM pstm, _Out_ HRESULT *phresult); + +_Check_return_ +HRESULT +WINAPI +CoUnmarshalInterface( + _In_ LPSTREAM pStm, + _In_ REFIID riid, + _Outptr_ LPVOID *ppv); + +_Check_return_ +HRESULT +WINAPI +CoLockObjectExternal( + _In_ LPUNKNOWN pUnk, + _In_ BOOL fLock, + _In_ BOOL fLastUnlockReleases); + +BOOL WINAPI CoIsHandlerConnected(_In_ LPUNKNOWN pUnk); /* security */ -HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE* asAuthSvc, void* pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void* pReserved2, DWORD dwCapabilities, void* pReserved3); -HRESULT WINAPI CoGetCallContext(REFIID riid, void** ppInterface); -HRESULT WINAPI CoSwitchCallContext(IUnknown *pContext, IUnknown **ppOldContext); -HRESULT WINAPI CoQueryAuthenticationServices(DWORD* pcAuthSvc, SOLE_AUTHENTICATION_SERVICE** asAuthSvc); -HRESULT WINAPI CoQueryProxyBlanket(IUnknown* pProxy, DWORD* pwAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTH_IDENTITY_HANDLE* pAuthInfo, DWORD* pCapabilities); -HRESULT WINAPI CoSetProxyBlanket(IUnknown* pProxy, DWORD dwAuthnSvc, DWORD dwAuthzSvc, OLECHAR* pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities); -HRESULT WINAPI CoCopyProxy(IUnknown* pProxy, IUnknown** ppCopy); +_Check_return_ +HRESULT +WINAPI +CoInitializeSecurity( + _In_opt_ PSECURITY_DESCRIPTOR pSecDesc, + _In_ LONG cAuthSvc, + _In_reads_opt_(cAuthSvc) SOLE_AUTHENTICATION_SERVICE *asAuthSvc, + _In_opt_ void *pReserved1, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_opt_ void *pReserved2, + _In_ DWORD dwCapabilities, + _In_opt_ void *pReserved3); -HRESULT WINAPI CoImpersonateClient(void); -HRESULT WINAPI CoQueryClientBlanket(DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTHZ_HANDLE* pPrivs, DWORD* pCapabilities); -HRESULT WINAPI CoRevertToSelf(void); +_Check_return_ +HRESULT +WINAPI +CoGetCallContext( + _In_ REFIID riid, + _Outptr_ void **ppInterface); + +_Check_return_ +HRESULT +WINAPI +CoSwitchCallContext( + _In_opt_ IUnknown *pContext, + _Outptr_ IUnknown **ppOldContext); + +_Check_return_ +HRESULT +WINAPI +CoQueryAuthenticationServices( + _Out_ DWORD *pcAuthSvc, + _Outptr_result_buffer_(*pcAuthSvc) SOLE_AUTHENTICATION_SERVICE **asAuthSvc); + +_Check_return_ +HRESULT +WINAPI +CoQueryProxyBlanket( + _In_ IUnknown *pProxy, + _Out_opt_ DWORD *pwAuthnSvc, + _Out_opt_ DWORD *pAuthzSvc, + _Outptr_opt_ OLECHAR **pServerPrincName, + _Out_opt_ DWORD *pAuthnLevel, + _Out_opt_ DWORD *pImpLevel, + _Out_opt_ RPC_AUTH_IDENTITY_HANDLE *pAuthInfo, + _Out_opt_ DWORD *pCapabilities); + +_Check_return_ +HRESULT +WINAPI +CoSetProxyBlanket( + _In_ IUnknown *pProxy, + _In_ DWORD dwAuthnSvc, + _In_ DWORD dwAuthzSvc, + _In_opt_ OLECHAR *pServerPrincName, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_opt_ RPC_AUTH_IDENTITY_HANDLE pAuthInfo, + _In_ DWORD dwCapabilities); + +_Check_return_ +HRESULT +WINAPI CoCopyProxy( + _In_ IUnknown *pProxy, + _Outptr_ IUnknown **ppCopy); + +_Check_return_ HRESULT WINAPI CoImpersonateClient(void); + +_Check_return_ +HRESULT +WINAPI +CoQueryClientBlanket( + _Out_opt_ DWORD *pAuthnSvc, + _Out_opt_ DWORD *pAuthzSvc, + _Outptr_opt_ OLECHAR **pServerPrincName, + _Out_opt_ DWORD *pAuthnLevel, + _Out_opt_ DWORD *pImpLevel, + _Outptr_opt_ RPC_AUTHZ_HANDLE *pPrivs, + _Inout_opt_ DWORD *pCapabilities); + +_Check_return_ HRESULT WINAPI CoRevertToSelf(void); /* misc */ -HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew); -HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew); -HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, LPVOID lpvReserved); -HRESULT WINAPI CoGetObjectContext(REFIID riid, LPVOID *ppv); -HRESULT WINAPI CoCreateGuid(GUID* pguid); -BOOL WINAPI CoIsOle1Class(REFCLSID rclsid); +_Check_return_ +HRESULT +WINAPI +CoGetTreatAsClass( + _In_ REFCLSID clsidOld, + _Out_ LPCLSID pClsidNew); -BOOL WINAPI CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime, FILETIME* lpFileTime); -BOOL WINAPI CoFileTimeToDosDateTime(FILETIME* lpFileTime, WORD* lpDosDate, WORD* lpDosTime); -HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime); -HRESULT WINAPI CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter); -HRESULT WINAPI CoRegisterChannelHook(REFGUID ExtensionGuid, IChannelHook *pChannelHook); +_Check_return_ +HRESULT +WINAPI +CoTreatAsClass( + _In_ REFCLSID clsidOld, + _In_ REFCLSID clsidNew); + +HRESULT +WINAPI +CoAllowSetForegroundWindow( + _In_ IUnknown *pUnk, + _In_opt_ LPVOID lpvReserved); + +_Check_return_ +HRESULT +WINAPI +CoGetObjectContext( + _In_ REFIID riid, + _Outptr_ LPVOID *ppv); + +_Check_return_ HRESULT WINAPI CoCreateGuid(_Out_ GUID *pguid); +BOOL WINAPI CoIsOle1Class(_In_ REFCLSID rclsid); + +BOOL +WINAPI +CoDosDateTimeToFileTime( + _In_ WORD nDosDate, + _In_ WORD nDosTime, + _Out_ FILETIME *lpFileTime); + +BOOL +WINAPI +CoFileTimeToDosDateTime( + _In_ FILETIME *lpFileTime, + _Out_ WORD *lpDosDate, + _Out_ WORD *lpDosTime); + +HRESULT WINAPI CoFileTimeNow(_Out_ FILETIME *lpFileTime); + +_Check_return_ +HRESULT +WINAPI +CoRegisterMessageFilter( + _In_opt_ LPMESSAGEFILTER lpMessageFilter, + _Outptr_opt_result_maybenull_ LPMESSAGEFILTER *lplpMessageFilter); + +HRESULT +WINAPI +CoRegisterChannelHook( + _In_ REFGUID ExtensionGuid, + _In_ IChannelHook *pChannelHook); typedef enum tagCOWAIT_FLAGS { @@ -425,22 +722,68 @@ typedef enum tagCOWAIT_FLAGS COWAIT_ALERTABLE = 0x00000002 } COWAIT_FLAGS; -HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags,DWORD dwTimeout,ULONG cHandles,LPHANDLE pHandles,LPDWORD lpdwindex); +_Check_return_ +HRESULT +WINAPI +CoWaitForMultipleHandles( + _In_ DWORD dwFlags, + _In_ DWORD dwTimeout, + _In_ ULONG cHandles, + _In_reads_(cHandles) LPHANDLE pHandles, + _Out_ LPDWORD lpdwindex); /***************************************************************************** * GUID API */ -HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR*); -HRESULT WINAPI CLSIDFromString(LPCOLESTR, LPCLSID); -HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid); -HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID); -INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax); +_Check_return_ +HRESULT +WINAPI +StringFromCLSID( + _In_ REFCLSID id, + _Outptr_ LPOLESTR*); + +_Check_return_ +HRESULT +WINAPI +CLSIDFromString( + _In_ LPCOLESTR, + _Out_ LPCLSID); + +_Check_return_ +HRESULT +WINAPI +CLSIDFromProgID( + _In_ LPCOLESTR progid, + _Out_ LPCLSID riid); + +_Check_return_ +HRESULT +WINAPI +ProgIDFromCLSID( + _In_ REFCLSID clsid, + _Outptr_ LPOLESTR *lplpszProgID); + +_Check_return_ +INT +WINAPI +StringFromGUID2( + _In_ REFGUID id, + _Out_writes_to_(cmax, return) LPOLESTR str, + _In_ INT cmax); /***************************************************************************** * COM Server dll - exports */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN; + +_Check_return_ +HRESULT +WINAPI +DllGetClassObject( + _In_ REFCLSID rclsid, + _In_ REFIID riid, + _Outptr_ LPVOID *ppv) DECLSPEC_HIDDEN; + HRESULT WINAPI DllCanUnloadNow(void) DECLSPEC_HIDDEN; /* shouldn't be here, but is nice for type checking */ @@ -453,27 +796,134 @@ HRESULT WINAPI DllUnregisterServer(void) DECLSPEC_HIDDEN; /***************************************************************************** * Data Object */ -HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder); -HRESULT WINAPI CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid, REFIID iid, LPVOID* ppv); + +HRESULT +WINAPI +CreateDataAdviseHolder( + _Outptr_ LPDATAADVISEHOLDER *ppDAHolder); + +HRESULT +WINAPI +CreateDataCache( + _In_opt_ LPUNKNOWN pUnkOuter, + _In_ REFCLSID rclsid, + _In_ REFIID iid, + _Out_ LPVOID *ppv); /***************************************************************************** * Moniker API */ -HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult, LPVOID* ppvResult); -HRESULT WINAPI CoGetObject(LPCWSTR pszName, BIND_OPTS *pBindOptions, REFIID riid, void **ppv); -HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk); -HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC* ppbc); -HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, LPMONIKER* ppmk); -HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, LPMONIKER* ppmk); -HRESULT WINAPI CreateGenericComposite(LPMONIKER pmkFirst, LPMONIKER pmkRest, LPMONIKER* ppmkComposite); -HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, LPMONIKER* ppmk); -HRESULT WINAPI CreateObjrefMoniker(LPUNKNOWN punk, LPMONIKER * ppmk); -HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER * ppmk); -HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid); -HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot); -HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szUserName, ULONG * pchEaten, LPMONIKER * ppmk); -HRESULT WINAPI MonikerCommonPrefixWith(IMoniker* pmkThis,IMoniker* pmkOther,IMoniker** ppmkCommon); -HRESULT WINAPI MonikerRelativePathTo(LPMONIKER pmkSrc, LPMONIKER pmkDest, LPMONIKER * ppmkRelPath, BOOL dwReserved); + +_Check_return_ +HRESULT +WINAPI +BindMoniker( + _In_ LPMONIKER pmk, + _In_ DWORD grfOpt, + _In_ REFIID iidResult, + _Outptr_ LPVOID *ppvResult); + +_Check_return_ +HRESULT +WINAPI +CoGetObject( + _In_ LPCWSTR pszName, + _In_opt_ BIND_OPTS *pBindOptions, + _In_ REFIID riid, + _Outptr_ void **ppv); + +_Check_return_ HRESULT WINAPI CreateAntiMoniker(_Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateBindCtx( + _In_ DWORD reserved, + _Outptr_ LPBC *ppbc); + +_Check_return_ +HRESULT +WINAPI +CreateClassMoniker( + _In_ REFCLSID rclsid, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateFileMoniker( + _In_ LPCOLESTR lpszPathName, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateGenericComposite( + _In_opt_ LPMONIKER pmkFirst, + _In_opt_ LPMONIKER pmkRest, + _Outptr_ LPMONIKER *ppmkComposite); + +_Check_return_ +HRESULT +WINAPI +CreateItemMoniker( + _In_ LPCOLESTR lpszDelim, + _In_ LPCOLESTR lpszItem, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreateObjrefMoniker( + _In_opt_ LPUNKNOWN punk, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +CreatePointerMoniker( + _In_opt_ LPUNKNOWN punk, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +GetClassFile( + _In_ LPCOLESTR filePathName, + _Out_ CLSID *pclsid); + +_Check_return_ +HRESULT +WINAPI +GetRunningObjectTable( + _In_ DWORD reserved, + _Outptr_ LPRUNNINGOBJECTTABLE *pprot); + +_Check_return_ +HRESULT +WINAPI +MkParseDisplayName( + _In_ LPBC pbc, + _In_ LPCOLESTR szUserName, + _Out_ ULONG *pchEaten, + _Outptr_ LPMONIKER *ppmk); + +_Check_return_ +HRESULT +WINAPI +MonikerCommonPrefixWith( + _In_ IMoniker *pmkThis, + _In_ IMoniker *pmkOther, + _Outptr_ IMoniker **ppmkCommon); + +_Check_return_ +HRESULT +WINAPI +MonikerRelativePathTo( + _In_ LPMONIKER pmkSrc, + _In_ LPMONIKER pmkDest, + _Outptr_ LPMONIKER *ppmkRelPath, + _In_ BOOL dwReserved); /***************************************************************************** * Storage API @@ -510,17 +960,99 @@ typedef struct tagSTGOPTIONS const WCHAR* pwcsTemplateFile; } STGOPTIONS; -HRESULT WINAPI StringFromIID(REFIID rclsid, LPOLESTR *lplpsz); -HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName,DWORD grfMode,DWORD reserved,IStorage **ppstgOpen); -HRESULT WINAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**); -HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn); -HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt); -HRESULT WINAPI StgOpenStorage(const OLECHAR* pwcsName,IStorage* pstgPriority,DWORD grfMode,SNB snbExclude,DWORD reserved,IStorage**ppstgOpen); -HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcwName,DWORD grfMode,DWORD stgfmt,DWORD grfAttrs,STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen); +_Check_return_ +HRESULT +WINAPI +StringFromIID( + _In_ REFIID rclsid, + _Outptr_ LPOLESTR *lplpsz); -HRESULT WINAPI StgCreateDocfileOnILockBytes(ILockBytes *plkbyt,DWORD grfMode, DWORD reserved, IStorage** ppstgOpen); -HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen); -HRESULT WINAPI StgSetTimes( OLECHAR const *lpszName, FILETIME const *pctime, FILETIME const *patime, FILETIME const *pmtime); +_Check_return_ +HRESULT +WINAPI +StgCreateDocfile( + _In_opt_ _Null_terminated_ LPCOLESTR pwcsName, + _In_ DWORD grfMode, + _Reserved_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgCreateStorageEx( + _In_opt_ _Null_terminated_ const WCHAR*, + _In_ DWORD, + _In_ DWORD, + _In_ DWORD, + _Inout_opt_ STGOPTIONS*, + _In_opt_ void*, + _In_ REFIID, + _Outptr_ void**); + +_Check_return_ +HRESULT +WINAPI +StgIsStorageFile( + _In_ _Null_terminated_ LPCOLESTR fn); + +_Check_return_ +HRESULT +WINAPI +StgIsStorageILockBytes( + _In_ ILockBytes *plkbyt); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorage( + _In_opt_ _Null_terminated_ const OLECHAR *pwcsName, + _In_opt_ IStorage *pstgPriority, + _In_ DWORD grfMode, + _In_opt_z_ SNB snbExclude, + _In_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorageEx( + _In_ _Null_terminated_ const WCHAR *pwcwName, + _In_ DWORD grfMode, + _In_ DWORD stgfmt, + _In_ DWORD grfAttrs, + _Inout_opt_ STGOPTIONS *pStgOptions, + _In_opt_ void *reserved, + _In_ REFIID riid, + _Outptr_ void **ppObjectOpen); + +_Check_return_ +HRESULT +WINAPI +StgCreateDocfileOnILockBytes( + _In_ ILockBytes *plkbyt, + _In_ DWORD grfMode, + _In_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgOpenStorageOnILockBytes( + _In_ ILockBytes *plkbyt, + _In_opt_ IStorage *pstgPriority, + _In_ DWORD grfMode, + _In_opt_z_ SNB snbExclude, + _Reserved_ DWORD reserved, + _Outptr_ IStorage **ppstgOpen); + +_Check_return_ +HRESULT +WINAPI +StgSetTimes( + _In_ _Null_terminated_ OLECHAR const *lpszName, + _In_opt_ FILETIME const *pctime, + _In_opt_ FILETIME const *patime, + _In_opt_ FILETIME const *pmtime); #ifdef __cplusplus }