那里有 netapi32.dll 中所有的函数及结构体的Delphi版定义?(200分)

  • 主题发起人 主题发起人 sprikg
  • 开始时间 开始时间
S

sprikg

Unregistered / Unconfirmed
GUEST, unregistred user!
好象 Delphi 对于 netapi32.dll 中所有的函数及结构体都没定义,所以得自己。<br>只可惜太多太繁,要是谁已定义过,希望能共享。我只定义了少数几个:<br><br><br><br>unit NetAPI;<br><br>interface<br><br>uses<br>&nbsp; Windows, Pubdata, Pubfunc;<br><br>const<br>&nbsp; netapi32 &nbsp; &nbsp;= 'netapi32.dll';<br>&nbsp; MAXARRAYLEN = 65536;<br><br>// &nbsp;用户组资料<br>type<br>&nbsp; P_A_LOCALGROUP_INFO_1 = ^A_LOCALGROUP_INFO_1;<br>&nbsp; st_LOCALGROUP_INFO_1 = record<br>&nbsp; &nbsp; lgrpi1_name: PWideChar;<br>&nbsp; &nbsp; lgrpi1_comment: PWideChar;<br>&nbsp; end;<br>&nbsp; A_LOCALGROUP_INFO_1 = array [0..MAXARRAYLEN-1] of st_LOCALGROUP_INFO_1;<br><br>// &nbsp;用户组成员资料<br>type<br>&nbsp; P_A_LOCALGROUP_MEMBERS_INFO_3 = ^A_LOCALGROUP_MEMBERS_INFO_3;<br>&nbsp; st_LOCALGROUP_MEMBERS_INFO_3 = record<br>&nbsp; &nbsp; lgrmi3_domainandname: PWideChar;<br>&nbsp; end;<br>&nbsp; A_LOCALGROUP_MEMBERS_INFO_3 = array [0..MAXARRAYLEN-1] of st_LOCALGROUP_MEMBERS_INFO_3;<br><br>// &nbsp;用户资料<br>type<br>&nbsp; P_A_USER_INFO_1 = ^A_USER_INFO_1;<br>&nbsp; st_USER_INFO_1 = record<br>&nbsp; &nbsp; usri1_name: PWideChar;<br>&nbsp; &nbsp; usri1_password: PWideChar;<br>&nbsp; &nbsp; usri1_password_age: DWORD;<br>&nbsp; &nbsp; usri1_priv: DWORD;<br>&nbsp; &nbsp; usri1_home_dir: PWideChar;<br>&nbsp; &nbsp; usri1_comment: PWideChar;<br>&nbsp; &nbsp; usri1_flags: DWORD;<br>&nbsp; &nbsp; usri1_script_path: PWideChar;<br>&nbsp; end;<br>&nbsp; A_USER_INFO_1 = array [0..MAXARRAYLEN-1] of st_USER_INFO_1;<br><br><br>// &nbsp;释放网络资源,必须调用<br>function NetApiBufferFree(buffer: pointer): DWORD; stdcall;<br>&nbsp; external netapi32 name 'NetApiBufferFree';<br><br>// &nbsp;读取用户组资料<br>function NetLocalGroupEnum(servername: PWideChar; level: DWORD;<br>&nbsp; var bufptr: P_A_LOCALGROUP_INFO_1; prefmaxlen: DWORD;<br>&nbsp; var entriesread, totalentries, resumehandle:DWORD): DWORD; stdcall;<br>&nbsp; external netapi32 name 'NetLocalGroupEnum';<br><br>// &nbsp;读取用户组成员资料<br>function NetLocalGroupGetMembers(servername: PWideChar; localgroupname: PWideChar;<br>&nbsp; level: DWORD; var bufptr: P_A_LOCALGROUP_MEMBERS_INFO_3; prefmaxlen: DWORD;<br>&nbsp; var entriesread, totalentries, resumehandle:DWORD): DWORD; stdcall;<br>&nbsp; external netapi32 name 'NetLocalGroupGetMembers';<br><br><br>function NetUserEnum(servername :PWideChar;<br>&nbsp; level, filter: DWORD;<br>&nbsp; var bufptr: P_A_USER_INFO_1;<br>&nbsp; prefmaxlen: DWORD;<br>&nbsp; var entriesread, totalentries, resume_handle: DWORD): DWORD; stdcall;<br>&nbsp; external netapi32 name 'NetUserEnum';<br><br>implementation<br><br>end.<br><br>
 
留下Email我晚上给你
 
这儿 : ftp://delphi-jedi.org/api/LanManager.zip<br><br>http://www.delphi-jedi.org/Jedi:APILIBRARY:38493 &lt;---有很多冬冬<br><br>//-----<br>CIONO1
 
多人接受答案了。
 
后退
顶部