Using API Constants

All manifest constants defined in laygodef.h are defined with the same names and values in Laygo32.bas. Therefore they can be used in Visual Basic in exactly the way they are documented for the C language API. For instance, the C code:

if (state == lgo_STATE_DATA_TRANSFER_XON)
{
    ConnectNotify();
}
else if (state == lgo_STATE_WAITING_FOR_REMOTE_CONFIRMATION)
{
    DisconnectNotify();
}
else if (state == lgo_STATE_OPEN)
{
    OpenNotify();
}

can be written in Visual Basic as:

If state = STATE_DATA_TRANSFER_XON Then
    ConnectNotify
ElseIf state = STATE_WAITING_FOR_REMOTE_CONFIRMATION Then
    DisconnectNotify
ElseIf state = STATE_OPEN Then
    OpenNotify
End If