请文如果用函数来完成这个功能的话需要在uses里面添加什么,我直接用NetShareAdd不能使用呀!谢谢了!(50分)

  • 主题发起人 主题发起人 lonelybug
  • 开始时间 开始时间
L

lonelybug

Unregistered / Unconfirmed
GUEST, unregistred user!
请文如果用函数来完成这个功能的话需要在uses里面添加什么,我直接用NetShareAdd不能使用呀!谢谢了!
 
Nt/2000下这样声明之:<br>Function NetShareAdd(servername:PChar;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; level:SmallInt;buf:Pointer;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buf_len:SmallInt):SmallInt;far;stdcall;external 'NETAPI32.DLL';<br>98下换成SVRAPI.DLL<br>不要告诉是win31哦[:D]<br>
 
function NetShareAdd(ServerName : PWideChar;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Level : Longword;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Buffer : Pointer;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var ParamError : Longword) : Longword; external 'Netapi32';<br>Share_INFO_2 = record<br>&nbsp; &nbsp; shi2_netname : PWideChar; <br>&nbsp; &nbsp; shi2_type : Longword;<br>&nbsp; &nbsp; shi2_remark : PWideChar;<br>&nbsp; &nbsp; shi2_permissions : Longword;<br>&nbsp; &nbsp; shi2_max_uses : Longword;<br>&nbsp; &nbsp; shi2_current_uses : Longword;<br>&nbsp; &nbsp; shi2_path : PWideChar;<br>&nbsp; &nbsp; shi2_passwd : PWideChar;<br>&nbsp; &nbsp; end;
 
后退
顶部