MprInfoBlockSet function (mprapi.h)

The MprInfoBlockSet creates a new header that is identical to an existing header with a specified block modified.

Syntax

DWORD MprInfoBlockSet(
  [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 modify the specified block.

[in] dwInfoType

Specifies the type of block to change. The types available depend on the transport: IP or IPX.

[in] dwItemSize

Specifies the size of each item in the block's new data.

[in] dwItemCount

Specifies the number of items of size dwItemSize to be copied as the new data for the block.

[in] lpItemData

Pointer to the new data for the block. This should point to a buffer with a size (in bytes) 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
ERROR_INVALID_PARAMETER
One (or more) required parameters is NULL, or no block of type dwInfoType exists in the header.
Other
The call failed. Use FormatMessage to retrieve the error message that corresponds to the returned error code.

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

See also

FormatMessage

MprInfo Functions and Information Headers

MprInfoBlockAdd

MprInfoBlockRemove