Skip to content

Commit

Permalink
Merge pull request #22 from crocs-muni/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
petrs authored Jul 17, 2019
2 parents b102f68 + 48ef3fa commit 737c010
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 4 deletions.
File renamed without changes.
Binary file not shown.
Binary file added Release_bins/Winscard_32b_v2.1.1.zip
Binary file not shown.
File renamed without changes.
Binary file added Release_bins/Winscard_32b_v2019.07.17.zip
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file added Release_bins/Winscard_64b_v2.1.1.zip
Binary file not shown.
File renamed without changes.
Binary file added Release_bins/Winscard_64b_v2019.07.17.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions Winscard/Winscard.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include <chrono>
#include <thread>
#include <fstream>
Expand Down Expand Up @@ -3084,7 +3084,7 @@ void GetDesktopPath(char_type* path)
string_type stringPath = "/home/";
stringPath += login;
stringPath += "/Desktop/APDUPlay/";
type_copy(rulesFilePath, stringPath.c_str());
type_copy(path, stringPath.c_str());
#else
char_type appData[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, appData);
Expand Down
12 changes: 10 additions & 2 deletions WinscardTests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ std::string BytesToHex(BYTE* data, size_t dataLen) {
std::stringstream ss;
char oneByte[3];
for (size_t i = 0; i < dataLen; ++i) {
snprintf(oneByte, sizeof(oneByte), "%.2x", data[i]);
sprintf_s(oneByte, sizeof(oneByte), "%.2x", data[i]);
ss << oneByte;
}
return ss.str();
Expand Down Expand Up @@ -155,13 +155,21 @@ static SCard LONG(STDCALL *Original_SCardListReaders)(
OUT LPSTR mszReaders,
IN OUT LPDWORD pcchReaders
);

static SCard LONG(STDCALL *Original_SCardListReadersW)(
IN SCARDCONTEXT hContext,
IN LPCWSTR mszGroups,
OUT LPWSTR mszReaders,
IN OUT LPDWORD pcchReaders
);
static SCard LONG(STDCALL *Original_SCardEstablishContext)(
IN DWORD dwScope,
IN LPCVOID pvReserved1,
IN LPCVOID pvReserved2,
OUT LPSCARDCONTEXT phContext
);
static SCard LONG(STDCALL *Original_SCardReleaseContext)(
IN SCARDCONTEXT hContext
);

int SendAPDU(string_type apdu, SCARDHANDLE hCard, DWORD scProtocol) {
int status = 0;
Expand Down
Binary file removed Winscard_32b_v2019.07.17.zip
Binary file not shown.
Binary file removed Winscard_64b_v2019.07.17.zip
Binary file not shown.

0 comments on commit 737c010

Please sign in to comment.