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 |
另请参阅