MprInfoBlockAdd

[This is preliminary documentation and subject to change.]

The MprInfoBlockAdd function creates a new header that is identical to an existing header with the addition of the single block.

DWORD MprInfoBlockAdd(
  LPVOID   lpInfoBlock,      // pointer to existing header 
  DWORD    dwInfoType,       // info type of new block 
  DWORD    dwItemSize,       // size of items in new block 
  DWORD    dwItemCount,      // number of items in new block 
  LPBYTE   lpItemData,       // data for new block
  LPVOID * lplpNewInfoBlock  // new header (incl. new block)
);
 

Parameters

lpInfoBlock
Pointer to the header to which to add the new block.
dwInfoType
Specifies the type of block to add. The types available depend on the transport: IP or IPX.
dwItemSize
Specifies the size of each item in the block to be added.
dwItemCount
Specifies the number of items of size dwItemSize to be copied as data for the new block.
lpItemData
Pointer to the data for the new block. The size in bytes of this buffer should be equal to the product of dwItemSize and dwItemCount.
lplpNewInfoBlock
Pointer to a pointer variable that, on successful return, points to the new header.

Return Values

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value will be one of the following values.

Value Description
ERROR_INVALID_PARAMETER The lpInfoBlock, lplpNewInfoBlock or lpItemData parameters are NULL, or a block of type dwInfoType already exists in the header.
Other The call failed. Use FormatMessage to retrieve the error message corresponding to the returned error code.

See Also

FormatMessage, MprInfoBlockRemove, MprInfoDuplicate