#define NATIVE #define MQE_PLATFORM = PLATFORM_WINCE #include<published/MQe_API.h>All of the code, including variable declarations, is inside the main method. You require structures for error checking. The MQeExceptBlock structure is passed into all functions to get the error information back. In addition, all functions return a code indicating success or failure, which is cached in a local variable:
/* ... Local return flag */ MQERETURN rc; MQeExceptBlock exceptBlock;You must create a number of strings, for example for the queue manager name:
MQeStringHndl hLocalQMName; ... if ( MQERETURN_OK == rc ) { rc = mqeString_newUtf8(&exceptBlock, &hLocalQMName, "LocalQM"); }The first API call made is session initialize:
/* ... Initalize the session */ rc = mqeSession_initialize(&exceptBlock);
Parent topic: Developing the C application