Microsoft DirectX 9.0


The implementation of this method is provided as sample code with the DirectShow SDK. It is not a supported DirectShow API.

The SetNetworkInterface method sets the Network Interface Card (NIC) address that the filter will use.


HRESULT SetNetworkInterface(



[in]  Specifies the NIC address, in network order (bytes ordered from left to right). You can use the inet_addr function to convert a standard dotted-format string (such as "") to the correct binary number.

Return Values

This method returns an HRESULT value. Possible return codes include, but are not limited to, the values shown in the following table.

Value Description
E_INVALIDARG Invalid IP address.
E_UNEXPECTED The operation could not be performed because the filter is not stopped.
S_OK The method succeeded.

Example Code

// Assign the NIC "" as an example. In a real application, 
// you would obtain a valid NIC at run time.
ULONG ulNIC = inet_addr("");
hr = pConfig->SetNetworkInterface(ulNIC);

See Also