Rename BixV Reader to VivoKey Smart Reader

This commit is contained in:
Christoph Honal
2023-10-12 00:12:52 +02:00
parent d2e607f4c6
commit 1d71760f34
36 changed files with 172 additions and 171 deletions

View File

@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BixVReader", "BixVReader\BixVReader.vcxproj", "{1D286E48-DE79-41FF-844B-56ED3764D4DA}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VivoKeySmartReader", "VivoKeySmartReader\VivoKeySmartReader.vcxproj", "{1D286E48-DE79-41FF-844B-56ED3764D4DA}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "BixVReaderInstaller", "BixVReaderInstaller\BixVReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}"
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "VivoKeySmartReaderInstaller", "VivoKeySmartReaderInstaller\VivoKeySmartReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}"
ProjectSection(ProjectDependencies) = postProject
{1D286E48-DE79-41FF-844B-56ED3764D4DA} = {1D286E48-DE79-41FF-844B-56ED3764D4DA}
{42C4F882-2757-4C0D-90D9-BC096810163E} = {42C4F882-2757-4C0D-90D9-BC096810163E}

View File

@@ -42,9 +42,9 @@ PipeReader::PipeReader() {
void PipeReader::init(wchar_t *section) {
wchar_t temp[300];
swprintf(temp,L"SCardSimulatorDriver%i",instance);
GetPrivateProfileStringW(section,L"PIPE_NAME",temp,pipeName,300,L"BixVReader.ini");
GetPrivateProfileStringW(section,L"PIPE_NAME",temp,pipeName,300,L"VivoKeySmartReader.ini");
swprintf(temp,L"SCardSimulatorDriverEvents%i",instance);
GetPrivateProfileStringW(section,L"PIPE_EVENT_NAME",temp,pipeEventName,300,L"BixVReader.ini");
GetPrivateProfileStringW(section,L"PIPE_EVENT_NAME",temp,pipeEventName,300,L"VivoKeySmartReader.ini");
}
@@ -146,27 +146,27 @@ DWORD PipeReader::startServer() {
swprintf(temp,L"\\\\.\\pipe\\%s",pipeEventName);
HANDLE _eventpipe=CreateNamedPipe(temp,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,PIPE_UNLIMITED_INSTANCES,0,0,0,&sa);
wchar_t log[300];
swprintf(log,L"[BixVReader]Pipe created:%s:%p",pipeName,_pipe);
swprintf(log,L"[VivoKeySmartReader]Pipe created:%s:%p",pipeName,_pipe);
OutputDebugString(log);
while (true) {
//__try {
BOOL ris=ConnectNamedPipe(_pipe,NULL);
if (ris==0) {
swprintf(log,L"[BixVReader]Pipe NOT connected:%x",GetLastError());
swprintf(log,L"[VivoKeySmartReader]Pipe NOT connected:%x",GetLastError());
OutputDebugString(log);
}
else {
swprintf(log,L"[BixVReader]Pipe connected");
swprintf(log,L"[VivoKeySmartReader]Pipe connected");
OutputDebugString(log);
}
ris=ConnectNamedPipe(_eventpipe,NULL);
if (ris==0) {
swprintf(log,L"[BixVReader]Event Pipe NOT connected:%x",GetLastError());
swprintf(log,L"[VivoKeySmartReader]Event Pipe NOT connected:%x",GetLastError());
OutputDebugString(log);
}
else {
swprintf(log,L"[BixVReader]Event Pipe connected");
swprintf(log,L"[VivoKeySmartReader]Event Pipe connected");
OutputDebugString(log);
}
pipe=_pipe;
@@ -192,7 +192,7 @@ DWORD PipeReader::startServer() {
DWORD read=0;
if (!ReadFile(eventpipe,&command,sizeof(DWORD),&read,NULL)) {
state=SCARD_ABSENT;
OutputDebugString(L"[BixVReader]Pipe error");
OutputDebugString(L"[VivoKeySmartReader]Pipe error");
powered=0;
pipe=NULL;
eventpipe=NULL;
@@ -201,11 +201,11 @@ DWORD PipeReader::startServer() {
SectionLocker lock(device->m_RequestLock);
while (!waitRemoveIpr.empty()) {
CComPtr<IWDFIoRequest> ipr = waitRemoveIpr.back();
OutputDebugString(L"[BixVReader]complete Wait Remove");
OutputDebugString(L"[VivoKeySmartReader]complete Wait Remove");
if (ipr->UnmarkCancelable()==S_OK) {
OutputDebugString(L"[BixVReader]Wait Remove Unmarked");
OutputDebugString(L"[VivoKeySmartReader]Wait Remove Unmarked");
ipr->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]Wait Remove Completed");
OutputDebugString(L"[VivoKeySmartReader]Wait Remove Completed");
}
waitRemoveIpr.pop_back();
}
@@ -215,11 +215,11 @@ DWORD PipeReader::startServer() {
SectionLocker lock(device->m_RequestLock);
while (!waitInsertIpr.empty()) {
CComPtr<IWDFIoRequest> ipr = waitInsertIpr.back();
OutputDebugString(L"[BixVReader]cancel Wait Remove");
OutputDebugString(L"[VivoKeySmartReader]cancel Wait Remove");
if (ipr->UnmarkCancelable()==S_OK) {
OutputDebugString(L"[BixVReader]Wait Insert Unmarked");
OutputDebugString(L"[VivoKeySmartReader]Wait Insert Unmarked");
ipr->CompleteWithInformation(HRESULT_FROM_WIN32(ERROR_CANCELLED), 0);
OutputDebugString(L"[BixVReader]Wait Insert Cancelled");
OutputDebugString(L"[VivoKeySmartReader]Wait Insert Cancelled");
}
waitInsertIpr.pop_back();
}
@@ -228,7 +228,7 @@ DWORD PipeReader::startServer() {
DisconnectNamedPipe(_eventpipe);
break;
}
OutputDebugString(L"[BixVReader]Pipe data");
OutputDebugString(L"[VivoKeySmartReader]Pipe data");
if (command==0)
powered=0;
if (command==0 && !waitRemoveIpr.empty()) {
@@ -263,7 +263,7 @@ DWORD PipeReader::startServer() {
// OutputDebugString(log);
//}
}
OutputDebugString(L"[BixVReader]Pipe quit!!!");
OutputDebugString(L"[VivoKeySmartReader]Pipe quit!!!");
return 0;
}

View File

@@ -85,10 +85,10 @@ HRESULT CMyQueue::CreateInstance(__in IWDFDevice* pWdfDevice, CMyDevice* pMyDev
);
if (FAILED(hr))
{
OutputDebugString (L"[BixVReader]IoQueue NOT Created\n");
OutputDebugString (L"[VivoKeySmartReader]IoQueue NOT Created\n");
}
else
OutputDebugString (L"[BixVReader]IoQueue Created\n");
OutputDebugString (L"[VivoKeySmartReader]IoQueue Created\n");
}

View File

@@ -16,7 +16,7 @@ void Reader::IoSmartCardIsPresent(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
OutputDebugString(L"[BixVReader][IPRE]IOCTL_SMARTCARD_IS_PRESENT");
OutputDebugString(L"[VivoKeySmartReader][IPRE]IOCTL_SMARTCARD_IS_PRESENT");
if (CheckATR()) {
// there's a smart card present, so complete the request
SectionLocker lock(device->m_RequestLock);
@@ -36,16 +36,16 @@ void Reader::IoSmartCardIsPresent(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_
void Reader::IoSmartCardGetState(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_T outBufSize) {
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
OutputDebugString(L"[BixVReader][GSTA]IOCTL_SMARTCARD_GET_STATE");
OutputDebugString(L"[VivoKeySmartReader][GSTA]IOCTL_SMARTCARD_GET_STATE");
wchar_t log[300];
swprintf(log,L"[BixVReader]STATE:%08X",state);
swprintf(log,L"[VivoKeySmartReader]STATE:%08X",state);
OutputDebugString(log);
setInt(device,pRequest,state);
}
void Reader::IoSmartCardIsAbsent(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_T outBufSize) {
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
OutputDebugString(L"[BixVReader][IABS]IOCTL_SMARTCARD_IS_ABSENT");
OutputDebugString(L"[VivoKeySmartReader][IABS]IOCTL_SMARTCARD_IS_ABSENT");
if (!CheckATR()) {
// there's no smart card present, so complete the request
SectionLocker lock(device->m_RequestLock);
@@ -66,22 +66,22 @@ void Reader::IoSmartCardIsAbsent(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_T
void Reader::IoSmartCardPower(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_T outBufSize) {
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
OutputDebugString(L"[BixVReader][POWR]IOCTL_SMARTCARD_POWER");
OutputDebugString(L"[VivoKeySmartReader][POWR]IOCTL_SMARTCARD_POWER");
DWORD code=getInt(pRequest);
if (code==SCARD_COLD_RESET) {
OutputDebugString(L"[BixVReader][POWR]SCARD_COLD_RESET");
OutputDebugString(L"[VivoKeySmartReader][POWR]SCARD_COLD_RESET");
protocol=0;
powered=1;
state=SCARD_NEGOTIABLE;
}
else if (code==SCARD_WARM_RESET) {
OutputDebugString(L"[BixVReader][POWR]SCARD_WARM_RESET");
OutputDebugString(L"[VivoKeySmartReader][POWR]SCARD_WARM_RESET");
protocol=0;
powered=1;
state=SCARD_NEGOTIABLE;
}
else if (code==SCARD_POWER_DOWN) {
OutputDebugString(L"[BixVReader][POWR]SCARD_POWER_DOWN");
OutputDebugString(L"[VivoKeySmartReader][POWR]SCARD_POWER_DOWN");
protocol=0;
powered=0;
state=SCARD_SWALLOWED;
@@ -110,7 +110,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
DWORD requestedProtocol=getInt(pRequest);
wchar_t log[300];
swprintf(log,L"[BixVReader][SPRT]IOCTL_SMARTCARD_SET_PROTOCOL:%08X",requestedProtocol);
swprintf(log,L"[VivoKeySmartReader][SPRT]IOCTL_SMARTCARD_SET_PROTOCOL:%08X",requestedProtocol);
OutputDebugString(log);
BYTE ATR[100];
@@ -128,7 +128,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
protocol = SCARD_PROTOCOL_T1;
SectionLocker lock(device->m_RequestLock);
pRequest->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]PROTOCOL SET: T1");
OutputDebugString(L"[VivoKeySmartReader]PROTOCOL SET: T1");
return;
}
@@ -137,7 +137,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
protocol = SCARD_PROTOCOL_T0;
SectionLocker lock(device->m_RequestLock);
pRequest->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]PROTOCOL SET: T0");
OutputDebugString(L"[VivoKeySmartReader]PROTOCOL SET: T0");
return;
}
@@ -146,7 +146,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
protocol = SCARD_PROTOCOL_T1;
SectionLocker lock(device->m_RequestLock);
pRequest->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]PROTOCOL SET: T1");
OutputDebugString(L"[VivoKeySmartReader]PROTOCOL SET: T1");
return;
}
@@ -155,7 +155,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
protocol = SCARD_PROTOCOL_T0;
SectionLocker lock(device->m_RequestLock);
pRequest->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]PROTOCOL SET: T0");
OutputDebugString(L"[VivoKeySmartReader]PROTOCOL SET: T0");
return;
}
{
@@ -169,7 +169,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
UNREFERENCED_PARAMETER(instance);
OutputDebugString(L"[BixVReader][SATT]IOCTL_SMARTCARD_SET_ATTRIBUTE");
OutputDebugString(L"[VivoKeySmartReader][SATT]IOCTL_SMARTCARD_SET_ATTRIBUTE");
IWDFMemory *inmem=NULL;
pRequest->GetInputMemory(&inmem);
@@ -181,7 +181,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
bool handled=false;
if (minCode==SCARD_ATTR_DEVICE_IN_USE) {
SectionLocker lock(device->m_RequestLock);
OutputDebugString(L"[BixVReader][SATT]SCARD_ATTR_DEVICE_IN_USE");
OutputDebugString(L"[VivoKeySmartReader][SATT]SCARD_ATTR_DEVICE_IN_USE");
pRequest->CompleteWithInformation(STATUS_SUCCESS, 0);
handled=true;
}
@@ -189,7 +189,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
if (!handled) {
SectionLocker lock(device->m_RequestLock);
wchar_t log[300];
swprintf(log,L"[BixVReader][SATT]ERROR_NOT_SUPPORTED:%08X",minCode);
swprintf(log,L"[VivoKeySmartReader][SATT]ERROR_NOT_SUPPORTED:%08X",minCode);
OutputDebugString(log);
pRequest->CompleteWithInformation(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), 0);
}
@@ -198,7 +198,7 @@ void Reader::IoSmartCardSetProtocol(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZ
void Reader::IoSmartCardTransmit(IWDFIoRequest* pRequest,SIZE_T inBufSize,SIZE_T outBufSize) {
UNREFERENCED_PARAMETER(inBufSize);
UNREFERENCED_PARAMETER(outBufSize);
OutputDebugString(L"[BixVReader][TRSM]IOCTL_SMARTCARD_TRANSMIT");
OutputDebugString(L"[VivoKeySmartReader][TRSM]IOCTL_SMARTCARD_TRANSMIT");
SCARD_IO_REQUEST *scardRequest=NULL;
int scardRequestSize=0;
BYTE *RAPDU=NULL;
@@ -241,20 +241,20 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
char temp[300];
DWORD code=getInt(pRequest);
swprintf(log,L"[BixVReader][GATT] - code %0X",code);
swprintf(log,L"[VivoKeySmartReader][GATT] - code %0X",code);
OutputDebugString(log);
switch(code) {
case SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA009):
// custom attribute; RPC_TYPE
OutputDebugString(L"[BixVReader][GATT]RPC_TYPE");
OutputDebugString(L"[VivoKeySmartReader][GATT]RPC_TYPE");
setInt(device,pRequest,rpcType);
return;
case SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA00a):
// custom attribute; PipeName
if (rpcType==0) {
PipeReader *pipe=(PipeReader *)this;
OutputDebugString(L"[BixVReader][GATT]PIPE_NAME");
OutputDebugString(L"[VivoKeySmartReader][GATT]PIPE_NAME");
sprintf(temp,"%S",pipe->pipeName);
setString(device,pRequest,(char*)temp,(int)outBufSize);
}
@@ -267,7 +267,7 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
// custom attribute; EventPipeName
if (rpcType==0) {
PipeReader *pipe=(PipeReader *)this;
OutputDebugString(L"[BixVReader][GATT]EVENT_PIPE_NAME");
OutputDebugString(L"[VivoKeySmartReader][GATT]EVENT_PIPE_NAME");
sprintf(temp,"%S",pipe->pipeEventName);
setString(device,pRequest,(char*)temp,(int)outBufSize);
}
@@ -280,7 +280,7 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
// custom attribute; TCP port
if (rpcType==1) {
TcpIpReader *tcpIp=(TcpIpReader *)this;
OutputDebugString(L"[BixVReader][GATT]PORT");
OutputDebugString(L"[VivoKeySmartReader][GATT]PORT");
setInt(device,pRequest,tcpIp->port);
}
else {
@@ -292,7 +292,7 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
// custom attribute; TCP event port
if (rpcType==1) {
TcpIpReader *tcpIp=(TcpIpReader *)this;
OutputDebugString(L"[BixVReader][GATT]EVENT_PORT");
OutputDebugString(L"[VivoKeySmartReader][GATT]EVENT_PORT");
setInt(device,pRequest,tcpIp->eventPort);
}
else {
@@ -304,7 +304,7 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
// custom attribute; TCP base port
if (rpcType==1) {
TcpIpReader *tcpIp=(TcpIpReader *)this;
OutputDebugString(L"[BixVReader][GATT]BASE_PORT");
OutputDebugString(L"[VivoKeySmartReader][GATT]BASE_PORT");
setInt(device,pRequest,tcpIp->portBase);
tcpIp;
}
@@ -315,23 +315,23 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
return;
case SCARD_ATTR_CHARACTERISTICS:
// 0x00000000 No special characteristics
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_CHARACTERISTICS");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_CHARACTERISTICS");
setInt(device,pRequest,0);
return;
case SCARD_ATTR_VENDOR_NAME:
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_VENDOR_NAME");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_VENDOR_NAME");
setString(device,pRequest,vendorName,(int)outBufSize);
return;
case SCARD_ATTR_VENDOR_IFD_TYPE:
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_VENDOR_IFD_TYPE");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_VENDOR_IFD_TYPE");
setString(device,pRequest,vendorIfdType,(int)outBufSize);
return;
case SCARD_ATTR_DEVICE_UNIT:
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_DEVICE_UNIT");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_DEVICE_UNIT");
setInt(device,pRequest,deviceUnit);
return;
case SCARD_ATTR_ATR_STRING:
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_ATR_STRING");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_ATR_STRING");
BYTE ATR[100];
DWORD ATRsize;
if (!QueryATR(ATR,&ATRsize))
@@ -343,11 +343,11 @@ void Reader::IoSmartCardGetAttribute(IWDFIoRequest* pRequest,SIZE_T inBufSize,SI
setBuffer(device,pRequest,ATR,ATRsize);
return;
case SCARD_ATTR_CURRENT_PROTOCOL_TYPE:
OutputDebugString(L"[BixVReader][GATT]SCARD_ATTR_CURRENT_PROTOCOL_TYPE");
OutputDebugString(L"[VivoKeySmartReader][GATT]SCARD_ATTR_CURRENT_PROTOCOL_TYPE");
setInt(device,pRequest,protocol); // T=0 or T=1
return;
default: {
swprintf(log,L"[BixVReader][GATT]ERROR_NOT_SUPPORTED:%08X",code);
swprintf(log,L"[VivoKeySmartReader][GATT]ERROR_NOT_SUPPORTED:%08X",code);
OutputDebugString(log);
SectionLocker lock(device->m_RequestLock);
pRequest->CompleteWithInformation(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), 0);

View File

@@ -15,10 +15,10 @@ TcpIpReader::TcpIpReader() {
state=SCARD_ABSENT;
}
void TcpIpReader::init(wchar_t *section) {
portBase=GetPrivateProfileInt(L"Driver",L"RPC_PORT_BASE",29500,L"BixVReader.ini");
portBase=GetPrivateProfileInt(L"Driver",L"RPC_PORT_BASE",29500,L"VivoKeySmartReader.ini");
port=GetPrivateProfileInt(section,L"TCP_PORT",portBase+(instance<<1),L"BixVReader.ini");
eventPort=GetPrivateProfileInt(section,L"TCP_EVENT_PORT",portBase+1+(instance<<1),L"BixVReader.ini");
port=GetPrivateProfileInt(section,L"TCP_PORT",portBase+(instance<<1),L"VivoKeySmartReader.ini");
eventPort=GetPrivateProfileInt(section,L"TCP_EVENT_PORT",portBase+1+(instance<<1),L"VivoKeySmartReader.ini");
InitializeCriticalSection(&eventSection);
InitializeCriticalSection(&dataSection);
@@ -141,7 +141,7 @@ DWORD TcpIpReader::startServer() {
break;
if (ret<0) {
DWORD err=WSAGetLastError();
swprintf(log,L"[BixVReader]wsa err:%x",err);
swprintf(log,L"[VivoKeySmartReader]wsa err:%x",err);
OutputDebugString(log);
if (err==0x2736) {
socket=WSASocket(AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,0,0);
@@ -167,7 +167,7 @@ DWORD TcpIpReader::startServer() {
if (AcceptSocket == INVALID_SOCKET)
return 0;
swprintf(log,L"[BixVReader]Socket connected:%i",AcceptSocket);
swprintf(log,L"[VivoKeySmartReader]Socket connected:%i",AcceptSocket);
OutputDebugString(log);
FD_ZERO(&readfds);
@@ -183,7 +183,7 @@ DWORD TcpIpReader::startServer() {
break;
if (ret<0) {
DWORD err=WSAGetLastError();
swprintf(log,L"[BixVReader]wsa err:%x",err);
swprintf(log,L"[VivoKeySmartReader]wsa err:%x",err);
OutputDebugString(log);
if (err==0x2736) {
eventsocket=WSASocket(AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,0,0);
@@ -207,7 +207,7 @@ DWORD TcpIpReader::startServer() {
if (AcceptEventSocket == INVALID_SOCKET)
return 0;
swprintf(log,L"[BixVReader]Event Socket connected:%i",AcceptEventSocket);
swprintf(log,L"[VivoKeySmartReader]Event Socket connected:%i",AcceptEventSocket);
OutputDebugString(log);
if (!waitInsertIpr.empty()) {
@@ -231,7 +231,7 @@ DWORD TcpIpReader::startServer() {
int read=0;
if ((read=recv(AcceptEventSocket,(char*)&command,sizeof(DWORD),MSG_WAITALL))<=0) {
state=SCARD_ABSENT;
OutputDebugString(L"[BixVReader]Socket error");
OutputDebugString(L"[VivoKeySmartReader]Socket error");
powered=0;
::shutdown(AcceptSocket,SD_BOTH);
::shutdown(AcceptEventSocket,SD_BOTH);
@@ -240,11 +240,11 @@ DWORD TcpIpReader::startServer() {
SectionLocker lock(device->m_RequestLock);
while (!waitRemoveIpr.empty()) {
CComPtr<IWDFIoRequest> ipr = waitRemoveIpr.back();
OutputDebugString(L"[BixVReader]complete Wait Remove");
OutputDebugString(L"[VivoKeySmartReader]complete Wait Remove");
if (ipr->UnmarkCancelable()==S_OK) {
OutputDebugString(L"[BixVReader]Wait Remove Unmarked");
OutputDebugString(L"[VivoKeySmartReader]Wait Remove Unmarked");
ipr->CompleteWithInformation(STATUS_SUCCESS, 0);
OutputDebugString(L"[BixVReader]Wait Remove Completed");
OutputDebugString(L"[VivoKeySmartReader]Wait Remove Completed");
}
waitRemoveIpr.pop_back();
}
@@ -254,18 +254,18 @@ DWORD TcpIpReader::startServer() {
SectionLocker lock(device->m_RequestLock);
while (!waitInsertIpr.empty()) {
CComPtr<IWDFIoRequest> ipr = waitInsertIpr.back();
OutputDebugString(L"[BixVReader]cancel Wait Remove");
OutputDebugString(L"[VivoKeySmartReader]cancel Wait Remove");
if (ipr->UnmarkCancelable()==S_OK) {
OutputDebugString(L"[BixVReader]Wait Insert Unmarked");
OutputDebugString(L"[VivoKeySmartReader]Wait Insert Unmarked");
ipr->CompleteWithInformation(HRESULT_FROM_WIN32(ERROR_CANCELLED), 0);
OutputDebugString(L"[BixVReader]Wait Insert Cancelled");
OutputDebugString(L"[VivoKeySmartReader]Wait Insert Cancelled");
}
waitInsertIpr.pop_back();
}
}
break;
}
OutputDebugString(L"[BixVReader]Socket data");
OutputDebugString(L"[VivoKeySmartReader]Socket data");
if (command==0)
powered=0;
if (command==0 && !waitRemoveIpr.empty()) {
@@ -300,7 +300,7 @@ DWORD TcpIpReader::startServer() {
// OutputDebugString(log);
//}
}
OutputDebugString(L"[BixVReader]Socket quit!!!");
OutputDebugString(L"[VivoKeySmartReader]Socket quit!!!");
return 0;
}

View File

@@ -1,24 +1,12 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
// Neutral (Default) resources
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Italian (Italy) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
#ifdef _WIN32
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -40,24 +28,34 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "001004b0"
BLOCK "040004b0"
BEGIN
VALUE "CompanyName", "Windows (R) Codename Longhorn DDK provider"
VALUE "FileDescription", "Bix Virtual Smart Card Driver"
VALUE "CompanyName", "VivoKey"
VALUE "FileDescription", "VivoKey Smart Reader Driver"
VALUE "FileVersion", "6.0.6000.16384"
VALUE "InternalName", "BixVReader"
VALUE "LegalCopyright", "© Microsoft Corporation. All rights reserved."
VALUE "OriginalFilename", "BixVReader.dll"
VALUE "ProductName", "Windows (R) Codename Longhorn DDK driver"
VALUE "InternalName", "VivoKeySmartReader"
VALUE "LegalCopyright", "Frank Morgner, GPLv3 and VivoKey"
VALUE "OriginalFilename", "VivoKeySmartReader.dll"
VALUE "ProductName", "VivoKey Smart Reader"
VALUE "ProductVersion", "6.0.6000.16384"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x10, 1200
VALUE "Translation", 0x400, 1200
END
END
#endif // Neutral (Default) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Italian (Italy) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -94,7 +92,7 @@ END
// Generated from the TEXTINCLUDE 3 resource.
//
P
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -49,10 +49,10 @@
<ClInclude Include="sectionLocker.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BixVReader.rc" />
<ResourceCompile Include="VivoKeySmartReader.rc" />
</ItemGroup>
<ItemGroup>
<Inf Include="BixVReader.inf" />
<Inf Include="VivoKeySmartReader.inf" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1D286E48-DE79-41FF-844B-56ED3764D4DA}</ProjectGuid>
@@ -61,7 +61,7 @@
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<Configuration>Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<RootNamespace>BixVReader</RootNamespace>
<RootNamespace>VivoKeySmartReader</RootNamespace>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -22,7 +22,7 @@
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<Inf Include="BixVReader.inf">
<Inf Include="VivoKeySmartReader.inf">
<Filter>Driver Files</Filter>
</Inf>
</ItemGroup>
@@ -70,7 +70,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BixVReader.rc">
<ResourceCompile Include="VivoKeySmartReader.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>

View File

@@ -22,9 +22,9 @@ VpcdReader::~VpcdReader() {
DeleteCriticalSection(&ioSection);
}
void VpcdReader::init(wchar_t *section) {
portBase=GetPrivateProfileInt(L"Driver",L"RPC_PORT_BASE",VPCDPORT,L"BixVReader.ini");
portBase=GetPrivateProfileInt(L"Driver",L"RPC_PORT_BASE",VPCDPORT,L"VivoKeySmartReader.ini");
port=(short) GetPrivateProfileInt(section,L"TCP_PORT",portBase+instance,L"BixVReader.ini");
port=(short) GetPrivateProfileInt(section,L"TCP_PORT",portBase+instance,L"VivoKeySmartReader.ini");
}
bool VpcdReader::CheckATR() {

View File

@@ -38,7 +38,7 @@ CMyDevice::CreateInstance(
CComObject<CMyDevice>* device = NULL;
HRESULT hr;
OutputDebugString(L"[BixVReader]CreateInstance"); //
OutputDebugString(L"[VivoKeySmartReader]CreateInstance"); //
// Allocate a new instance of the device class.
//
hr = CComObject<CMyDevice>::CreateInstance(&device);
@@ -53,35 +53,35 @@ CMyDevice::CreateInstance(
//
device->AddRef();
OutputDebugString(L"[BixVReader]SetLockingConstraint"); //
OutputDebugString(L"[VivoKeySmartReader]SetLockingConstraint"); //
FxDeviceInit->SetLockingConstraint(WdfDeviceLevel);
CComPtr<IUnknown> spCallback;
OutputDebugString(L"[BixVReader]QueryInterface"); //
OutputDebugString(L"[VivoKeySmartReader]QueryInterface"); //
hr = device->QueryInterface(IID_IUnknown, (void**)&spCallback);
CComPtr<IWDFDevice> spIWDFDevice;
if (SUCCEEDED(hr))
{
OutputDebugString(L"[BixVReader]CreateDevice"); //
OutputDebugString(L"[VivoKeySmartReader]CreateDevice"); //
hr = FxDriver->CreateDevice(FxDeviceInit, spCallback, &spIWDFDevice);
}
device->numInstances=GetPrivateProfileInt(L"Driver",L"NumReaders",1,L"BixVReader.ini");
device->numInstances=GetPrivateProfileInt(L"Driver",L"NumReaders",1,L"VivoKeySmartReader.ini");
WSADATA wsaData;
int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (iResult != NO_ERROR) {
OutputDebugString(L"[BixVReader]Error at WSAStartup()\n");
OutputDebugString(L"[VivoKeySmartReader]Error at WSAStartup()\n");
}
for (int i=0;i<device->numInstances;i++) {
OutputDebugString(L"[BixVReader]CreateDeviceInterface"); //
OutputDebugString(L"[VivoKeySmartReader]CreateDeviceInterface"); //
wchar_t name[10];
swprintf(name,L"DEV%i",i);
if (spIWDFDevice->CreateDeviceInterface(&SmartCardReaderGuid,name)!=0)
OutputDebugString(L"[BixVReader]CreateDeviceInterface Failed");
OutputDebugString(L"[VivoKeySmartReader]CreateDeviceInterface Failed");
}
SAFE_RELEASE(device);
@@ -98,7 +98,7 @@ void CMyDevice::ProcessIoControl(__in IWDFIoQueue* pQueue,
SectionLogger a(__FUNCTION__);
UNREFERENCED_PARAMETER(pQueue);
wchar_t log[300];
swprintf(log,L"[BixVReader][IOCT]IOCTL %08X - In %i Out %i",ControlCode,inBufSize,outBufSize);
swprintf(log,L"[VivoKeySmartReader][IOCT]IOCTL %08X - In %i Out %i",ControlCode,inBufSize,outBufSize);
OutputDebugString(log);
//SectionLocker lock(m_RequestLock);
@@ -148,7 +148,7 @@ void CMyDevice::ProcessIoControl(__in IWDFIoQueue* pQueue,
reader.IoSmartCardTransmit(pRequest,inBufSize,outBufSize);
return;
}
swprintf(log,L"[BixVReader][IOCT]ERROR_NOT_SUPPORTED:%08X",ControlCode);
swprintf(log,L"[VivoKeySmartReader][IOCT]ERROR_NOT_SUPPORTED:%08X",ControlCode);
OutputDebugString(log);
pRequest->CompleteWithInformation(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), 0);
@@ -228,7 +228,7 @@ HRESULT CMyDevice::OnD0Entry(IN IWDFDevice* pWdfDevice,IN WDF_POWER_DEVICE_STAT
UNREFERENCED_PARAMETER(pWdfDevice);
UNREFERENCED_PARAMETER(previousState);
numInstances=GetPrivateProfileInt(L"Driver",L"NumReaders",1,L"BixVReader.ini");
numInstances=GetPrivateProfileInt(L"Driver",L"NumReaders",1,L"VivoKeySmartReader.ini");
readers.resize(numInstances);
for (int i=0;i<numInstances;i++) {
@@ -237,7 +237,7 @@ HRESULT CMyDevice::OnD0Entry(IN IWDFDevice* pWdfDevice,IN WDF_POWER_DEVICE_STAT
swprintf(section,L"Reader%i",i);
sprintf(sectionA,"Reader%i",i);
int rpcType=GetPrivateProfileInt(section,L"RPC_TYPE",0,L"BixVReader.ini");
int rpcType=GetPrivateProfileInt(section,L"RPC_TYPE",0,L"VivoKeySmartReader.ini");
if (rpcType==0)
readers[i]=new PipeReader();
else if (rpcType==1)
@@ -247,9 +247,9 @@ HRESULT CMyDevice::OnD0Entry(IN IWDFDevice* pWdfDevice,IN WDF_POWER_DEVICE_STAT
readers[i]->instance=i;
readers[i]->device=this;
GetPrivateProfileStringA(sectionA,"VENDOR_NAME","Bix",readers[i]->vendorName,sizeof readers[i]->vendorName,"BixVReader.ini");
GetPrivateProfileStringA(sectionA,"VENDOR_IFD_TYPE","VIRTUAL_CARD_READER",readers[i]->vendorIfdType,sizeof readers[i]->vendorIfdType,"BixVReader.ini");
readers[i]->deviceUnit=GetPrivateProfileInt(section,L"DEVICE_UNIT",i,L"BixVReader.ini");
GetPrivateProfileStringA(sectionA,"VENDOR_NAME","VivoKey",readers[i]->vendorName,sizeof readers[i]->vendorName,"VivoKeySmartReader.ini");
GetPrivateProfileStringA(sectionA,"VENDOR_IFD_TYPE","VIRTUAL_CARD_READER",readers[i]->vendorIfdType,sizeof readers[i]->vendorIfdType,"VivoKeySmartReader.ini");
readers[i]->deviceUnit=GetPrivateProfileInt(section,L"DEVICE_UNIT",i,L"VivoKeySmartReader.ini");
readers[i]->protocol=0;
readers[i]->init(section);
@@ -280,21 +280,21 @@ void CMyDevice::shutDown() {
HRESULT CMyDevice::OnQueryRemove(IN IWDFDevice* pWdfDevice) {
SectionLogger a(__FUNCTION__);
UNREFERENCED_PARAMETER(pWdfDevice);
OutputDebugString(L"[BixVReader]OnQueryRemove");
OutputDebugString(L"[VivoKeySmartReader]OnQueryRemove");
shutDown();
return S_OK;
}
HRESULT CMyDevice::OnQueryStop(IN IWDFDevice* pWdfDevice) {
SectionLogger a(__FUNCTION__);
UNREFERENCED_PARAMETER(pWdfDevice);
OutputDebugString(L"[BixVReader]OnQueryStop");
OutputDebugString(L"[VivoKeySmartReader]OnQueryStop");
shutDown();
return S_OK;
}
void CMyDevice::OnSurpriseRemoval(IN IWDFDevice* pWdfDevice) {
SectionLogger a(__FUNCTION__);
UNREFERENCED_PARAMETER(pWdfDevice);
OutputDebugString(L"[BixVReader]OnSurpriseRemoval");
OutputDebugString(L"[VivoKeySmartReader]OnSurpriseRemoval");
shutDown();
}
@@ -321,14 +321,14 @@ STDMETHODIMP_ (void) CMyDevice::OnCancel(IN IWDFIoRequest* pWdfRequest) {
for (std::vector< CComPtr<IWDFIoRequest> >::iterator it = reader.waitRemoveIpr.begin();
it != reader.waitRemoveIpr.end(); it++) {
if (pWdfRequest == *it) {
OutputDebugString(L"[BixVReader]Cancel Remove");
OutputDebugString(L"[VivoKeySmartReader]Cancel Remove");
reader.waitRemoveIpr.erase(it);
}
}
for (std::vector< CComPtr<IWDFIoRequest> >::iterator it = reader.waitInsertIpr.begin();
it != reader.waitInsertIpr.end(); it++) {
if (pWdfRequest == *it) {
OutputDebugString(L"[BixVReader]Cancel Insert");
OutputDebugString(L"[VivoKeySmartReader]Cancel Insert");
reader.waitInsertIpr.erase(it);
}
}

View File

@@ -61,12 +61,12 @@ DEFINE_GUID(SmartCardReaderGuid, 0x50DD5230, 0xBA8A, 0x11D1, 0xBF,0x5D,0x00,0x00
// funcTrace (char *func) {
// TCHAR funcName[500];
// wsprintf(funcN, _T("%S"), func);
// wsprintf(funcName, _T("[BixVReader]IN -> %s"), funcN);
// wsprintf(funcName, _T("[VivoKeySmartReader]IN -> %s"), funcN);
// OutputDebugString(funcName);
// }
// ~funcTrace () {
// TCHAR funcName[500];
// wsprintf(funcName, _T("[BixVReader]OUT -> %s"), funcN);
// wsprintf(funcName, _T("[VivoKeySmartReader]OUT -> %s"), funcN);
// OutputDebugString(funcName);
// }
//};

View File

@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Skeleton.rc
// Used by VivoKeySmartReader.rc
//
#define SW_HIDE 0
#define HIDE_WINDOW 0

View File

@@ -9,12 +9,12 @@ SectionLocker::SectionLocker(CRITICAL_SECTION &critsection,char *function,int li
DWORD start=GetTickCount();
if (TryEnterCriticalSection(section)==0) {
char logBuffer[500];
sprintf(logBuffer,"[BixVReader]Locking:Function:%s,Line:%i,Object:%p,Lock:%p",Function,Line,Object,section);
sprintf(logBuffer,"[VivoKeySmartReader]Locking:Function:%s,Line:%i,Object:%p,Lock:%p",Function,Line,Object,section);
OutputDebugStringA(logBuffer);
ShowMe=section;
EnterCriticalSection(section);
DWORD end=GetTickCount();
sprintf(logBuffer,"[BixVReader]Elapsed:%i ms",end-start);
sprintf(logBuffer,"[VivoKeySmartReader]Elapsed:%i ms",end-start);
OutputDebugStringA(logBuffer);
}
}
@@ -22,7 +22,7 @@ SectionLocker::SectionLocker(CRITICAL_SECTION &critsection,char *function,int li
SectionLocker::~SectionLocker() {
if (section==ShowMe) {
char logBuffer[500];
sprintf(logBuffer,"[BixVReader]Unlocking:Function:%s,Line:%i,Object:%p,Lock:%p",Function,Line,Object,section);
sprintf(logBuffer,"[VivoKeySmartReader]Unlocking:Function:%s,Line:%i,Object:%p,Lock:%p",Function,Line,Object,section);
OutputDebugStringA(logBuffer);
ShowMe=NULL;
}
@@ -34,13 +34,13 @@ SectionLogger::SectionLogger(char *section) {
start=GetTickCount();
char logBuffer[500];
SectionName=section;
sprintf(logBuffer,"[BixVReader]Start section:%s",SectionName);
sprintf(logBuffer,"[VivoKeySmartReader]Start section:%s",SectionName);
OutputDebugStringA(logBuffer);
}
SectionLogger::~SectionLogger() {
DWORD end=GetTickCount();
char logBuffer[500];
sprintf(logBuffer,"[BixVReader]End section:%s elapsed:%i",SectionName,end-start);
sprintf(logBuffer,"[VivoKeySmartReader]End section:%s elapsed:%i",SectionName,end-start);
OutputDebugStringA(logBuffer);
}

View File

@@ -13,30 +13,29 @@
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension">
<Product Id="*" Name="Virtual Smart Card Reader ($(sys.BUILDARCH))" Language="1033" Version="1.0.0.0" Manufacturer="Frank Morgner" UpgradeCode="6d60b0e4-c325-4d3b-b727-2f3e0b0a8afa">
<Product Id="*" Name="VivoKey Smart Reader ($(sys.BUILDARCH))" Language="1033" Version="1.0.0.0" Manufacturer="VivoKey" UpgradeCode="6d60b0e4-c325-4d3b-b727-2f3e0b0a8afa">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MajorUpgrade DowngradeErrorMessage="A newer version of VivoKey Smart Reader is already installed." />
<MediaTemplate EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProgramFilesARCHFolder)">
<Directory Id="INSTALLDIR" Name="BixVReader">
<Component Id="BixVReaderDriver" Guid="60FF3BFF-E235-4F84-8A25-E22CB3164FB1">
<fire:FirewallException Id="virtual_card_reader_port" Name="virtual_card_reader_port"
Description="Port for virtual card reader" Port="35963"
Profile="all" Protocol="tcp" Scope="any" />
<File Id="BixVReader.dll" Source="$(var.BixVReader.TargetDir)BixVReader\BixVReader.dll" />
<File Id="BixVReader.inf" Source="$(var.BixVReader.TargetDir)BixVReader\BixVReader.inf" />
<File Id="WudfUpdate_01011.dll" Source="$(var.BixVReader.TargetDir)BixVReader\WudfUpdate_01011.dll" />
<File Id="wudf.cat" Source="$(var.BixVReader.TargetDir)BixVReader\bixvreader.cat" />
<Directory Id="INSTALLDIR" Name="VivoKeySmartReader">
<Component Id="VivoKeySmartReaderDriver" Guid="60FF3BFF-E235-4F84-8A25-E22CB3164FB1">
<fire:FirewallException Id="vivokey_smart_reader_port" Name="vivokey_smart_reader_port"
Description="Port for VivoKey Smart Reader" Port="35963" Profile="all" Protocol="tcp" Scope="any" />
<File Id="VivoKeySmartReader.dll" Source="$(var.VivoKeySmartReader.TargetDir)VivoKeySmartReader\VivoKeySmartReader.dll" />
<File Id="VivoKeySmartReader.inf" Source="$(var.VivoKeySmartReader.TargetDir)VivoKeySmartReader\VivoKeySmartReader.inf" />
<File Id="WudfUpdate_01011.dll" Source="$(var.VivoKeySmartReader.TargetDir)VivoKeySmartReader\WudfUpdate_01011.dll" />
<File Id="wudf.cat" Source="$(var.VivoKeySmartReader.TargetDir)VivoKeySmartReader\VivoKeySmartReader.cat" />
</Component>
</Directory>
</Directory>
<Directory Id="WindowsFolder">
<Component Id="BixVReaderConfiguration">
<File Id="BixVReader.ini" Source="BixVReader.ini.template" Name="BixVReader.ini" />
<Component Id="VivoKeySmartReaderConfiguration">
<File Id="VivoKeySmartReader.ini" Source="VivoKeySmartReader.ini.template" Name="VivoKeySmartReader.ini" />
</Component>
</Directory>
</Directory>
@@ -44,15 +43,15 @@
<Binary Id="DevMsi" SourceFile="$(var.DevMsi.TargetPath)" />
<CustomAction Id="AddDevice" BinaryKey="DevMsi" DllEntry="CreateDevnode" Execute="deferred" Impersonate="no" />
<CustomAction Id="AddDevice.SetParam" Return="check" Property="AddDevice" Value='"[INSTALLDIR]BixVReader.inf" root\BixVirtualReader' />
<CustomAction Id="AddDevice.SetParam" Return="check" Property="AddDevice" Value='"[INSTALLDIR]VivoKeySmartReader.inf" root\VivoKeyVirtualReader' />
<CustomAction Id="DelDevice" Return="ignore" BinaryKey="DevMsi" DllEntry="RemoveDevnode" Execute="deferred" Impersonate="no" />
<CustomAction Id="DelDevice.SetParam" Return="check" Property="DelDevice" Value="root\BixVirtualReader" />
<CustomAction Id="DelDevice.SetParam" Return="check" Property="DelDevice" Value="root\VivoKeyVirtualReader" />
<Feature Id="ProductFeature" Title="BixVReader" Level="1">
<ComponentRef Id="BixVReaderDriver" />
<ComponentRef Id="BixVReaderConfiguration" />
</Feature>
<Feature Id="ProductFeature" Title="VivoKeySmartReader" Level="1">
<ComponentRef Id="VivoKeySmartReaderDriver" />
<ComponentRef Id="VivoKeySmartReaderConfiguration" />
</Feature>
<InstallExecuteSequence>
<!-- Custom Actions that will be executed if "Installed" -->

View File

@@ -3,7 +3,7 @@ NumReaders=1
[Reader0]
RPC_TYPE=2
VENDOR_NAME=Virtual Smart Card Architecture
VENDOR_IFD_TYPE=Virtual PCD
VENDOR_NAME=VivoKey
VENDOR_IFD_TYPE=Smart Reader
TCP_PORT=35963
DECIVE_UNIT=0

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "BixVReaderInstaller", "BixVReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}"
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "VivoKeySmartReaderInstaller", "VivoKeySmartReaderInstaller.wixproj", "{9C30A09E-1A74-4091-93B7-6296F94CE77C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -6,7 +6,7 @@
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>9c30a09e-1a74-4091-93b7-6296f94ce77c</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>BixVReaderInstaller</OutputName>
<OutputName>VivoKeySmartReaderInstaller</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
@@ -33,8 +33,8 @@
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BixVReader\BixVReader.vcxproj">
<Name>BixVReader</Name>
<ProjectReference Include="..\VivoKeySmartReader\VivoKeySmartReader.vcxproj">
<Name>VivoKeySmartReader</Name>
<Project>{1d286e48-de79-41ff-844b-56ed3764d4da}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
@@ -51,7 +51,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="BixVReader.ini.template" />
<Content Include="VivoKeySmartReader.ini.template" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixFirewallExtension">