MQeFieldsAlloc

Description
Allocates a new MQeFields object and returns a handle to it. The handle represents an MQeFields object. It must be specified on all subsequent calls from the application that access the MQeFields object. This handle ceases to be valid when the MQeFieldsFree call is issued, or when the unit of processing that defines the scope of the handle terminates.

Syntax
#include <hmq.h>
MQEHFIELDS MQeFieldsAlloc( MQEHSESS hSess, MQECHAR * Type, 
              MQEINT32 * pCompCode, MQEINT32 * pReason) 

Parameters

MQEHSESS hSess - input
The session handle, returned by MQeInitialize.

MQECHAR * Type - input

"" or NULL
An untyped MQeFields object that is used for restore, MQeFieldsRestore.

com.ibm.mqe.MQeFields
The base MQeFields object type

com.ibm.mqe.MQeMsgObject
A field object with two additional MQeFields, a 64 bit unique identifier, and the string name of the origin queue manager.

com.ibm.mqe.MQeAdminMsg

com.ibm.mqe.MQeQueueAdminMsg

com.ibm.mqe.MQeQueueManagerAdminMsg

com.ibm.mqe.MQeFragmentor

A non-recognized type string defaults to the base field object type with its type string set to the input type string.

MQEINT32 * pCompCode - output
MQECC_OK, MQECC_WARNING or MQECC_ERROR.

MQEINT32 * pReason - output
If the returned *pCompCode equals MQECC_ERROR, *pReason may have any of the following values:

MQE_EXCEPT_INVALID_HANDLE

MQE_EXCEPT_ALLOCATION_FAILED

Return Value

MQEHFIELDS hFlds
The handle to an MQeFields object. If any error occurs during the allocation, then an MQEHANDLE_NULL is returned.

Implementation
On PalmOS 3.0 the underlying storage allocation element comes from a record in the database.

Example
#include <hmq.h>
static static MQECHAR const * FieldsType = "com.ibm.mqe.MQeFields";
MQEHSESS  hSess;
MQEINT32  compcode;
MQEINT32  reason;
MQEHFIELDS hFlds;
 
hSess = MQeInitialize("MyAppsName", &compcode, &reason);
hFlds = MQeFieldsAlloc( hSess, FieldsType, &compcode, &reason);

See Also



© IBM Corporation 2002. All Rights Reserved