MBM.XChgCreateP (FUN)

( CAA_MemBlockMan.Library)

An Exchange will be created from the memory of an IEC data structure starting at address pMemory. The further functionality corresponds to function MBM.XChgCreateH. The area size szMemSize can be retrieved via function MBM.XChgGetSize.

插图 572: MBM.XChgCreateP

Input:

szBlockSize

CAA.SIZE

Size of a certain block.

ctNumPrios

CAA.COUNT

Number of priorities.

szMemSize

CAA.SIZE

Size of the memory area provided by the IEC.

pMemory

CAA.PVOID

Start address of the memory area provided by the IEC.

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.