MBM.XChgCreateH (FUN)

( CAA_MemBlockMan.Library)

Out of the Heap an Exchange will be created. If szBlockSize is 0 at the call, a NormalExchange will be created. If at the call the number of desired messages is passed in ctNumMsg, and the required message size in szBlockSize, a ResourceExchange will be created. The corresponding number of message objects will be generated. Then with theses message objects the ResourceExchange object will be initialized. If no callback should be done, the value CB.gc_cbNULL must be passed for eSendMsg, eReceiveMsg or eXchgEmpty. Via ctMumPrios the number of possible priorities can be specified.

Input:

ctNumMsg

CAA.COUNT

Number of messages to be created.

szBlockSize

CAA.SIZE

Size of a certain message.

ctNumPrios

CAA.COUNT

Number of priorities.

eSendMsg

CB.EVENT

 

eReceiveMsg

CB.EVENT

 

eXchgEmpty

CB.EVENT

 

peError

POINTER TO MBM.ERROR

Pointer on error ID.

Output:

hXChg

CAA.HANDLE

Handle of the new Exchange