开发者

Force closing shared file: NetFileClose

I'm trying to make a program that force the connection to a shared file. I found the system call NetFileClose and it seems to be very simple; but when I call it, it retourned me always the error code number 53. Like parameter I give servername NULL (I try also with 0 but with the same result) and fileid a correct value. I logged in with an administrator user.

Definition:

function NetFileClose(servername : LPSTR; fileid: DWORD) 开发者_如何学运维: NET_API_STATUS;

implementation

const
  netapi32 = 'Netapi32.dll';

function NetFileClose; external netapi32 name 'NetFileClose';


According to this thread at EDN, you need to add stdcall to the definition.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜