ReactOS
0.4.17-dev-966-gf06eace
IACLHistory.cpp
Go to the documentation of this file.
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
}
IID_PPV_ARG
#define IID_PPV_ARG(Itype, ppType)
Definition:
CSnapinCacheEntry.cpp:13
apitest.h
ok_hex
#define ok_hex(expression, result)
Definition:
atltest.h:94
ok_long
#define ok_long(expression, result)
Definition:
atltest.h:133
skip
#define skip(...)
Definition:
atltest.h:64
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
ok_int
#define ok_int(expression, result)
Definition:
atltest.h:134
E_NOTIMPL
#define E_NOTIMPL
Definition:
ddrawi.h:99
hr
HRESULT hr
Definition:
delayimp.cpp:582
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
CoCreateInstance
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition:
combase.c:1685
HRESULT
Definition:
metahost.idl:58
IEnumString
Definition:
objidlbase.idl:299
IUnknown
Definition:
unknwn.idl:39
IUnknown::QueryInterface
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
S_OK
#define S_OK
Definition:
intsafe.h:52
FAILED
#define FAILED(hr)
Definition:
intsafe.h:51
shellutils.h
shlobj.h
init
static int init
Definition:
wintirpc.c:33
modules
rostests
apitests
browseui
IACLHistory.cpp
Generated on Thu Oct 1 2026 06:09:45 for ReactOS by
1.9.6