Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The NetFileClose2 function forces a resource to close. This function can be used when an error prevents closure by any other means.
This function is only supported on Windows Me/98/95. On other versions of Windows, use the NetFileClose function instead.
Syntax
extern API_FUNCTION NetFileClose2(
__in const char *pszServer,
__in unsigned long ulFileId
);
Parameters
pszServer [in]
Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.ulFileId [in]
Specifies the file identifier of the resource instance to close. You can retrieve this value by calling the NetFileEnum function.
Return Value
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.
| Return code | Description |
|---|---|
ERROR_ACCESS_DENIED |
The user does not have access to the requested information. |
NERR_NetNotStarted |
The workstation driver is not installed. |
NERR_ServerNotStarted |
The Server service is not started. |
NERR_RemoteErr |
A remote API error occurred. |
NERR_FileIdNotFound |
There is not an open file with the specified identification number. |
Remarks
Only members of the Administrators or Account Operators local group can successfully execute the NetFileClose2 function.
The NetFileClose2 function supports file handles that are larger than 64 kilobytes.
Requirements
| Client | Windows Me, Windows 98, or Windows 95 |
| Header | Svrapi.h |
| Library | Svrapi.lib |
| DLL | Svrapi.dll |
See Also
Network Management Overview
Network Management Functions
NetFile Functions
NetFileEnum
Send comments about this topic to Microsoft
Build date: 1/7/2009