DSGetLastError

Use the DSGetLastError function to return the calling thread's last error code value.

Syntax


int DSGetLastError(void);

Return Values

The return value is the last error code value. The "Return Values" section of each reference page notes the conditions under which the function sets the last error code.

Remarks

Use DSGetLastError immediately after any function whose return value on failure might contain useful data, otherwise a later, successful function might reset the value back to 0 (DSJE_NOERROR).

Note: Multiple threads do not overwrite each other's error codes.