Platform SDK: Internet Protocol Helper

SetIfEntry

Use the SetIfEntry function to set the administrative status of an interface.

DWORD SetIfEntry( 
  PMIB_IFROW pIfRow    // specifies interface and status
);

Parameters

pIfRow
Pointer to a MIB_IFROW structure. The dwIndex member of this structure should specify the interface on which to set administrative status. The dwAdminStatus member specifies the new administrative status. The dwAdminStatus member can be one of the following values.
Value Meaning
MIB_IF_ADMIN_STATUS_UP The interface is administratively enabled.
MIB_IF_ADMIN_STATUS_DOWN The interface is administratively disabled.

Return Values

If the function succeeds, the return value is NO_ERROR.

If the function fails, use FormatMessage to obtain the message string for the returned error.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
  Windows 95/98: Requires Windows 98.
  Header: Declared in Iphlpapi.h.
  Library: Use Iphlpapi.lib.

See Also

MIB_IFROW