 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
David Lee Guest
|
Posted: Sat Aug 06, 2005 12:44 pm Post subject: JCL and NetUserEnum Access Violation |
|
|
Hi,
I am trying to use the NetUserEnum function called in JCLWin32 which
results in an access violation. I am calling the function as follows:
type
USER_INFO_1 = record
usri1_name: LPWSTR;
usri1_password: LPWSTR;
usri1_password_age: DWORD;
usri1_priv: DWORD;
usri1_home_dir: LPWSTR;
usri1_comment: LPWSTR;
usri1_flags: DWORD;
usri1_script_path: LPWSTR;
end;
lpUSER_INFO_1 = ^USER_INFO_1;
var
EntiesRead: DWORD;
TotalEntries: DWORD;
UserInfo: lpUSER_INFO_1;
lpBuffer: Pointer;
ResumeHandle: DWORD;
Counter: Integer;
NetApiStatus: LongWord;
NetApiStatus := NetUserEnum(nil, 1, 0, PByte(lpBuffer), 0,
PDWORD(EntiesRead),
PDWORD(TotalEntries), PDWORD(ResumeHandle));
Can anyone see where I am going wrong.
Thanks
David.
|
|
| Back to top |
|
 |
Riki Wiki Google Guest
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|