Expand Minimize

DhcpHlprAddV4PolicyExpr function

The DhcpHlprAddV4PolicyExpr function allocates, initializes, and adds a DHCP server policy expression to a DHCP server policy.

Syntax


DWORD DHCP_API_FUNCTION DhcpHlprAddV4PolicyExpr(
  _Inout_  LPDHCP_POLICY Policy,
  _In_     DWORD ParentExpr,
  _In_     DHCP_POL_LOGIC_OPER Operator,
  _Out_    DWORD *ExprIndex
);

Parameters

Policy [in, out]

Pointer to a DHCP_POLICY structure that contains the policy to modify

ParentExpr [in]

Integer that specifies the expression index that corresponds to this constituent condition.

Operator [in]

A DHCP_POL_LOGIC_OPER enumeration that defines how the expression is to be evaluated in terms of the results of its constituents.

ExprIndex [out]

Pointer to a DWORD that contains the newly created expression's index in the DHCP server policy.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns one of the following or an error code from DHCP Server Management API Error Codes.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the parameters were invalid.

ERROR_NOT_ENOUGH_MEMORY

Not enough memory available.

ERROR_DHCP_POLICY_BAD_PARENT_EXPR

The parent expression specified does not exist.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpHlprAddV4PolicyCondition
DhcpHlprAddV4PolicyRange
DhcpHlprCreateV4Policy
DhcpHlprFreeV4Policy
DhcpHlprIsV4PolicySingleUC
DhcpHlprIsV4PolicyValid
DhcpHlprIsV4PolicyWellFormed
DhcpHlprResetV4PolicyExpr
DhcpHlprModifyV4PolicyExpr

 

 

Community Additions

ADD
Show:
© 2014 Microsoft