The GetFmiReturnCode function converts link status and error codes to a printable string. This function provides a standard set of error strings for use by Function Management Interface (FMI) applications.
int WINAPI GetFmiReturnCode (
UINT errcode1,
UINT errcode2,
UINT buffer_length,
unsigned char FAR *buffer_addr
);
The errcode1 and errcode2 parameters are set according to the way that GetFmiReturnCode is used:
Codes to be translated | Value for errcode1 | Value for errcode2 |
---|---|---|
The errcode1 and errcode2 values specified in Error and Sense Codes which includes messages for: Open(SSCP) Response, Open(PLU) Confirm, Status-Acknowledge(Nack-2), Status-Control(...) Nack2, Status-Error, and Appl-Data messages with SDI set |
Unchanged from message | Unchanged from message |
The status and qualifier codes returned from a Status-Session message |
status*256 + qualifier |
0xFFFF |
The return code from WinLUAGetLastInitStatus | The return code | 0xFFFF |