/ offreg.h
offreg.h
1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 Module Name: 6 7 offreg.h 8 9 Abstract: 10 11 This module contains the header file for the 12 offreg utility. 13 14 --*/ 15 16 #pragma once 17 18 #ifndef __OFFREG_H__ 19 #define __OFFREG_H__ 20 21 #ifdef __cplusplus 22 extern "C" 23 { 24 #endif 25 26 27 #if defined(OFFREG_DLL) 28 #define ORAPI _declspec(dllexport) __stdcall 29 #else 30 #define ORAPI _declspec(dllimport) __stdcall 31 #endif 32 33 typedef PVOID ORHKEY; 34 typedef ORHKEY* PORHKEY; 35 36 VOID 37 ORAPI 38 ORGetVersion( 39 _Out_ PDWORD pdwMajorVersion, 40 _Out_ PDWORD pdwMinorVersion 41 ); 42 43 DWORD 44 ORAPI 45 OROpenHive( 46 _In_ PCWSTR FilePath, 47 _Out_ PORHKEY HORKey 48 ); 49 50 DWORD 51 ORAPI 52 OROpenHiveByHandle( 53 _In_ HANDLE FileHandle, 54 _Out_ PORHKEY HORKey 55 ); 56 57 DWORD 58 ORAPI 59 ORCreateHive( 60 _Out_ PORHKEY HORKey 61 ); 62 63 DWORD 64 ORAPI 65 ORCloseHive( 66 _In_ ORHKEY Handle 67 ); 68 69 DWORD 70 ORAPI 71 ORSaveHive( 72 _In_ ORHKEY HORKey, 73 _In_ PCWSTR HivePath, 74 _In_ DWORD OsMajorVersion, 75 _In_ DWORD OsMinorVersion 76 ); 77 78 DWORD 79 ORAPI 80 OROpenKey( 81 _In_ ORHKEY Handle, 82 _In_opt_ PCWSTR lpSubKey, 83 _Out_ PORHKEY phkResult 84 ); 85 86 DWORD 87 ORAPI 88 ORCloseKey( 89 _In_ ORHKEY KeyHandle 90 ); 91 92 DWORD 93 ORAPI 94 ORCreateKey( 95 _In_ ORHKEY KeyHandle, 96 _In_ PCWSTR lpSubKey, 97 _In_opt_ PWSTR lpClass, 98 _In_opt_ DWORD dwOptions, 99 _In_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor, 100 _Out_ PORHKEY phkResult, 101 _Out_opt_ PDWORD pdwDisposition 102 ); 103 104 DWORD 105 ORAPI 106 ORDeleteKey( 107 _In_ ORHKEY Handle, 108 _In_opt_ PCWSTR lpSubKey 109 ); 110 111 DWORD 112 ORAPI 113 ORQueryInfoKey( 114 _In_ ORHKEY Handle, 115 _Out_writes_opt_(*lpcClass) PWSTR lpClass, 116 _Inout_opt_ PDWORD lpcClass, 117 _Out_opt_ PDWORD lpcSubKeys, 118 _Out_opt_ PDWORD lpcMaxSubKeyLen, 119 _Out_opt_ PDWORD lpcMaxClassLen, 120 _Out_opt_ PDWORD lpcValues, 121 _Out_opt_ PDWORD lpcMaxValueNameLen, 122 _Out_opt_ PDWORD lpcMaxValueLen, 123 _Out_opt_ PDWORD lpcbSecurityDescriptor, 124 _Out_opt_ PFILETIME lpftLastWriteTime 125 ); 126 127 DWORD 128 ORAPI 129 OREnumKey( 130 _In_ ORHKEY Handle, 131 _In_ DWORD dwIndex, 132 _Out_writes_(*lpcName) PWSTR lpName, 133 _Inout_ PDWORD lpcName, 134 _Out_writes_opt_(*lpcClass) PWSTR lpClass, 135 _Inout_opt_ PDWORD lpcClass, 136 _Out_opt_ PFILETIME lpftLastWriteTime 137 ); 138 139 DWORD 140 ORAPI 141 ORGetKeySecurity( 142 _In_ ORHKEY Handle, 143 _In_ SECURITY_INFORMATION SecurityInformation, 144 _Out_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor, 145 _Inout_ PDWORD lpcbSecurityDescriptor 146 ); 147 148 DWORD 149 ORAPI 150 ORSetKeySecurity( 151 _In_ ORHKEY Handle, 152 _In_ SECURITY_INFORMATION SecurityInformation, 153 _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor 154 ); 155 156 DWORD 157 ORAPI 158 ORGetVirtualFlags( 159 _In_ ORHKEY Handle, 160 _Out_ PDWORD pdwFlags 161 ); 162 163 DWORD 164 ORAPI 165 ORSetVirtualFlags( 166 _In_ ORHKEY Handle, 167 _In_ DWORD dwFlags 168 ); 169 170 DWORD 171 ORAPI 172 ORDeleteValue( 173 _In_ ORHKEY Handle, 174 _In_opt_ PCWSTR lpValueName 175 ); 176 177 DWORD 178 ORAPI 179 ORGetValue( 180 _In_ ORHKEY Handle, 181 _In_opt_ PCWSTR lpSubKey, 182 _In_opt_ PCWSTR lpValue, 183 _Out_opt_ PDWORD pdwType, 184 _Out_writes_bytes_opt_(*pcbData) PVOID pvData, 185 _Inout_opt_ PDWORD pcbData 186 ); 187 188 DWORD 189 ORAPI 190 ORSetValue( 191 _In_ ORHKEY Handle, 192 _In_opt_ PCWSTR lpValueName, 193 _In_ DWORD dwType, 194 _In_reads_bytes_opt_(cbData) const BYTE* lpData, 195 _In_ DWORD cbData 196 ); 197 198 DWORD 199 ORAPI 200 OREnumValue( 201 _In_ ORHKEY Handle, 202 _In_ DWORD dwIndex, 203 _Out_writes_(*lpcValueName) PWSTR lpValueName, 204 _Inout_ PDWORD lpcValueName, 205 _Out_opt_ PDWORD lpType, 206 _Out_writes_bytes_opt_(*lpcbData) PBYTE lpData, 207 _Inout_opt_ PDWORD lpcbData 208 ); 209 210 DWORD 211 ORAPI 212 ORRenameKey( 213 _In_ ORHKEY Handle, 214 _In_ PCWSTR lpNewName 215 ); 216 217 DWORD 218 ORStart( 219 VOID 220 ); 221 222 VOID 223 ORShutdown( 224 VOID 225 ); 226 227 DWORD 228 ORAPI 229 ORMergeHives( 230 _In_reads_(HiveCount) ORHKEY* HiveHandles, 231 _In_ ULONG HiveCount, 232 _Out_ PORHKEY phkResult 233 ); 234 235 #ifdef __cplusplus 236 } 237 #endif 238 239 #endif //__OFFREG_H__