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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Microsoft Corporation. All Rights Reserved.
//
// Module Name:
// HelperFunctions_Registry.h
//
// Abstract:
// This module contains prototypes for functions which simplif registry operations
//
// Author:
// Dusty Harper (DHarper)
//
// Revision History:
//
// [ Month ][Day] [Year] - [Revision]-[ Comments ]
// May 01, 2012 - 1.0 - Creation
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef HELPERFUNCTIONS_REGISTRY_H
#define HELPERFUNCTIONS_REGISTRY_H
typedef struct REGISTRY_VALUE_
{
UINT32 type;
UINT32 size;
union
{
UINT32 dword;
UINT64 qword;
BYTE pBuffer[1024];
};
}REGISTRY_VALUE,*PREGISTRY_VALUE;
_Success_(return == NO_ERROR)
UINT32 HlprRegistryDeleteValue(_In_ HKEY hKey,
_In_opt_ PWSTR pSubKey,
_In_ PWSTR pValueName);
_Success_(return == NO_ERROR)
UINT32 HlprRegistrySetValue(_In_ HKEY hKey,
_In_ PWSTR pSubKey,
_In_ UINT32 type,
_In_opt_ PWSTR pValueName,
_In_reads_bytes_(valueSize) BYTE* pValue,
_In_ UINT32 valueSize);
_Success_(return == NO_ERROR)
UINT32 HlprRegistryGetValue(_In_ HKEY hKey,
_In_ PWSTR pSubKey,
_In_opt_ PWSTR pValueName,
_Inout_ REGISTRY_VALUE* pRegValue);
_Success_(return == NO_ERROR)
UINT32 HlprRegistryDeleteKey(_In_ HKEY hKey,
_In_ PWSTR pSubKey);
#endif /// HELPERFUNCTIONS_REGISTRY_H
|