The NetBiosClose API closes a handle to a network device driver. It ends access to the driver by invalidating its handle and canceling any outstanding network control blocks (NCBs).
Restrictions
A call to this API must be issued locally. This API can be called only from an OS/2 workstation.
#include <netcons.h> #include <ncb.h> #include <netbios.h> NetBiosClose(handle, reserved); /* 16 bit */ NetBios32Close(handle, reserved); /* 32 bit */Parameters
handle
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬───────┬────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ VALIDATED_LOGON │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_HANDLE │ 6 │ The specified handle is not valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is not
│
│ │ │ valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_OS2IoctlError │ 2134 │ An internal error occurred when │
│ │ │ calling the workstation driver. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_WkstaNotStarted │ 2138 │ The Requester service has not been
│
│ │ │ started. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘