DRAFT: Take more than your usual care.

NetBiosReset

A service DLL running in a SVCHOST process calls this function to reset a LANA.

Declaration

Access to the function is indirect, through the NetBiosReset member of the SVCHOST_GLOBAL_DATA structure whose address was passed to the service DLL’s SvchostPushServiceGlobals function. The member has the following type definition:

typedef DWORD (WINAPI *) LPNET_BIOS_RESET (UCHAR Lana);

Parameters

The Lana argument is a 0-based number representing a Local Area Network Adapter (LANA).

Return Value

The function returns zero for success, else a Win32 error code.

Behaviour

If the given LANA is not already reset, the function executes the NetBIOS command NCBRESET (0x32) for the given LANA. The ncb_callname member in the NCB is set to the bytes 0xFE, 0x00, 0xFD, 0x00. If the command succeeds, the function records the LANA as having been reset, and the function succeeds.

If the command fails, the error code that the function returns is obtained from the NCB return code according to the following table.

NCB Return Code Win32 Error Code
NRC_NO_RES NERR_NoNetworkResource
NRC_DUPNAME NERR_AlreadyExists
NRC_NAMTFUL NERR_TooManyNames
NRC_ACTSES NERR_DeleteLater
NRC_REMTFUL ERROR_REM_NOT_LIST
NRC_NOCALL NERR_NameNotFound
NRC_NOWILD ERROR_INVALID_PARAMETER
NRC_INUSE NERR_DuplicateName
NRC_NAMERR ERROR_INVALID_PARAMETER
NRC_NAMCONF NERR_DuplicateName
else NERR_NetworkError

Availability

The NetBiosReset function is exposed to service DLLs by SVCHOST.EXE in versions 5.1 and higher.