Grande :)
Ora però su questo codice
function NetApiBufferAllocate; external 'NETAPI32.DLL';
function NetApiBufferFree; external 'NETAPI32.dLL';
function NetApiBufferReallocate; external 'NETAPI32.DLL';
function NetApiBufferSize; external 'NETAPI32.DLL';
Mi dice:
lmglobal.pas(658,30) Fatal: Syntax error, ":" expected but ";" found
Ho provato a sostituire
function NetApiBufferAllocate;
con
function NetApiBufferAllocate:
ma dice
lmglobal.pas(658,50) Error: Identifier not found "external"
devono essere dichiarate cosi':
Const
NERR_Success = 0;
function NetApiBufferAllocate(ByteCount: DWORD; var Buffer: Pointer): DWORD;
stdcall; external 'netapi32.dll';
function NetGetDCName(servername: LPCWSTR; domainname: LPCWSTR;
bufptr: Pointer): DWORD; stdcall; external 'netapi32.dll';
function NetApiBufferFree (Buffer: Pointer): DWORD ; stdcall;
external 'netapi32.dll';
Function NetWkstaGetInfo
(ServerName : LPWSTR;
Level : DWORD;
BufPtr : Pointer) : Longint; Stdcall;
external 'netapi32.dll' Name 'NetWkstaGetInfo';
function NetUserEnum(servername: LPCWSTR; level: DWORD; filter: DWORD;
var bufptr: Pointer; prefmaxlen: DWORD; var entriesread: DWORD;
var totalentries: DWORD; resume_handle: PDWORD): DWORD; stdcall;
external 'netapi32.dll';
comunque se vai qui' c'e' un esempio bello e pronto http://www.delphi-central.com/tutorials/delphi_user_list.aspx