26 L"Directory",
L"SymbolicLink",
27 L"Mutant",
L"Section",
L"Event",
L"Semaphore",
28 L"Timer",
L"Key",
L"EventPair",
L"IoCompletion",
29 L"Device",
L"File",
L"Controller",
L"Profile",
30 L"Type",
L"Desktop",
L"WindowStation",
L"Driver",
31 L"Token",
L"Process",
L"Thread",
L"Adapter",
L"Port",
41 L"REG_DWORD_BIG_ENDIAN",
45 L"REG_FULL_RESOURCE_DESCRIPTOR",
46 L"REG_RESOURCE_REQUIREMENTS_LIST",
89 if (!
StrCmpNW(typeName, TypeName, cbTypeName /
sizeof(
WCHAR)))
113 ERR(
"RegOpenKeyExW failed for path %S with status=%x\n",
path,
res);
120 ERR(
"RegQueryValueExW failed for path %S with status=%x\n",
path,
res);
124 if (*valueLength > 0)
137 ERR(
"RegOpenKeyExW failed for path %S with status=%x\n",
path,
res);
159 if (pend[-1] !=
'\\')
185 public CComObjectRootEx<CComMultiThreadModelNoCS>,
225 entry->entryType = otype;
236 entry->entryNameLength = 0;
237 entry->entryName[0] = 0;
300 public CComObjectRootEx<CComMultiThreadModelNoCS>,
334 ERR(
"RegOpenKeyExW failed for path %S with status=%x\n",
path,
res);
353 className[cchClass] = 0;
361 entryBufferLength +=
sizeof(
WCHAR) + cchClass *
sizeof(
WCHAR);
375 entry->entryType = otype;
385 entry->entryNameLength = 0;
386 entry->entryName[0] = 0;
393 DWORD remainingSpace = entryBufferLength -
entry->cb;
395 entry->contentsLength = cchClass *
sizeof(
WCHAR);
420#define MAX_EMBEDDED_DATA 32
440 entry->entryType = otype;
451 entry->entryNameLength = 0;
452 entry->entryName[0] = 0;
471 entry->contentsLength = 0;
495 return NextValue(ppidl);
551 public CComObjectRootEx<CComMultiThreadModelNoCS>,
562 : m_directory(
NULL), m_first(
TRUE), m_enumContext(0), m_pend(
NULL)
578 ERR(
"NtOpenDirectoryObject failed for path %S with status=%x\n",
buffer,
err);
582 if (m_pend[-1] !=
'\\')
590 BYTE dirbuffer[2048];
603 if (
info->Name.Buffer)
611 if (
info->Name.Buffer)
612 entryBufferLength +=
info->Name.Length;
618 if (
info->TypeName.Buffer)
620 entryBufferLength +=
info->TypeName.Length;
635 entry->objectType = otype;
637 if (
info->Name.Buffer)
639 entry->entryNameLength =
info->Name.Length;
645 entry->entryNameLength = 0;
646 entry->entryName[0] = 0;
655 if (
info->TypeName.Buffer)
NTSTATUS NTAPI NtOpenSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define RegCloseKey(hKey)
STDMETHODIMP Skip(ULONG celt) override
STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override
STDMETHODIMP Reset() override
HRESULT EnumerateNext(LPITEMIDLIST *ppidl)
STDMETHODIMP Clone(IEnumIDList **ppenum) override
HRESULT Initialize(PCWSTR path)
STDMETHODIMP Skip(ULONG celt) override
HRESULT NextKey(LPITEMIDLIST *ppidl)
HRESULT NextValue(LPITEMIDLIST *ppidl)
STDMETHODIMP Reset() override
STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override
HRESULT EnumerateNext(LPITEMIDLIST *ppidl)
HRESULT Initialize(PCWSTR path, HKEY root)
STDMETHODIMP Clone(IEnumIDList **ppenum) override
STDMETHODIMP Skip(ULONG celt) override
STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override
STDMETHODIMP Clone(IEnumIDList **ppenum) override
HRESULT EnumerateNext(LPITEMIDLIST *ppidl)
STDMETHODIMP Reset() override
#define ERROR_INVALID_FUNCTION
#define NT_SUCCESS(StatCode)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
NTSTATUS NTAPI NtOpenEventPair(OUT PHANDLE EventPairHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLint GLboolean GLint GLenum access
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS NTAPI NtOpenIoCompletion(OUT PHANDLE IoCompletionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
#define DECLARE_NOT_AGGREGATABLE(x)
NTSTATUS NTAPI NtOpenMutant(OUT PHANDLE MutantHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
struct _OBJECT_DIRECTORY_INFORMATION * POBJECT_DIRECTORY_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define SYMBOLIC_LINK_QUERY
#define FILE_LIST_DIRECTORY
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FILE_SHARE_DELETE
#define STANDARD_RIGHTS_READ
#define KEY_ENUMERATE_SUB_KEYS
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
HRESULT ReadRegistryValue(HKEY root, PCWSTR path, PCWSTR valueName, PVOID *valueData, PDWORD valueLength)
const LPCWSTR ObjectTypeNames[]
HRESULT GetEnumRegistryKey(LPCWSTR path, HKEY root, IEnumIDList **ppil)
static DWORD NtOpenObject(OBJECT_TYPE type, PHANDLE phandle, DWORD access, LPCWSTR path)
HRESULT GetEnumNTDirectory(LPCWSTR path, IEnumIDList **ppil)
static struct RootKeyEntry RootKeys[]
NTSTATUS(__stdcall * pfnNtGenericOpen)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES)
#define MAX_EMBEDDED_DATA
HRESULT GetNTObjectSymbolicLinkTarget(LPCWSTR path, LPCWSTR entryName, PUNICODE_STRING LinkTarget)
OBJECT_TYPE MapTypeNameToType(LPCWSTR TypeName, DWORD cbTypeName)
const LPCWSTR RegistryTypeNames[]
NTSTATUS(__stdcall * pfnNtOpenFile)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG)
HRESULT GetEnumRegistryRoot(IEnumIDList **ppil)
#define REGISTRY_PIDL_MAGIC
@ REG_ENTRY_VALUE_WITH_CONTENT
#define NT_OBJECT_PIDL_MAGIC
NTSTATUS NTAPI NtOpenEvent(OUT PHANDLE EventHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtOpenTimer(OUT PHANDLE TimerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtOpenDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtQueryDirectoryObject(IN HANDLE DirectoryHandle, OUT PVOID Buffer, IN ULONG BufferLength, IN BOOLEAN ReturnSingleEntry, IN BOOLEAN RestartScan, IN OUT PULONG Context, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtQuerySymbolicLinkObject(IN HANDLE LinkHandle, OUT PUNICODE_STRING LinkTarget, OUT PULONG ResultLength OPTIONAL)
NTSTATUS NTAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtOpenSemaphore(OUT PHANDLE SemaphoreHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
STRSAFEAPI StringCbCopyNW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, size_t cbToCopy)
STRSAFEAPI StringCbCopyExW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
WCHAR typeName[ANYSIZE_ARRAY]
#define FIELD_OFFSET(t, f)
struct _OBJECT_ATTRIBUTES * POBJECT_ATTRIBUTES
struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
#define HRESULT_FROM_NT(x)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_CONFIG
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT
#define IID_PPV_ARG(Itype, ppType)
_Inout_ PUNICODE_STRING LinkTarget