You need to include just one header file to access the APIs. You must
include the NATIVE definition to indicate that this is not the CBindings.
You must also define the MQE_PLATFORM upon which you intend to run the application.
#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:
/* ... Initialize the session */
rc = mqeSession_initialize(&exceptBlock);