3.1.4.29 R_DhcpGetVersion (Opnum 28)

The R_DhcpGetVersion method retrieves the major and minor version numbers of the DHCP server. The version numbers can be used to determine the functionality supported by the DHCP server.

 DWORD R_DhcpGetVersion(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [out] LPDWORD MajorVersion,
   [out] LPDWORD MinorVersion
 );

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

MajorVersion: This is a pointer to a DWORD in which the major version of the DHCP server is returned. The MajorVersion parameter MUST be allocated by the client before the call.

MinorVersion: This is a pointer to a DWORD in which the minor version of the DHCP server is returned. The MinorVersion parameter MUST be allocated by the client before the call.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

The opnum field value for this method is 28.

When processing this call, the DHCP server MUST do the following:

  • Retrieve the values of the DHCPServerMajorVersion and DHCPServerMinorVersion ADM elements,<32> and copy them into the locations pointed to by the MajorVersion parameter and the MinorVersion parameter. Return ERROR_SUCCESS.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].