src: Windows compile fixes
This commit is contained in:
@@ -27,6 +27,7 @@ namespace {
|
|||||||
result,
|
result,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
(LPTSTR) &lpMsgBuf,
|
(LPTSTR) &lpMsgBuf,
|
||||||
|
1,
|
||||||
NULL);
|
NULL);
|
||||||
snprintf(msg,
|
snprintf(msg,
|
||||||
ERR_MSG_MAX_LEN,
|
ERR_MSG_MAX_LEN,
|
||||||
@@ -34,6 +35,8 @@ namespace {
|
|||||||
method,
|
method,
|
||||||
lpMsgBuf,
|
lpMsgBuf,
|
||||||
result);
|
result);
|
||||||
|
|
||||||
|
LocalFree(lpMsgBuf);
|
||||||
#else
|
#else
|
||||||
snprintf(msg,
|
snprintf(msg,
|
||||||
ERR_MSG_MAX_LEN,
|
ERR_MSG_MAX_LEN,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ PCSCLite::PCSCLite(): m_card_context(0),
|
|||||||
1);
|
1);
|
||||||
|
|
||||||
if ((result != SCARD_S_SUCCESS) && (result != SCARD_E_TIMEOUT)) {
|
if ((result != SCARD_S_SUCCESS) && (result != SCARD_E_TIMEOUT)) {
|
||||||
NanThrowError(pcsc_stringify_error(result));
|
NanThrowError(error_msg("SCardGetStatusChange", result).c_str());
|
||||||
} else {
|
} else {
|
||||||
m_pnp = !(m_card_reader_state.dwEventState & SCARD_STATE_UNKNOWN);
|
m_pnp = !(m_card_reader_state.dwEventState & SCARD_STATE_UNKNOWN);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user