Returns information about which services are supported on the network.
DWORD NPGetCaps( DWORD ndex );
The NPGetCaps function returns either a constant or a bitmask, depending on the value of the nIndex parameter. A few of the nIndex values cause a constant to be returned. But in most cases, the nIndex parameter specifies which set of services to query, and the returned value is a bitmask that indicates which services in this set are supported. In these cases, a zero return value indicates that none of the services in the set are supported.
The following list shows the values that nIndex may contain, each followed by a description of what is returned for that value.
####WNNC_ADMIN Returns a mask that indicates which of the administrative functions the network provider supports. This can be one or more of the following.
####WNNC_CONNECTION Returns a mask that indicates which of the connection functions the network provider supports. This can be one or more of the following.
|WNNC_CON_DEFER (0x00000080)||Deferred connections are supported with NPAddConnection3.|
####WNNC_DIALOG Returns a mask that indicates which of the dialog box functions the network provider supports. This can be one or more of the following.
|WNNC_DLG_PERMISSIONEDITOR||This flag is not used.|
|WNNC_DLG_PROPERTYDIALOG||NPPropertyDialog and NPGetPropertyText|
Returns a mask that indicates which scopes of enumeration, if any, are supported. For more information about enumeration scopes, see the Parameters section in the reference topic NPOpenEnum. This can be one or more of the following.
|Flag||Enumeration type supported|
|WNNC_ENUM_GLOBAL (0x00000001)||NPOpenEnum is implemented and supports a scope of all resources on the network. In other words, NPOpenEnum supports RESOURCE_GLOBALNET.|
|WNNC_ENUM_LOCAL (0x00000002)||NPOpenEnum is implemented and supports a scope of all currently connected resources. In other words, NPOpenEnum supports RESOURCE_CONNECTED.|
|WNNC_ENUM_CONTEXT (0x00000004)||NPOpenEnum is implemented and supports a scope of all resources associated with the user's current and default network context. In other words, NPOpenEnum supports RESOURCE_CONTEXT.|
Note If WNNC_ENUMERATION returns a nonzero bitmask, you know that the network provider supports NPOpenEnum and can infer that the provider also supports NPEnumResource and NPCloseEnum. This is because a network provider that supports NPOpenEnum is also expected to support NPEnumResource and NPCloseEnum.
####WNNC_NET_TYPE Returns a value that indicates the type of network that the network provider supports. The high word contains the provider type, and the low word may contain a subtype. Developers who are working on new providers should obtain a new network type from Microsoft. A provider that does not return the correct network type may cause the WNET functions to behave in unpredictable ways.
The network type can be one of the following.
- WNNC_NET_FJ REDIR
####WNNC_SPEC_VERSION Returns WNNC_SPEC_VERSION51. The high and low words of the return value contain the major and minor version numbers of the WNet API specification supported by the credential manager.
####WNNC_START Returns one of the following values to indicate if and when the provider is likely to start. The MPR will wait for the longest time-out period specified by all network providers.
|0x0||Indicates the provider will not start, for example, if it is disabled. The MPR will not retry starting the network provider.|
|Time||Indicates the time, in milliseconds, until the provider starts.|
|0xFFFFFFFF||Indicates that the provider does not know when it will start. If the network provider returns this value, the MPR uses its default value, 60 seconds.|
|0x1||Indicates that the provider is already started.|
####WNNC_USER Returns WNNC_USR_GETUSER if the network provider supports the NPGetUser function.
When a start time is returned by NPGetCaps, the MPR uses this value to determine when to try to start all network providers again. MPR uses the longest start time returned by the providers it called.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|