Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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:

  1. 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.
  2. Call the library's DllGetClassObject entry point to get an IClassFactory interface.
  3. 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.

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.