src: Windows compile fixes

This commit is contained in:
Fozi
2015-05-25 12:18:22 -04:00
committed by Santiago Gimeno
parent c8425ceb8a
commit 399d837ae8
2 changed files with 4 additions and 1 deletions

View File

@@ -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,

View File

@@ -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);
} }