PxeDhcpGetOptionValue function (wdspxe.h)
Retrieves an option value from a DHCP packet.
Syntax
DWORD PXEAPI PxeDhcpGetOptionValue(
[in] PVOID pPacket,
[in] ULONG uPacketLen,
[in] ULONG uInstance,
[in] BYTE bOption,
[out, optional] PBYTE pbOptionLen,
[out, optional] PVOID *ppOptionValue
);
Parameters
[in] pPacket
Pointer to a reply packet allocated with the PxePacketAllocate function.
[in] uPacketLen
Length of the packet pointed to by the pReplyPacket parameter.
[in] uInstance
One-based index that specifies which instance of the bOption parameter to retrieve.
[in] bOption
Option whose value will be retrieved.
[out, optional] pbOptionLen
Address of BYTE which will receive the length of the option value.
[out, optional] ppOptionValue
Address of PVOID which will receive the address of the option value inside the packet.
Return value
Common return values are listed in the following table. For all other failures, an appropriate Windows error code is returned.
Return code/value | Description |
---|---|
|
The option was found and a pointer to the value was returned. |
|
The option was not located. |
|
The packet is not a valid DHCP packet. This test is not as thorough as the tests used by the PxeDhcpIsValid function; only the packet length and magic cookie are verified. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008, Windows Server 2003 with SP2 [desktop apps only] |
Target Platform | Windows |
Header | wdspxe.h |
Library | WdsPxe.lib |
DLL | WdsPxe.dll |