- Linux MultiMedia Studio Computer Accessories User Manual

Using the Library with Various Languages
MN1278 05.2001
27
AfxOleGetMessageFilter()->EnableNotRespondingDialog( FALSE );
The file will have to include afxole.h
3.3 Visual Basic 6
3.3.1 Error number conversion
The error numbers returned in Err after a function call in Visual Basic differ from the constants defined in
mil.bas. To convert from an Err code (other than 0) to a MIL error, mask off the top 17 bits by ANDing with
&H7FFF and subtract &H200. There is a function called VBErrorToMIL in mil.bas to do this.
Public Function VBErrorToMIL(VBError&) As Long
If VBError& = 0 Then
VBErrorToMIL& = erSUCCESS
Else
VBErrorToMIL& = (VBError& And &H7FFF) - &H200
End If
End Function
If the result of this function is negative, the error was produced by VB, not the Mint Interface Library.
3.3.2 A Visual Basic Tutorial.
This section will guide you through creating a visual basic application. The application will contain one button
which will toggle the state of the enable output for axis 0. Note that the axis must already be configured as servo
(use the Mint WorkBench to do this).
1. Open Visual Basic and create a ‘New’ ‘Standard Exe.’
2. Select ‘Components’ from the ‘Project’ menu.