MprInfoBlockAdd function (mprapi.h)
The MprInfoBlockAdd function creates a new header that is identical to an existing header with the addition of a new block.
Syntax
DWORD MprInfoBlockAdd(
[in] LPVOID lpHeader,
[in] DWORD dwInfoType,
[in] DWORD dwItemSize,
[in] DWORD dwItemCount,
[in] LPBYTE lpItemData,
[out] LPVOID *lplpNewHeader
);
Parameters
[in] lpHeader
Pointer to the header in which to add the new block.
[in] dwInfoType
Specifies the type of block to add. The types available depend on the transport: IPv4, IPv6, or IPX.
Windows Server 2008: If dwInfoTYpe contains IP_ROUTE_INFO, lpItemData must point to a INTERFACE_ROUTE_INFO structure.
[in] dwItemSize
Specifies the size of each item in the block to be added.
[in] dwItemCount
Specifies the number of items of size dwItemSize to be copied as data for the new block.
[in] 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.
[out] lplpNewHeader
Pointer to a pointer variable that, on successful return, points to the new header.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following values.
Value | Description |
---|---|
|
The lpHeader, lplpNewHeader, or lpItemData parameter is NULL, or a block of type dwInfoType already exists in the header. |
|
The call failed. Use FormatMessage to retrieve the error message that corresponds to the returned error code. |
Remarks
After adding an information block, obtain the new size of the information header by call MprInfoBlockQuerySize.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |