win api中的NetRemoteTOD函数在delphi中如何调用 (100分)

  • 主题发起人 主题发起人 ruder
  • 开始时间 开始时间
R

ruder

Unregistered / Unconfirmed
GUEST, unregistred user!
program Project1;<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br>&nbsp; Dialogs, StdCtrls;<br><br>function NetRemoteTOD(UncServerName:string;lnptr:longint):longint;external 'netapi32.dll';<br><br><br>&nbsp;var<br>&nbsp;server1:array [0..254] of char;<br>&nbsp;lnptr1:integer;<br><br>&nbsp;begin<br>&nbsp;server1:='//202.115.**.**';<br>&nbsp; lnptr1:=0;<br>&nbsp; &nbsp;NetRemoteTOD(server1,lnptr1);<br>end.<br>出现Exception EaccessViolation in module netapi32.dll at ……<br>等错误
 
第二个参数是字符指针,不是整型.
 
我很菜的,能不能提供详细的代码?
 
后退
顶部