|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( ULONG ulNIC );
[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 "255.255.255.255") to the correct binary number.
This method returns an HRESULT value. Possible return codes include, but are not limited to, the values shown in the following table.
|E_INVALIDARG||Invalid IP address.|
|E_UNEXPECTED||The operation could not be performed because the filter is not stopped.|
|S_OK||The method succeeded.|
// Assign the NIC "127.0.0.1" as an example. In a real application, // you would obtain a valid NIC at run time. ULONG ulNIC = inet_addr("127.0.0.1"); hr = pConfig->SetNetworkInterface(ulNIC);