DLL with BOOL definition


Recommended Posts

I am trying to read digital I/Os build into the controller running DAQ.

The manufacturer provides an API dll with functions that always return a BOOL.

For example:

BOOL SusiIOReadEx(BYTE PinNum, BOOL *status)

where PinNum is the "address" of the digital input to be read and Status is a pointer to a variable where the digital input status will be returned to.

The Return is 1 for success and 0 for failure to read.

using the extern function in DAQ with BOOL definition returns an error "invalid argument specified". The documentation for function prototypes does NOT list bool as a valid data type!

Does this mean I cannot use these dll-functions?

(I tried using different byte instead of bool and the extern works but the function does not return the digital status.)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.