Programming
BUF-PCI(PC), BUF-PCI(98)
70
List of Return Values
If the return value is 0, the function has been executed normally.
A return value of other 0 indicates that there was an error and the
function process is aborted. You can acquire detailed information about
the error by verifying the function's return value or by executing
function GetLastError. Function GetLastError is a Win32 API
function.
ex) Visual C
hDevice = BufPciOpen(bBoardId);
if( hDevice == INVALID_HANDLE_VALUE ){
wsprintf( szBuffer, "BufPciOpen Error = %x", GetLastError() );
MessageBox( hWnd, szBuffer, " Error information ",
MB_ICONEXCLAMATION );
}
ex) Visual Basic
hDevice = BufPciOpen(bBoardId)
If hDevice = -1 Then
dwErrorStatus = Err.LastDllError
szBuffer = "BufPciOpen Error = " & Hex$(dwErrorStatus)
dwRet = MessageBox(hWnd, szBuffer, " Error information ",
MB_ICONEXCLAMATION)
End If