' PBXA64 V23 declarations for advapi32.pbi
#IF NOT %DEF(PBX_ADVAPI32_PBI)
#DEFINE PBX_ADVAPI32_PBI
#INCLUDE ONCE "Legacy/Platform/win_types.inc"
#INCLUDE ONCE "Legacy/Platform/win_consts.inc"

DECLARE FUNCTION RegOpenKeyExA LIB "advapi32.dll" ALIAS "RegOpenKeyExA" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS ASCIIZ PTR, BYVAL ulOptions AS DWORD, BYVAL samDesired AS DWORD, BYVAL phkResult AS QUAD) AS LONG
DECLARE FUNCTION RegOpenKeyExW LIB "advapi32.dll" ALIAS "RegOpenKeyExW" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS WSTRING, BYVAL ulOptions AS DWORD, BYVAL samDesired AS DWORD, BYVAL phkResult AS QUAD) AS LONG
DECLARE FUNCTION RegCreateKeyExA LIB "advapi32.dll" ALIAS "RegCreateKeyExA" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS ASCIIZ PTR, BYVAL Reserved AS DWORD, BYVAL lpClass AS ASCIIZ PTR, BYVAL dwOptions AS DWORD, BYVAL samDesired AS DWORD, BYVAL lpSecurityAttributes AS QUAD, BYVAL phkResult AS QUAD, BYVAL lpdwDisposition AS QUAD) AS LONG
DECLARE FUNCTION RegCreateKeyExW LIB "advapi32.dll" ALIAS "RegCreateKeyExW" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS WSTRING, BYVAL Reserved AS DWORD, BYVAL lpClass AS WSTRING, BYVAL dwOptions AS DWORD, BYVAL samDesired AS DWORD, BYVAL lpSecurityAttributes AS QUAD, BYVAL phkResult AS QUAD, BYVAL lpdwDisposition AS QUAD) AS LONG
DECLARE FUNCTION RegCloseKey LIB "advapi32.dll" ALIAS "RegCloseKey" (BYVAL hKey AS QUAD) AS LONG
DECLARE FUNCTION RegQueryValueExA LIB "advapi32.dll" ALIAS "RegQueryValueExA" (BYVAL hKey AS QUAD, BYVAL lpValueName AS ASCIIZ PTR, BYVAL lpReserved AS QUAD, BYVAL lpType AS QUAD, BYVAL lpData AS QUAD, BYVAL lpcbData AS QUAD) AS LONG
DECLARE FUNCTION RegQueryValueExW LIB "advapi32.dll" ALIAS "RegQueryValueExW" (BYVAL hKey AS QUAD, BYVAL lpValueName AS WSTRING, BYVAL lpReserved AS QUAD, BYVAL lpType AS QUAD, BYVAL lpData AS QUAD, BYVAL lpcbData AS QUAD) AS LONG
DECLARE FUNCTION RegSetValueExA LIB "advapi32.dll" ALIAS "RegSetValueExA" (BYVAL hKey AS QUAD, BYVAL lpValueName AS ASCIIZ PTR, BYVAL Reserved AS DWORD, BYVAL dwType AS DWORD, BYVAL lpData AS QUAD, BYVAL cbData AS DWORD) AS LONG
DECLARE FUNCTION RegSetValueExW LIB "advapi32.dll" ALIAS "RegSetValueExW" (BYVAL hKey AS QUAD, BYVAL lpValueName AS WSTRING, BYVAL Reserved AS DWORD, BYVAL dwType AS DWORD, BYVAL lpData AS QUAD, BYVAL cbData AS DWORD) AS LONG
DECLARE FUNCTION RegDeleteKeyA LIB "advapi32.dll" ALIAS "RegDeleteKeyA" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS ASCIIZ PTR) AS LONG
DECLARE FUNCTION RegDeleteKeyW LIB "advapi32.dll" ALIAS "RegDeleteKeyW" (BYVAL hKey AS QUAD, BYVAL lpSubKey AS WSTRING) AS LONG
DECLARE FUNCTION RegDeleteValueA LIB "advapi32.dll" ALIAS "RegDeleteValueA" (BYVAL hKey AS QUAD, BYVAL lpValueName AS ASCIIZ PTR) AS LONG
DECLARE FUNCTION RegDeleteValueW LIB "advapi32.dll" ALIAS "RegDeleteValueW" (BYVAL hKey AS QUAD, BYVAL lpValueName AS WSTRING) AS LONG
DECLARE FUNCTION OpenProcessToken LIB "advapi32.dll" ALIAS "OpenProcessToken" (BYVAL ProcessHandle AS QUAD, BYVAL DesiredAccess AS DWORD, BYVAL TokenHandle AS QUAD) AS LONG

#ENDIF
