mqDeleteBag
The mqDeleteBag call deletes the specified bag.
Syntax for mqDeleteBag
- mqDeleteBag (Bag, CompCode, Reason)
Parameters for mqDeleteBag
- Bag (MQHBAG) - input/output
- The handle of the bag to be deleted. This must be the handle of a bag created by the user, not
the handle of a system bag. MQRC_SYSTEM_BAG_NOT_DELETABLE results if we specify the handle of a
system bag. The handle is reset to MQHB_UNUSABLE_HBAG.
If the bag contains system-generated bags, they are also deleted.
- CompCode (MQLONG) - output
- Completion code.
- Reason (MQLONG) - output
- Reason code qualifying CompCode.
The following reason
codes indicating error conditions can be returned from the mqDeleteBag call:
- MQRC_HBAG_ERROR
- Bag handle not valid, or invalid parameter address, or parameter location is read only.
- MQRC_SYSTEM_BAG_NOT_DELETABLE
- System bag cannot be deleted.
Usage notes for mqDeleteBag
- Delete any bags created with mqCreateBag.
- Nested bags are deleted automatically when the containing bag is deleted.
C language invocation for mqDeleteBag
mqDeleteBag (&Bag, CompCode, Reason);Declare the parameters as follows:
MQHBAG Bag; /* Bag handle */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying CompCode */
Visual Basic invocation for mqDeleteBag
(Supported on Windows only.)
mqDeleteBag Bag, CompCode, ReasonDeclare the parameters as follows:
Dim Bag; As Long 'Bag handle' Dim CompCode As Long 'Completion code' Dim Reason As Long 'Reason code qualifying CompCode'Parent topic: MQAI calls