ReactOS 0.4.17-dev-683-g0dafdc5
shelltest.h File Reference
#include <ntstatus.h>
#include <apitest.h>
#include <winreg.h>
#include <shlobj.h>
#include <shellapi.h>
#include <shlwapi.h>
#include <atlbase.h>
#include <atlcom.h>
Include dependency graph for shelltest.h:

Go to the source code of this file.

Macros

#define COM_NO_WINDOWS_H
 
#define WIN32_NO_STATUS
 

Functions

VOID PathToIDList (LPCWSTR pszPath, ITEMIDLIST **ppidl)
 
static LPCWSTR RegNameDisp (LPCWSTR s)
 
static UINT RegSetStringEx (HKEY hKey, LPCWSTR Path, LPCWSTR Name, LPCWSTR Str, DWORD Type)
 
static UINT RegSetString (HKEY hKey, LPCWSTR Path, LPCWSTR Name, LPCWSTR Str)
 

Variables

static const BOOL g_bVista = (GetNTVersion() == _WIN32_WINNT_VISTA)
 

Macro Definition Documentation

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 5 of file shelltest.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 8 of file shelltest.h.

Function Documentation

◆ PathToIDList()

VOID PathToIDList ( LPCWSTR  pszPath,
ITEMIDLIST **  ppidl 
)

Definition at line 83 of file shelltest.cpp.

84{
85 CComPtr<IBindCtx> spbc;
87 ok(hr == S_OK, "hr = %lx\n", hr);
88 if (SUCCEEDED(hr))
89 {
90 hr = SHParseDisplayName(pszPath, spbc, ppidl, 0, NULL);
91 ok(hr == S_OK, "hr = %lx\n", hr);
92 }
93}
#define ok(value,...)
Definition: atltest.h:57
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
Definition: pidl.c:1548
static HRESULT CreateFileSysBindCtx(_Outptr_ IBindCtx **ppbc)
Definition: shelltest.cpp:67

Referenced by TestCompareIDList().

◆ RegNameDisp()

static LPCWSTR RegNameDisp ( LPCWSTR  s)
inlinestatic

Definition at line 22 of file shelltest.h.

23{
24 return (s && *s) ? s : L"(Default)";
25}
#define L(x)
Definition: resources.c:13
GLdouble s
Definition: gl.h:2039

◆ RegSetString()

static UINT RegSetString ( HKEY  hKey,
LPCWSTR  Path,
LPCWSTR  Name,
LPCWSTR  Str 
)
inlinestatic

Definition at line 32 of file shelltest.h.

33{
35}
PRTL_UNICODE_STRING_BUFFER Path
LPWSTR Name
Definition: desk.c:124
FxAutoRegKey hKey
#define REG_SZ
Definition: layer.c:22
static UINT RegSetStringEx(HKEY hKey, LPCWSTR Path, LPCWSTR Name, LPCWSTR Str, DWORD Type)
Definition: shelltest.h:27

◆ RegSetStringEx()

static UINT RegSetStringEx ( HKEY  hKey,
LPCWSTR  Path,
LPCWSTR  Name,
LPCWSTR  Str,
DWORD  Type 
)
inlinestatic

Definition at line 27 of file shelltest.h.

28{
29 return SHSetValueW(hKey, Path, Name, Type, (LPCVOID)Str, (lstrlenW(Str) + 1) * sizeof(WCHAR));
30}
Type
Definition: Type.h:7
#define lstrlenW
Definition: compat.h:750
DWORD WINAPI SHSetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD type, const void *data, DWORD data_len)
Definition: main.c:2292
CONST void * LPCVOID
Definition: minwindef.h:164
short WCHAR
Definition: pedump.c:58

Referenced by RegSetString(), and START_TEST().

Variable Documentation

◆ g_bVista

const BOOL g_bVista = (GetNTVersion() == _WIN32_WINNT_VISTA)
static

Definition at line 18 of file shelltest.h.

Referenced by CMenuCallback::CallbackSM(), and TestCompareIDList().