MQeTerminate

Description
Terminates an application's session with the WebSphere MQ Everyplace subsystem.

Syntax
#include<hmq.h>
MQEVOID MQeTerminate( MQEHSESS hSess, 
				MQEINT32 * pCompCode, MQEINT32 * pReason)

Parameters

MQEHSESS hSess - input
The session handle returned by MQeInitialize

MQEINT32 * pCompCode - output
MQECC_OK, MQECC_WARNING or MQECC_ERROR.

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

MQE_WARN_SESSION_DELETED
A session with the same name was deleted. This could happen if a session was left open because the application that opened it crashed or exited without calling the MQeTerminate API.

MQE_EXCEPT_INVALID_HANDLE

Return Value

MQEVOID
None

Example
#include <hmq.h>
MQEHSESS hSess;
MQEINT32  compcode;
MQEINT32  reason;
 
hSess = MQeInitialize("MyAppsName", &compcode, &reason);
if (hSess!=NULL) {
   MQeTerminate(hSess, &compcode, &reason);
}
 

See Also
MQeInitialize


© IBM Corporation 2002. All Rights Reserved