mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 14:02:03 +00:00
[SDK] Define CCoInit in shellutils
This commit is contained in:
parent
8083ef9ad7
commit
d82185f104
7 changed files with 30 additions and 59 deletions
|
@ -129,9 +129,8 @@ IUnknown *CComCreatorCentralInstance<T>::s_pInstance = NULL;
|
|||
#define DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(x) \
|
||||
public: \
|
||||
typedef CComCreatorCentralInstance< ATL::CComObject<x> > _CreatorClass;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
template <class Base>
|
||||
class CComDebugObject : public Base
|
||||
{
|
||||
|
@ -538,6 +537,22 @@ void DumpIdList(LPCITEMIDLIST pcidl)
|
|||
DbgPrint("End IDList Dump.\n");
|
||||
}
|
||||
|
||||
struct CCoInit
|
||||
{
|
||||
CCoInit()
|
||||
{
|
||||
hr = CoInitialize(NULL);
|
||||
}
|
||||
~CCoInit()
|
||||
{
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
CoUninitialize();
|
||||
}
|
||||
}
|
||||
HRESULT hr;
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define S_LESSTHAN 0xffff
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue