Show quoted text 9 lines
Program key1; //This program works.
Const
HKEY_LOCAL_MACHINE = $80000002;
Function RegDeleteKey(hKey: Longint; lpSubKey: String): Longint;
external
'advapi32' name 'RegDeleteKeyA';
Here you use "RegDeleteKeyA"
Begin
Val := RegDeleteKeyW(HKEY_LOCAL_MACHINE, 'Software\Luis Digital');
End. // RegDeleteKeyW(HKEY, LPCWSTR = ^Word);
Here you use RegDeleteKeyW (which is for widestrings)
There is an error in the declaration or I do not know to use the
function?
Try to use RegDeleteKeyA or only RegDeleteKey in the second example.
Marco van de Voort ( or )