Platform SDK: Network Management |
The NetFileClose function forces a resource to close. This function can be used when an error prevents closure by any other means. You should use NetFileClose with caution because it does not write data cached on the client system to the file before closing the file.
Only members of the Administrators or Account Operators local group can successfully execute the NetFileClose function.
NET_API_STATUS NetFileClose( LPWSTR servername, DWORD fileid );
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_ACCESS_DENIED | The user does not have access to the requested information. |
ERROR_FILE_NOT_FOUND | The file was not found. |
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmshare.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, NetFile Functions