tags:

views:

68

answers:

0

Hi, 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';