We use YubiClientAPI.dll to get serial number.
IUnkown::Release() method is hang up when yubikey is not inserted.
following is our code snippet:
Code:
IYubiClient yubiClient;
ycRETCODE nRet;
HRESULT hr = CoCreateInstance(
CLSID_YubiClient, 0,
CLSCTX_ALL,
IID_IYubiClient,
reinterpret_cast<void **>(&yubiClient;)
);
if ( m_pcomYubiClient->GetisInserted() == ycRETCODE_OK ) {
nRet = m_yubiClient->GetreadSerial(ycCALL_BLOCKING);
if (nRet == ycRETCODE_OK ) {
....
}
}
yubiClient->Release(); // <-- Hanging up
return nRet;
Is that misuse of objet? How can I release object?
Thanks,
koga