The NetBiosOpen API opens a handle to a particular network device driver.
Restrictions
A call to this API must be issued locally. This API can be called only from an OS/2 workstation.
Before an application can open a device driver, the LAN Server redirector software must be running.
A device driver's handle cannot be inherited by child processes. Only the process creating a device driver can pass the handle to another function.
#include <netcons.h>
#include <ncb.h>
#include <netbios.h>
NetBiosOpen(devname, reserved,
openopt, handle); /* 16 bit */
NetBios32Open(devname, reserved,
openopt, handle); /* 32 bit */
Parameters
devname
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. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_FILE_NOT_FOUND │ 2 │ The file was not found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is not
│
│ │ │ valid. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘