ISCardDatabase::ListCardInterfaces 方法
[ ListCardInterfaces 方法可用于“要求”部分中指定的操作系统。 它不适用于 Windows Server 2003 Service Pack 1 (SP1) 及更高版本、Windows Vista、Windows Server 2008 和操作系统的后续版本。 智能卡模块提供类似的功能。]
ListCardInterfaces 方法检索指定智能卡支持的所有接口的标识符 (GUID ) 。
语法
HRESULT ListCardInterfaces(
[in] BSTR bstrCardName,
[out] LPSAFEARRAY *ppInterfaceGuids
);
parameters
-
bstrCardName [in]
-
智能卡的名称。
-
ppInterfaceGuids [out]
-
如果成功,则指向接口 GUID 的指针;如果操作失败,则为 NULL 。
返回值
方法返回以下可能值之一。
返回代码 | 说明 |
---|---|
|
操作已成功完成。 |
|
参数无效。 |
|
在 ppInterfaceGuids 中传递了错误的指针。 |
|
内存不足。 |
备注
若要检索智能卡的主要服务提供程序,请调用 GetProviderCardId。
若要检索所有已知的智能卡,读取器和读取器组分别调用 ListCards、ListReaders 和 ListReaderGroups。
有关此接口提供的所有方法的列表,请参阅 ISCardDatabase。
除了上面列出的 COM 错误代码之外,如果调用智能卡函数来完成请求,则此接口可能返回智能卡错误代码。 有关详细信息,请参阅 智能卡返回值。
示例
以下示例演示如何检索指定的智能卡支持的接口标识符。
BSTR bstrCard = NULL;
LPSAFEARRAY pGuids = NULL;
HRESULT hr;
bstrCard = SysAllocString(L"GemSAFE");
// Call the function for the specified card.
hr = pISCDataBase->ListCardInterfaces(bstrCard,
&pGuids);
if (FAILED(hr))
{
printf("Failed ListCardInterfaces\n");
// Take other error handling action as needed.
}
else
{
// Use the safe array as needed.
// ...
// Free BSTR when done.
if (bstrCard)
SysFreeString(bstrCard);
}
要求
要求 | 值 |
---|---|
最低受支持的客户端 |
Windows XP [仅限桌面应用] |
最低受支持的服务器 |
Windows Server 2003 [仅限桌面应用] |
终止客户端支持 |
Windows XP |
终止服务器支持 |
Windows Server 2003 |
标头 |
|
类型库 |
|
DLL |
|
IID |
IID_ISCardDatabase定义为 1461AAC8-6810-11D0-918F-00AA00C18068 |
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈