# cbDeviceLogin()

Opens a device session with a shared device.

## Function Prototype

C/C++

int cbDeviceLogin(int BoardNum, char* UserName, char* Password);

Visual Basic

Function cbDeviceLogin(ByVal BoardNum&, UserName$, Password$) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

UserName

A null-terminated string that identifies the user name used to log in to a device session.

Password

A null-terminated string that identifies the password used to log in to a device session.

## Returns

- Error code or 0 if no errors.

## Notes

- If the user name or password is invalid, the function returns INVALIDLOGIN.
- If the session is already opened by another user, the function returns SESSIONINUSE.