ReactOS  0.4.15-dev-2947-g59e1b78
IACLHistory.cpp File Reference
#include <apitest.h>
#include <shlobj.h>
#include <atlbase.h>
#include <atlcom.h>
#include <stdio.h>
#include <shellutils.h>
Include dependency graph for IACLHistory.cpp:

Go to the source code of this file.

Classes

struct  CCoInit
 

Macros

#define _UNICODE
 
#define UNICODE
 

Functions

 START_TEST (IACLHistory)
 

Macro Definition Documentation

◆ _UNICODE

#define _UNICODE

Definition at line 8 of file IACLHistory.cpp.

◆ UNICODE

Definition at line 9 of file IACLHistory.cpp.

Function Documentation

◆ START_TEST()

START_TEST ( IACLHistory  )

Definition at line 24 of file IACLHistory.cpp.

25 {
26  CCoInit init;
27  ok_hex(init.hres, S_OK);
28  if (FAILED(init.hres))
29  {
30  skip("CoInitialize failed with 0x%08lX\n", init.hres);
31  return;
32  }
33 
34  HRESULT hr;
35  CComPtr<IUnknown> pHistory;
36  hr = CoCreateInstance(CLSID_ACLHistory, NULL, CLSCTX_INPROC_SERVER,
37  IID_PPV_ARG(IUnknown, &pHistory));
38  ok_long(hr, S_OK);
39  ok_int(!!pHistory, TRUE);
40 
41  CComPtr<IEnumString> pEnum;
42  hr = pHistory->QueryInterface(IID_PPV_ARG(IEnumString, &pEnum));
43  ok_long(hr, S_OK);
44 
45  hr = pEnum->Reset();
46  ok_long(hr, S_OK);
47  hr = pEnum->Reset();
48  ok_long(hr, S_OK);
49 
50  hr = pEnum->Skip(0);
52  hr = pEnum->Skip(1);
54  hr = pEnum->Skip(3);
56 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
#define ok_long(expression, result)
Definition: atltest.h:133
#define IID_PPV_ARG(Itype, ppType)
#define ok_hex(expression, result)
Definition: atltest.h:94
static int init
Definition: wintirpc.c:33
#define ok_int(expression, result)
Definition: atltest.h:134
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define skip(...)
Definition: atltest.h:64