1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS system libraries 4 * FILE: lib/advapi32/reg/reg.c 5 * PURPOSE: Registry functions 6 */ 7 8 #pragma once 9 10 /* FUNCTIONS ****************************************************************/ 11 FORCEINLINE 12 BOOL 13 IsHKCRKey(_In_ HKEY hKey) 14 { 15 return ((ULONG_PTR)hKey & 0x2) != 0; 16 } 17 18 FORCEINLINE 19 void 20 MakeHKCRKey(_Inout_ HKEY* hKey) 21 { 22 *hKey = (HKEY)((ULONG_PTR)(*hKey) | 0x2); 23 } 24 25 LONG 26 WINAPI 27 CreateHKCRKey( 28 _In_ HKEY hKey, 29 _In_ LPCWSTR lpSubKey, 30 _In_ DWORD Reserved, 31 _In_opt_ LPWSTR lpClass, 32 _In_ DWORD dwOptions, 33 _In_ REGSAM samDesired, 34 _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, 35 _Out_ PHKEY phkResult, 36 _Out_opt_ LPDWORD lpdwDisposition); 37 38 LONG 39 WINAPI 40 OpenHKCRKey( 41 _In_ HKEY hKey, 42 _In_ LPCWSTR lpSubKey, 43 _In_ DWORD ulOptions, 44 _In_ REGSAM samDesired, 45 _In_ PHKEY phkResult); 46 47 LONG 48 WINAPI 49 DeleteHKCRKey( 50 _In_ HKEY hKey, 51 _In_ LPCWSTR lpSubKey, 52 _In_ REGSAM RegSam, 53 _In_ DWORD Reserved); 54 55 LONG 56 WINAPI 57 DeleteHKCRValue( 58 _In_ HKEY hKey, 59 _In_ PUNICODE_STRING ValueName); 60 61 LONG 62 WINAPI 63 QueryHKCRValue( 64 _In_ HKEY hKey, 65 _In_ LPCWSTR Name, 66 _In_ LPDWORD Reserved, 67 _In_ LPDWORD Type, 68 _In_ LPBYTE Data, 69 _In_ LPDWORD Count); 70 71 LONG 72 WINAPI 73 SetHKCRValue( 74 _In_ HKEY hKey, 75 _In_ LPCWSTR Name, 76 _In_ DWORD Reserved, 77 _In_ DWORD Type, 78 _In_ CONST BYTE* Data, 79 _In_ DWORD DataSize); 80 81 LONG 82 WINAPI 83 EnumHKCRKey( 84 _In_ HKEY hKey, 85 _In_ DWORD dwIndex, 86 _Out_ LPWSTR lpName, 87 _Inout_ LPDWORD lpcbName, 88 _Reserved_ LPDWORD lpReserved, 89 _Out_opt_ LPWSTR lpClass, 90 _Inout_opt_ LPDWORD lpcbClass, 91 _Out_opt_ PFILETIME lpftLastWriteTime); 92 93 LONG 94 WINAPI 95 EnumHKCRValue( 96 _In_ HKEY hKey, 97 _In_ DWORD index, 98 _Out_ LPWSTR value, 99 _Inout_ PDWORD val_count, 100 _Reserved_ PDWORD reserved, 101 _Out_opt_ PDWORD type, 102 _Out_opt_ LPBYTE data, 103 _Inout_opt_ PDWORD count); 104 105 LONG 106 WINAPI 107 QueryInfoHKCRKey( 108 _In_ HKEY hKey, 109 _Out_writes_to_opt_(*lpcchClass, *lpcchClass + 1) LPWSTR lpClass, 110 _Inout_opt_ LPDWORD lpcchClass, 111 _Reserved_ LPDWORD lpReserved, 112 _Out_opt_ LPDWORD lpcSubKeys, 113 _Out_opt_ LPDWORD lpcbMaxSubKeyLen, 114 _Out_opt_ LPDWORD lpcbMaxClassLen, 115 _Out_opt_ LPDWORD lpcValues, 116 _Out_opt_ LPDWORD lpcbMaxValueNameLen, 117 _Out_opt_ LPDWORD lpcbMaxValueLen, 118 _Out_opt_ LPDWORD lpcbSecurityDescriptor, 119 _Out_opt_ PFILETIME lpftLastWriteTime); 120