ISCardLocate::ConfigureCardNameSearch

The ConfigureCardNameSearch method specifies the card names to be used in the search for the smart card.

HRESULT ConfigureCardNameSearch(
  LPSAFEARRAY pCardNames,
  LPSAFEARRAY pGroupNames, 
  BSTR bstrTitle,
  LONG lFlags
);
 

Parameters

pCardNames
[in] Pointer to an OLE Automation safe array of card names in BSTR form.
pGroupNames
[in, defaultvalue(NULL )] Pointer to an OLE Automation safe array of names of card/reader groups in BSTR form to add to the search.
bstrTitle
[in, defaultvalue("")] Search common control dialog title.
lFlags
[in, defaultvalue(1)] Specifies when user interface is displayed:
Flag Meaning
SC_DLG_MINIMAL_UI Displays the dialog only if the card being searched for by the calling application is not located and available for use in a reader. This allows the card to be found, connected (either through internal dialog mechanism or the user callback functions), and returned to the calling application.
SC_DLG_NO_UI Causes no UI display, regardless of the search outcome.
SC_DLG_FORCE_UI Causes UI display regardless of the search outcome.

Return Values

The possible return values are the following:

Value Meaning
S_OK Public key retrieved successfully.
E_INVALIDARG Invalid parameter.
E_POINTER A bad pointer was passed in pCardNames or pGroupNames.
E_OUTOFMEMORY Out of memory.

Remarks

To locate the smart card, call FindCard.

To set the search criteria to the interfaces a smart card supports, call ConfigureCardGuidSearch.

For a list of all the methods provided by the ISCardLocate interface, see ISCardLocate.

In addition to the COM error codes listed above, this interface may return a smart card error code if a smart card function was called to complete the request. For information on smart card error codes, see Smart Card Error Codes.

QuickInfo

  Windows NT: Use version 4.0 SP3 and later.
  Windows: Use Windows 95 OSR2.1.
  Windows CE: Unsupported.
  Header: Declared in scardmgr.h.
  Import Library: scardmgr.tlb.

See Also

FindCard, ISCardLocate