WZCQueryInterface function

[WZCQueryInterface is no longer supported as of Windows Vista and Windows Server 2008. Use the WlanQueryInterface function instead. For more information, see About the Native Wifi API. ]

The WZCQueryInterface function provides detailed information for a wireless LAN interface managed by the Wireless Zero Configuration service.

Provides detailed information for a given interface.

Syntax

DWORD WZCQueryInterface(
  _In_    LPWSTR      pSrvAddr,
  _In_    DWORD       dwInFlags,
  _Inout_ PINTF_ENTRY pIntf,
  _Out_   LPDWORD     pdwOutFlags
);

Parameters

pSrvAddr [in]

A pointer to a string containing the name of the computer on which to execute this function. If this parameter is NULL, then the Wireless Zero Configuration service is queried on the local computer.

If the pSrvAddr parameter specified is a remote computer, then the remote computer must support remote RPC calls.

dwInFlags [in]

The fields to be queried. This is a bitmask that can contain any combination of the following flags.

Value Meaning
INTF_DYNFLAGS
0x00000010
Return the value for the dwDynFlags member in the INTF_ENTRY structure pointed to by the pIntf parameter.
INTF_DESCR
0x00010000
Return the value for the wszDescr member in the INTF_ENTRY structure pointed to by the pIntf parameter.
INTF_NDISMEDIA
0x00020000
Return the values for the ulMediaState, ulMediaType, and ulPhysicalMediaType members in the INTF_ENTRY structure pointed to by the pIntf parameter.
INTF_PREFLIST
0x00040000
Return the preferred list of networks in the rdStSSIDList member of the INTF_ENTRY structure pointed to by the pIntf parameter.
INTF_CAPABILITIES
0x00080000
Return the values for the dwCapabilities and the rdNicCapabilities members in the INTF_ENTRY structure pointed to by the pIntf parameter.
INTF_INFRAMODE
0x00200000
Return the value for the nInfraMode member in the INTF_ENTRY structure pointed to by the pIntf parameter.
The nInfraMode member is valid only in some interface context states.
INTF_AUTHMODE
0x00400000
Return the value for the nAuthMode member in the INTF_ENTRY structure pointed to by the pIntf parameter.
The nAuthMode member is valid only in some interface context states.
INTF_WEPSTATUS
0x00800000
Return the value for the nWepStatus member in the INTF_ENTRY structure pointed to by the pIntf parameter.
The nWepStatus member is valid only in some interface context states.
INTF_SSID
0x01000000
Return the value for the rdSSID member in the INTF_ENTRY structure pointed to by the pIntf parameter.
The rdSSID member is valid only in some interface context states.
INTF_BSSID
0x02000000
Return the value for the rdBSSID member in the INTF_ENTRY structure pointed to by the pIntf parameter.
The rdBSSID member is valid only in some interface context states.
INTF_BSSIDLIST
0x04000000
Return the visible list of networks in the rdBSSIDList member of the INTF_ENTRY structure pointed to by the pIntf parameter.
The rdBSSIDList member is valid only in some interface context states.

 

pIntf [in, out]

On input, a pointer to the key of the interface to query. On output, a pointer to the requested interface data. This parameter is a pointer to an INTF_ENTRY structure.

pdwOutFlags [out]

A set of fields successfully retrieved.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value may be one of the following return codes.

Return code Description
ERROR_ARENA_TRASHED
The storage control blocks were destroyed. This error is returned if the Wireless Zero Configuration service has not initialized internal objects.
ERROR_FILE_NOT_FOUND
The system cannot find the file specified. This error is returned if the GUID in the wszGuid member of the INTF_ENTRY structure pointed to by the pIntf parameter did not match any of the wireless LAN interfaces on the local computer.
ERROR_INVALID_PARAMETER
A parameter is incorrect. This error is returned if the pIntf parameter is NULL. This error is returned if the wszGuid member of the INTF_ENTRY structure pointed to by the pIntf parameter is NULL.
ERROR_NOT_ENOUGH_MEMORY
Not enough memory is available to process this request and allocate memory for the query results.
RPC_STATUS
Various error codes.

 

Remarks

The wszGuid member of the INTF_ENTRY structure pointed to by the pIntf parameter must contain an interface GUID for a wireless LAN interface. A list of wireless LAN interfaces can be retrieved by calling the WZCEnumInterfaces function.

The following members of the INTF_ENTRY structure pointed to by pIntf must be set to 0 before a call to the WZCQueryInterface function: rdSSID, rdBSSID, rdBSSIDList, rdStSSIDList, and rdCtrlData.

The Wireless Zero Configuration service does not automotically update media state, even when media connected and disconnected events are received. An application should force a media state refresh by calling the WZCRefreshInterface function before calling the WZCQueryInterface function if the NDIS media state is to be requested (the INTF_NDISMEDIA bit will be set in the dwInFlags parameter).

When the dwInFlags parameter contains INTF_BSSIDLIST, the WZCQueryInterface function does not set the dwOutFlags with INTF_BSSIDLIST if the visible list of networks is empty. When the dwInFlags parameter contains INTF_SSID, the WZCQueryInterface function does not set the dwOutFlags with INTF_SSID if no SSID is available.

If the WZCQueryInterface function returns ERROR_SUCCESS, the caller should call the LocalFree function with the pIntf parameter to release the internal buffers allocated for the data returned once this information is no longer needed. This releases the buffers used by the rdSSID, rdBSSID, rdBSSIDList, rdStSSIDList, and rdCtrlData members of the INTF_ENTRY structure pointed to by pIntf parameter.

Note

The Wzcsapi.h header file and Wzcsapi.lib import library file are not available in the Windows SDK.

 

Requirements

Requirement Value
Minimum supported client
Windows XP with SP2 [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
End of client support
Windows XP with SP3
End of server support
Windows Server 2003
Header
Wzcsapi.h
Library
Wzcsapi.lib
DLL
Wzcsapi.dll

See also

INTF_ENTRY

WZCEapolGetInterfaceParams

WZCEnumInterfaces

WZCRefreshInterface