# DeviceLogin()

Opens a device session with a shared device.

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function DeviceLogin(ByVal userName As String, ByVal password As String) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo DeviceLogin(System.String userName, System.String password)

## Parameters

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 INVALIDLOGIN error is returned.
- If the session is already opened by another user, the SESSIONINUSE error is returned.