Resolve merge conflicts master into devicesettings

This commit is contained in:
Paul Hollinsky
2018-09-26 18:24:59 -04:00
40 changed files with 142 additions and 123 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ public:
static std::vector<neodevice_t> FindByProduct(int product) { return VCP::FindByProduct(product, L"serenum"); }
};
};
}
#endif
+1 -1
View File
@@ -65,6 +65,6 @@ private:
};
};
};
}
#endif
+1 -1
View File
@@ -28,6 +28,6 @@ private:
};
};
};
}
#endif
+1 -1
View File
@@ -11,6 +11,6 @@ public:
static std::vector<neodevice_t> FindByProduct(int product) { return VCP::FindByProduct(product, L"usbser"); }
};
};
}
#endif
+1 -1
View File
@@ -43,6 +43,6 @@ private:
void writeTask();
};
};
}
#endif
+6 -1
View File
@@ -4,12 +4,17 @@
#include <Windows.h>
#include <winsock2.h>
#include <pcap.h>
#include <memory>
namespace icsneo {
// Helper loader for the PCAP DLL
class PCAPDLL {
public:
// The first time we use the DLL we keep it in here and it won't get freed until the user unloads us (for speed reasons)
static std::shared_ptr<PCAPDLL> lazyLoadHolder;
static bool lazyLoaded;
// Functions
typedef int(__cdecl* PCAPFINDDEVICE)(char* source, struct pcap_rmtauth* auth, pcap_if_t** alldevs, char* errbuf);
typedef pcap_t*(__cdecl* PCAPOPEN)(const char* source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth* auth, char* errbuf);
@@ -48,6 +53,6 @@ private:
void closeDLL();
};
};
}
#endif
+8
View File
@@ -2,7 +2,15 @@
using namespace icsneo;
std::shared_ptr<PCAPDLL> PCAPDLL::lazyLoadHolder;
bool PCAPDLL::lazyLoaded = false;
PCAPDLL::PCAPDLL() {
if(!lazyLoaded) {
lazyLoaded = true;
lazyLoadHolder = std::make_shared<PCAPDLL>();
}
dll = LoadLibrary("wpcap.dll");
if(dll == NULL) {