[SDK] Define CCoInit in shellutils

This commit is contained in:
Mark Jansen 2022-10-23 21:16:56 +02:00
parent 8083ef9ad7
commit d82185f104
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
7 changed files with 30 additions and 59 deletions

View file

@ -14,20 +14,13 @@
#include <stdio.h>
#include <shellutils.h>
struct CCoInit
{
CCoInit() { hres = CoInitialize(NULL); }
~CCoInit() { if (SUCCEEDED(hres)) { CoUninitialize(); } }
HRESULT hres;
};
START_TEST(IACLHistory)
{
CCoInit init;
ok_hex(init.hres, S_OK);
if (FAILED(init.hres))
ok_hex(init.hr, S_OK);
if (FAILED(init.hr))
{
skip("CoInitialize failed with 0x%08lX\n", init.hres);
skip("CoInitialize failed with 0x%08lX\n", init.hr);
return;
}