ISCard::Transaction 方法
[ Transaction 方法可用于“要求”部分中指定的操作系统。 智能卡模块提供类似的功能。]
Transaction 方法对智能卡命令 (应用程序协议数据单元) 对象执行写入和读取操作。 此函数返回后,可以访问发送到智能卡的卡中定义的命令字符串的智能卡的答复字符串。
语法
HRESULT Transaction(
[in, out] LPSCARDCMD *ppCmd
);
parameters
-
ppCmd [in, out]
-
指向智能卡命令对象的指针。
返回值
方法返回以下可能值之一。
返回代码 | 说明 |
---|---|
|
操作已成功完成。 |
|
ppCmd 参数无效。 |
|
在 ppCmd 中传递了错误的指针。 |
|
满足请求的内存不可用。 |
备注
除了上面列出的 COM 错误代码之外,如果调用智能卡函数来完成请求,则此接口可能返回智能卡错误代码。 有关详细信息,请参阅 智能卡返回值。
示例
以下示例演示如何对智能卡命令对象执行写入和读取操作。
HRESULT hr;
// pISCard is a pointer to an instance of ISCard.
// pISCardCmd is a pointer to an instance of ISCardCmd,
// and ISCardCmd::BuildCmd has already been called.
hr = pISCard->Transaction(&pISCardCmd);
if (FAILED(hr))
{
printf("Failed ISCard::Transaction\n");
// Take other error handling action as needed.
}
要求
要求 | 值 |
---|---|
最低受支持的客户端 |
Windows XP [仅限桌面应用] |
最低受支持的服务器 |
Windows Server 2003 [仅限桌面应用] |
终止客户端支持 |
Windows XP |
终止服务器支持 |
Windows Server 2003 |
标头 |
|
类型库 |
|
DLL |
|
IID |
IID_ISCard定义为 1461AAC3-6810-11D0-918F-00AA00C18068 |
另请参阅