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 QueryHKCRValue( 58 _In_ HKEY hKey, 59 _In_ LPCWSTR Name, 60 _In_ LPDWORD Reserved, 61 _In_ LPDWORD Type, 62 _In_ LPBYTE Data, 63 _In_ LPDWORD Count); 64 65 LONG 66 WINAPI 67 SetHKCRValue( 68 _In_ HKEY hKey, 69 _In_ LPCWSTR Name, 70 _In_ DWORD Reserved, 71 _In_ DWORD Type, 72 _In_ CONST BYTE* Data, 73 _In_ DWORD DataSize); 74 75 LONG 76 WINAPI 77 EnumHKCRKey( 78 _In_ HKEY hKey, 79 _In_ DWORD dwIndex, 80 _Out_ LPWSTR lpName, 81 _Inout_ LPDWORD lpcbName, 82 _Reserved_ LPDWORD lpReserved, 83 _Out_opt_ LPWSTR lpClass, 84 _Inout_opt_ LPDWORD lpcbClass, 85 _Out_opt_ PFILETIME lpftLastWriteTime); 86 87 LONG 88 WINAPI 89 EnumHKCRValue( 90 _In_ HKEY hKey, 91 _In_ DWORD index, 92 _Out_ LPWSTR value, 93 _Inout_ PDWORD val_count, 94 _Reserved_ PDWORD reserved, 95 _Out_opt_ PDWORD type, 96 _Out_opt_ LPBYTE data, 97 _Inout_opt_ PDWORD count); 98 99 LONG 100 WINAPI 101 QueryInfoHKCRKey( 102 _In_ HKEY hKey, 103 _Out_writes_to_opt_(*lpcchClass, *lpcchClass + 1) LPWSTR lpClass, 104 _Inout_opt_ LPDWORD lpcchClass, 105 _Reserved_ LPDWORD lpReserved, 106 _Out_opt_ LPDWORD lpcSubKeys, 107 _Out_opt_ LPDWORD lpcbMaxSubKeyLen, 108 _Out_opt_ LPDWORD lpcbMaxClassLen, 109 _Out_opt_ LPDWORD lpcValues, 110 _Out_opt_ LPDWORD lpcbMaxValueNameLen, 111 _Out_opt_ LPDWORD lpcbMaxValueLen, 112 _Out_opt_ LPDWORD lpcbSecurityDescriptor, 113 _Out_opt_ PFILETIME lpftLastWriteTime); 114