ISCardCmd::get_ReplyStatus 方法

[ get_ReplyStatus 方法可用于“要求”部分中指定的操作系统。 它不适用于 Windows Server 2003 Service Pack 1 (SP1) 及更高版本、Windows Vista、Windows Server 2008 和操作系统的后续版本。 智能卡模块提供类似的功能。]

get_ReplyStatus方法检索回复 APDU 的消息状态字。

语法

HRESULT get_ReplyStatus(
  [out] LPWORD pwStatus
);

parameters

pwStatus [out]

指向返回时状态的单词的指针。

返回值

方法返回以下可能值之一。

返回代码 说明
S_OK
操作已成功完成。
E_INVALIDARG
pwStatus 参数无效。
E_POINTER
在 pwStatus 中传递了错误的指针。
E_OUTOFMEMORY
内存不足。

 

备注

若要设置回复 APDU 的消息状态字,请调用 put_ReplyStatus

有关此接口提供的所有方法的列表,请参阅 ISCardCmd

除了上面列出的 COM 错误代码之外,如果调用智能卡函数来完成请求,则此接口可能返回智能卡错误代码。 有关详细信息,请参阅 智能卡返回值

示例

以下示例演示如何检索 答复 APDU 的消息状态字。 该示例假定 pISCardCmd 是指向 ISCardCmd 接口实例的有效指针。

WORD    wReplyStatus;
HRESULT hr;

// Get reply status.
hr = pISCardCmd->get_ReplyStatus(&wReplyStatus);
if (FAILED(hr))
{
  printf("Failed get_ReplyStatus\n");
  // Take other error handling action as needed.
}
else
{
  if (wReplyStatus != 0x9000)
  {
    printf("APDU failed - Error [0x%x]\n", wReplyStatus);
    // Take other error handling action as needed.
  }
}

要求

要求
最低受支持的客户端
Windows XP [仅限桌面应用]
最低受支持的服务器
Windows Server 2003 [仅限桌面应用]
终止客户端支持
Windows XP
终止服务器支持
Windows Server 2003
标头
Scarddat.h
类型库
Scarddat.tlb
DLL
Scardssp.dll
IID
IID_ISCardCmd定义为 D5778AE3-43DE-11D0-9171-00AA00C18068

另请参阅

ISCardCmd

put_ReplyStatus