Moin Luckie,
dann nimm meinetwegen die
Jedi Units:
Delphi-Quellcode:
procedure TfrmMAIN.miFileOpenClick(Sender: TObject);
type
PUserInfo0 = ^TUserInfo0;
_USER_INFO_0 = record
usri0_name: LPWSTR;
end;
TUserInfo0 = _USER_INFO_0;
USER_INFO_0 = _USER_INFO_0;
var
rui0Work : PUserInfo0;
rui0Save : PUserInfo0;
dwEntriesRead : DWORD;
i : integer;
begin
if NetUserEnum(nil, 0, FILTER_NORMAL_ACCOUNT, @rui0Work, MAX_PREFERRED_LENGTH,
dwEntriesRead, dwEntriesRead, nil) = NERR_SUCCESS then begin
rui0Save := rui0Work;
for i:=1 to dwEntriesRead do
begin
ListBox1.Items.Add(rui0Work.usri0_name);
inc(rui0Work);
end;
end;
NetAPIBufferFree(rui0Save);
end;
Mein Methode funktioniert trotzdem
(Auch ohne die
Jedi Deklarationen anzufassen)