1 /*
2  * PROJECT:     ReactOS api tests
3  * LICENSE:     LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4  * PURPOSE:     Test for IACLHistory objects
5  * COPYRIGHT:   Copyright 2021 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6  */
7 
8 #define _UNICODE
9 #define UNICODE
10 #include <apitest.h>
11 #include <shlobj.h>
12 #include <atlbase.h>
13 #include <atlcom.h>
14 #include <stdio.h>
15 #include <shellutils.h>
16 
17 START_TEST(IACLHistory)
18 {
19     CCoInit init;
20     ok_hex(init.hr, S_OK);
21     if (FAILED(init.hr))
22     {
23         skip("CoInitialize failed with 0x%08lX\n", init.hr);
24         return;
25     }
26 
27     HRESULT hr;
28     CComPtr<IUnknown> pHistory;
29     hr = CoCreateInstance(CLSID_ACLHistory, NULL, CLSCTX_INPROC_SERVER,
30                           IID_PPV_ARG(IUnknown, &pHistory));
31     ok_long(hr, S_OK);
32     ok_int(!!pHistory, TRUE);
33 
34     CComPtr<IEnumString> pEnum;
35     hr = pHistory->QueryInterface(IID_PPV_ARG(IEnumString, &pEnum));
36     ok_long(hr, S_OK);
37 
38     hr = pEnum->Reset();
39     ok_long(hr, S_OK);
40     hr = pEnum->Reset();
41     ok_long(hr, S_OK);
42 
43     hr = pEnum->Skip(0);
44     ok_long(hr, E_NOTIMPL);
45     hr = pEnum->Skip(1);
46     ok_long(hr, E_NOTIMPL);
47     hr = pEnum->Skip(3);
48     ok_long(hr, E_NOTIMPL);
49 }
50