ISCardCmd::get_AlternateClassId 方法
[ get_AlternateClassId 方法可用于“要求”部分中指定的操作系统。 它不适用于 Windows Server 2003 Service Pack 1 (SP1) 及更高版本、Windows Vista、Windows Server 2008 和操作系统的后续版本。 智能卡模块提供类似的功能。]
get_AlternateClassId 方法检索备用类 ID 的值。 除非先前调用 put_AlternateClassId 设置了备用 ID,否则此方法将失败。
语法
HRESULT get_AlternateClassId(
[out] BYTE *pbyClass
);
参数
-
pbyClass [out]
-
指向返回时包含备用类 ID 值的字节的指针。
返回值
方法返回以下可能的值。
返回代码 | 说明 |
---|---|
|
操作已成功完成。 |
|
pbyClass 参数无效。 |
|
备用类 ID 之前尚未通过调用 put_AlternateClassId 设置。 |
备注
此方法适用于使用 T=0 协议的通信。 有关详细信息,请参阅 put_AlternateClassId。
示例
以下示例演示如何检索备用类 ID。 该示例假定 pISCardCmd 是指向 ISCardCmd 接口实例的有效指针。
BYTE byAltClassID;
HRESULT hr;
// Retrieve the alternate class ID.
hr = pISCardCmd->get_AlternateClassId(&byAltClassID);
if (FAILED(hr))
{
printf("Failed get_AltClassId\n");
// Take other error handling action as needed.
}
要求
要求 | 值 |
---|---|
最低受支持的客户端 |
Windows XP [仅限桌面应用] |
最低受支持的服务器 |
Windows Server 2003 [仅限桌面应用] |
终止客户端支持 |
Windows XP |
终止服务器支持 |
Windows Server 2003 |
标头 |
|
类型库 |
|
DLL |
|
IID |
IID_ISCardCmd定义为 D5778AE3-43DE-11D0-9171-00AA00C18068 |
另请参阅