[lazarus] Headed for Windows

Luis R. Hilario B. luis at luis-digital.8m.com
Sun Nov 5 09:07:09 EST 2000


Marco van de Voort wrote:
> 
> > Where I must put headed, like the following one?
> > Function RegDeleteKey(hKey: Longint; lpSubKey: String): Longint;
> > external 'advapi32' name 'RegDeleteKeyA';
> 
> Nowhere? It is simply in unit windows?


Program key1;  //This program works.

Const
HKEY_LOCAL_MACHINE = $80000002;

Function RegDeleteKey(hKey: Longint; lpSubKey: String): Longint;
external
 'advapi32' name 'RegDeleteKeyA';

Var
 Val: LongInt;

Begin
 Val := RegDeleteKey(HKEY_LOCAL_MACHINE, 'Software\Luis Digital');
End.
============================================
Program Key2;  //This program does not work.

Uses windows;

Var
 Val: Long;

Begin
 Val := RegDeleteKeyW(HKEY_LOCAL_MACHINE, 'Software\Luis Digital');
End. // RegDeleteKeyW(HKEY,                LPCWSTR = ^Word);

There is an error in the declaration or I do not know to use the
function?

-- 
 |--------------------------|
| Luis R. Hilario            |
| http://luisdigital.2y.net  |
 |--------------------------|






More information about the Lazarus mailing list