-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathntreg.h
30 lines (23 loc) · 1.19 KB
/
ntreg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef NATIVEREGISTRY_FUNCTIONS_H
#define NATIVEREGISTRY_FUNCTIONS_H 1
//#define DEBUGMODE
#include <ntndk.h> // include this for its native functions and defn's
#define HKEY_CLASSES_ROOT 0x80000000
#define HKEY_CURRENT_USER 0x80000001
#define HKEY_LOCAL_MACHINE 0x80000002
#define HKEY_USERS 0x80000003
#define HKEY_PERFORMANCE_DATA 0x80000004
#define HKEY_PERFORMANCE_TEXT 0x80000050
#define HKEY_PERFORMANCE_NLSTEXT 0x80000060
#define HKEY_CURRENT_CONFIG 0x80000005
#define HKEY_DYN_DATA 0x80000006
typedef ULONG H_KEY;
WCHAR* NtRegGetRootPath(H_KEY hkRoot) ;
BOOLEAN NtRegOpenKey(HANDLE* phKey, H_KEY hkRoot, WCHAR* pwszSubKey, ACCESS_MASK DesiredAccess);
BOOLEAN NtRegWriteValue(HANDLE H_KEY, WCHAR* pwszValueName, PVOID pData, ULONG uLength, DWORD dwRegType);
BOOLEAN NtRegWriteString(HANDLE H_KEY, WCHAR* pwszValueName, WCHAR* pwszValue);
BOOLEAN NtRegDeleteValue(HANDLE H_KEY, WCHAR* pwszValueName);
BOOLEAN NtRegCloseKey(HANDLE H_KEY);
BOOLEAN NtRegReadValue(HANDLE H_KEY, HANDLE hHeapHandle, WCHAR* pszValueName, PKEY_VALUE_PARTIAL_INFORMATION* pRetBuffer, ULONG* pRetBufferSize);
void NtEnumKey(HANDLE hKey);
#endif