2 system, System, 2system – Digilent WaveForms User Manual

Page 7

Advertising
background image

WaveForms™ SDK Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 7 of 85

2

System

FDwfGetLastError(DWFERC *pdwferc)

Parameters:

-

pdwferc - Variable to receive error code.

The function above is used to retrieve the last error code in the calling process. The error code is cleared when
other API functions are called and is only set when an API function fails during execution. Error codes are declared
in dwf.h:

API Error Codes

Error Code Definition

dwfercNoErc

No error occurred.

dwfercUnknownError

Call waiting on pending API time out.

dwfercApiLockTimeout

Call waiting on pending API time out.

dwfercAlreadyOpened

Device already opened.

dwfercNotSupported

Device not supported.

dwfercInvalidParameter0

Parameter 0 was invalid in last API call.

dwfercInvalidParameter1

Parameter 1 was invalid in last API call.

dwfercInvalidParameter2

Parameter 2 was invalid in last API call.

dwfercInvalidParameter3

Parameter 3 was invalid in last API call

.



FDwfGetLastErrorMsg
(

char

szError[512])

Parameters:

-

szError - Pointer to buffer to receive error string.

The function above is used to retrieve the last error message. This may consist of a chain of messages, separated
by a new line character, that describe the events leading to the failure.



FDwfGetVersion
(

char

szVersion[32])

Parameters:

-

szVersion - Pointer to buffer to receive version string.

The function above is used to retrieve the version string. The version string is composed of major, minor, and build
numbers (i.e., “2.0.19”).

Advertising