Returns the error string associated with the specified error number.
GxPResGetErrorString (nError , pszMsg, nErrorMaxLen, pnStatus)
Name |
Type |
Description |
nError |
SHORT |
Error number. |
pszMsg |
PSTR |
Buffer to the returned error string. |
nErrorMaxLen |
SHORT |
The size of the error string buffer. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function returns the error string associated with the nError as returned from other driver functions.
The following table displays the possible error values; not all errors apply to this board type:
Resource Errors
-1 Board does not exist in this slot
-2 Unable to open the HW device/Service
-3 Different board exist in the specified PCI slot
-4 PCI slot not configured properly. You may configure it by using the PCIExplorer from the Control Panel
-5 Unable to register the PCI device
-6 Unable to allocate system resource or memory for the PCI device
-7 Too many boards
-8 Unable to create panel
-9 Unable to create a Windows timer
-10 Invalid board EEPROM
-11 Not in calibration mode
-12 Board is not calibrated
General Parameter Errors
-20 Invalid error
-20 Invalid parameter
-21 Invalid PCI slot number
-22 Invalid board handle
-23 Invalid string length number
Parameter Errors
-40 Invalid channel number
-41 Invalid group number
-42 Invalid mode
-43 Invalid value
The following example initializes the board. If the initialization failed, the following error string is printed:
CHAR sz[256];
SHORT nStatus, nHandle;
..
Gx1164Initialize (3, &Handle, &Status);
if (nStatus<0)
{ GxPResGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // prints the error string returns
}