#include <winapifamily.h>
#include <rpc.h>
#include <rpcndr.h>
#if !defined( _OBJBASE_H_ )
#define _OBJBASE_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <pshpack8.h>
#include <combaseapi.h>
#include <coml2api.h>
typedef
enum
{
=
0x2
,
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
=
,
=
0x4
,
=
0x8
,
#endif // DCOM
}
;
#define MARSHALINTERFACE_MIN 500 // minimum number of bytes for interface marshal
#define ASYNC_MODE_COMPATIBILITY 0x00000001L
#define ASYNC_MODE_DEFAULT 0x00000000L
#define STGTY_REPEAT 0x00000100L
#define STG_TOEND 0xFFFFFFFFL
#define STG_LAYOUT_SEQUENTIAL 0x00000000L
#define STG_LAYOUT_INTERLEAVED 0x00000001L
#include <objidl.h>
#ifdef _OLE32_
#ifdef _OLE32PRIV_
BOOL _fastcall wIsEqualGUID(REFGUID rguid1, REFGUID rguid2);
#define IsEqualGUID(rguid1, rguid2) wIsEqualGUID(rguid1, rguid2)
#else
#define __INLINE_ISEQUAL_GUID
#endif // _OLE32PRIV_
#endif // _OLE32_
#pragma region Desktop Partition
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINOLEAPI_(DWORD) CoBuildVersion( VOID );
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
);
_Check_return_ WINOLEAPI CoInitialize(_In_opt_ LPVOID pvReserved);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#define COM_SUPPORT_MALLOC_SPIES
_Check_return_ WINOLEAPI CoRegisterMallocSpy(_In_ LPMALLOCSPY pMallocSpy);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
_Check_return_ WINOLEAPI CoRevokeMallocSpy(void);
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
);
WINOLEAPI CoCreateStandardMalloc(_In_ DWORD memctx, _Outptr_ IMalloc FAR* FAR* ppMalloc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
* *
);
#if (_WIN32_WINNT >= 0x0501)
_Check_return_ WINOLEAPI CoRegisterInitializeSpy(_In_ IInitializeSpy *pSpy, _Out_ ULARGE_INTEGER *puliCookie);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
_Check_return_ WINOLEAPI CoRevokeInitializeSpy(_In_ ULARGE_INTEGER uliCookie);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
typedef
enum
{
=
0
,
=
1
,
=
2
,
=
3
}
;
_Check_return_ WINOLEAPI CoGetSystemSecurityPermissions(COMSD comSDType, PSECURITY_DESCRIPTOR *ppSD);
extern
"C"
__declspec
(dllimport)
__stdcall
CoGetSystemSecurityPermissions
(
,
*
);
#endif
WINOLEAPI_(HINSTANCE) CoLoadLibrary(_In_ LPOLESTR lpszLibName, _In_ BOOL bAutoFree);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
WINOLEAPI_(void) CoFreeLibrary(_In_ HINSTANCE hInst);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
WINOLEAPI_(void) CoFreeAllLibraries(void);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
void
);
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
_Check_return_ WINOLEAPI CoGetInstanceFromFile(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ COSERVERINFO * pServerInfo,
_In_opt_ IUnknown * punkOuter, // only relevant locally
_In_ _Null_terminated_ OLECHAR * pwszName,
_Inout_updates_(dwCount) MULTI_QI * pResults );
_Check_return_ WINOLEAPI CoGetInstanceFromIStorage(
extern
"C"
__declspec
(dllimport)
__stdcall
CoGetInstanceFromIStorage
(
_In_opt_ COSERVERINFO * pServerInfo,
_In_opt_ IUnknown * punkOuter, // only relevant locally
_In_ struct IStorage * pstg,
_Inout_updates_(dwCount) MULTI_QI * pResults );
#endif // DCOM
#if (_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM) // DCOM
WINOLEAPI CoAllowSetForegroundWindow(_In_ IUnknown *pUnk, _In_opt_ LPVOID lpvReserved);
extern
"C"
__declspec
(dllimport)
__stdcall
CoAllowSetForegroundWindow
(
*
,
);
WINOLEAPI DcomChannelSetHResult(_In_opt_ LPVOID pvReserved, _In_opt_ ULONG* pulReserved, _In_ HRESULT appsHR);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
);
#endif
WINOLEAPI_(BOOL) CoIsOle1Class(_In_ REFCLSID rclsid);
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
&
);
_Check_return_ WINOLEAPI CLSIDFromProgIDEx (_In_ LPCOLESTR lpszProgID, _Out_ LPCLSID lpclsid);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_ FILETIME FAR* lpFileTime, _Out_ LPWORD lpDosDate, _Out_ LPWORD lpDosTime);
WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_ WORD nDosDate, _In_ WORD nDosTime, _Out_ FILETIME FAR* lpFileTime);
WINOLEAPI CoFileTimeNow( _Out_ FILETIME FAR* lpFileTime );
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
_Check_return_ WINOLEAPI CoRegisterMessageFilter( _In_opt_ LPMESSAGEFILTER lpMessageFilter,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
_Outptr_opt_result_maybenull_ LPMESSAGEFILTER FAR* lplpMessageFilter );
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
WINOLEAPI CoRegisterChannelHook( _In_ REFGUID ExtensionUuid, _In_ IChannelHook *pChannelHook );
#endif // DCOM
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
&
,
*
);
_Check_return_ WINOLEAPI CoTreatAsClass(_In_ REFCLSID clsidOld, _In_ REFCLSID clsidNew);
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
&
,
const
&
);
WINOLEAPI CreateDataAdviseHolder(_Outptr_ LPDATAADVISEHOLDER FAR* ppDAHolder);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
WINOLEAPI CreateDataCache(_In_opt_ LPUNKNOWN pUnkOuter, _In_ REFCLSID rclsid,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
const
&
,
_In_ REFIID iid, _Out_ LPVOID FAR* ppv);
_Check_return_ WINOLEAPI StgOpenAsyncDocfileOnIFillLockBytes( _In_ IFillLockBytes *pflb,
extern
"C"
__declspec
(dllimport)
__stdcall
StgOpenAsyncDocfileOnIFillLockBytes
(
*
,
_Outptr_ IStorage** ppstgOpen);
_Check_return_ WINOLEAPI StgGetIFillLockBytesOnILockBytes( _In_ ILockBytes *pilb,
extern
"C"
__declspec
(dllimport)
__stdcall
StgGetIFillLockBytesOnILockBytes
(
*
,
_Outptr_ IFillLockBytes** ppflb);
_Check_return_ WINOLEAPI StgGetIFillLockBytesOnFile(_In_ _Null_terminated_ OLECHAR const *pwcsName,
extern
"C"
__declspec
(dllimport)
__stdcall
StgGetIFillLockBytesOnFile
(
const
*
,
_Outptr_ IFillLockBytes** ppflb);
_Check_return_ WINOLEAPI StgOpenLayoutDocfile(_In_ _Null_terminated_ OLECHAR const *pwcsDfName,
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
*
,
_Outptr_ IStorage** ppstgOpen);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Partition
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINOLEAPI CoInstall(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_ uCLSSPEC * pClassSpec,
_In_ QUERYCONTEXT * pQuery,
_In_ LPWSTR pszCodeBase);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region PC Application Partition
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP)
_Check_return_ WINOLEAPI BindMoniker(_In_ LPMONIKER pmk, _In_ DWORD grfOpt, _In_ REFIID iidResult, _Outptr_ LPVOID FAR* ppvResult);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
const
&
,
*
);
_Check_return_ WINOLEAPI CoGetObject(_In_ LPCWSTR pszName, _In_opt_ BIND_OPTS *pBindOptions, _In_ REFIID riid, _Outptr_ void **ppv);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
const
&
,
void
**
);
_Check_return_ WINOLEAPI MkParseDisplayName(_In_ LPBC pbc, _In_ LPCOLESTR szUserName,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Out_ ULONG FAR * pchEaten, _Outptr_ LPMONIKER FAR * ppmk);
_Check_return_ WINOLEAPI MonikerRelativePathTo(_In_ LPMONIKER pmkSrc, _In_ LPMONIKER pmkDest, _Outptr_ LPMONIKER
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
FAR* ppmkRelPath, _In_ BOOL dwReserved);
_Check_return_ WINOLEAPI MonikerCommonPrefixWith(_In_ LPMONIKER pmkThis, _In_ LPMONIKER pmkOther,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Outptr_ LPMONIKER FAR* ppmkCommon);
_Check_return_ WINOLEAPI CreateBindCtx(_In_ DWORD reserved, _Outptr_ LPBC FAR* ppbc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
_Check_return_ WINOLEAPI CreateGenericComposite(_In_opt_ LPMONIKER pmkFirst, _In_opt_ LPMONIKER pmkRest,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Outptr_ LPMONIKER FAR* ppmkComposite);
_Check_return_ WINOLEAPI GetClassFile (_In_ LPCOLESTR szFilename, _Out_ CLSID FAR* pclsid);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
_Check_return_ WINOLEAPI CreateClassMoniker(_In_ REFCLSID rclsid, _Outptr_ LPMONIKER FAR* ppmk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
&
,
*
);
_Check_return_ WINOLEAPI CreateFileMoniker(_In_ LPCOLESTR lpszPathName, _Outptr_ LPMONIKER FAR* ppmk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
_Check_return_ WINOLEAPI CreateItemMoniker(_In_ LPCOLESTR lpszDelim, _In_ LPCOLESTR lpszItem,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Outptr_ LPMONIKER FAR* ppmk);
_Check_return_ WINOLEAPI CreateAntiMoniker(_Outptr_ LPMONIKER FAR* ppmk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
_Check_return_ WINOLEAPI CreatePointerMoniker(_In_opt_ LPUNKNOWN punk, _Outptr_ LPMONIKER FAR* ppmk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
_Check_return_ WINOLEAPI CreateObjrefMoniker(_In_opt_ LPUNKNOWN punk, _Outptr_ LPMONIKER FAR * ppmk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP) */
#pragma endregion
#pragma region Desktop Partition
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_Check_return_ WINOLEAPI GetRunningObjectTable( _In_ DWORD reserved, _Outptr_ LPRUNNINGOBJECTTABLE FAR* pprot);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#include <urlmon.h>
#include <propidl.h>
#pragma region Desktop Partition
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
WINOLEAPI CreateStdProgressIndicator(_In_ HWND hwndParent,
extern
"C"
__declspec
(dllimport)
__stdcall
CreateStdProgressIndicator
(
,
_In_ IBindStatusCallback * pIbscCaller,
_Outptr_ IBindStatusCallback ** ppIbsc);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#ifndef RC_INVOKED
#include <poppack.h>
#endif // RC_INVOKED
#endif // __OBJBASE_H__