BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JCL and NetUserEnum Access Violation

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
David Lee
Guest





PostPosted: Sat Aug 06, 2005 12:44 pm    Post subject: JCL and NetUserEnum Access Violation Reply with quote



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





PostPosted: Fri Aug 12, 2005 1:08 am    Post subject: Re: JCL and NetUserEnum Access Violation Reply with quote



David Lee wrote:
Quote:
Can anyone see where I am going wrong.

Take a look here:
http://delphi.wikicities.com/wiki/Delphi_Newsgroups


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.