trisol Posted November 19, 2010 Share Posted November 19, 2010 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 More sharing options...
AzeoTech Posted November 21, 2010 Share Posted November 21, 2010 BOOL is defined somewhere in the header chain because its not a valid C data type. Its probably defined as an unsigned long, but it could be an unsigned short, or an unsigned byte. BYTE is almost certainly an unsigned byte. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.