Instantiating a Network Direct Provider
To get the Network Direct providers that are registered on the computer, call the WSCEnumProtocols function. For each protocol that the function returns, compare the members of the WSAPROTOCOL_INFO structure to those specified in Registering a Network Direct Provider. If the member values match, the protocol may be a Network Direct provider.
To determine if the provider is a Network Direct provider, you must try to instantiate the INDProvider interface.
The following steps show how to instantiate the provider:
- Load the provider's DLL. To get the path to the DLL, call the WSCGetProviderPath function using the ProviderId member from the WSAPROTOCOL_INFO structure.
- Call the library's DllGetClassObject entry point to get an IClassFactory interface.
- Use the factory's CreateInstance method to instantiate the INDProvider interface.
Now that you have a provider, you need to determine if the provider supports the IP address that you want to use. To determine the list of IP address that the provider supports, call the INDProvider::QueryAddressList method.
For details on getting an interface to the Network Direct adapter that you want to use, see Getting an Interface to a Network Direct Adapter.
Build date: 7/2/2010