git-svn-id: https://svn.microneil.com/svn/PKG-SNF-SDK-WIN/trunk@29 7d91e7c8-5a61-404e-b06a-95855fde9112master
#region DLL Imports | #region DLL Imports | ||||
// Location of SNFMulti.dll. | // Location of SNFMulti.dll. | ||||
//const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU" | |||||
const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU" | |||||
//const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 | //const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 | ||||
const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86" | |||||
//const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86" | |||||
// int setThrottle(int Threads); /* Set scan thread limit. */ | // int setThrottle(int Threads); /* Set scan thread limit. */ | ||||
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | [DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | ||||
// const string LicenseID = "licensid"; // SNF License ID can be passed | // const string LicenseID = "licensid"; // SNF License ID can be passed | ||||
// const string Authentication = "authenticationxx"; // directly or read from the | // const string Authentication = "authenticationxx"; // directly or read from the | ||||
// configuration. OEMs go direct! | // configuration. OEMs go direct! | ||||
//const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform. | |||||
const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms. | |||||
const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform. | |||||
//const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms. | |||||
const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 | const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 |
#region DLL Imports | #region DLL Imports | ||||
// Location of SNFMulti.dll. | // Location of SNFMulti.dll. | ||||
//const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU" | |||||
const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU" | |||||
//const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 | //const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 | ||||
const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86" | |||||
//const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86" | |||||
// int setThrottle(int Threads); /* Set scan thread limit. */ | // int setThrottle(int Threads); /* Set scan thread limit. */ | ||||
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | [DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | ||||
// const string LicenseID = "licensid"; // SNF License ID can be passed | // const string LicenseID = "licensid"; // SNF License ID can be passed | ||||
// const string Authentication = "authenticationxx"; // directly or read from the | // const string Authentication = "authenticationxx"; // directly or read from the | ||||
// configuration. OEMs go direct! | // configuration. OEMs go direct! | ||||
//const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform. | |||||
const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms. | |||||
const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform. | |||||
//const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms. | |||||
const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 | const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 |
) { // then translate the content! | ) { // then translate the content! | ||||
// Create the Content buffer... | // Create the Content buffer... | ||||
int BfrSize = Stopdex - Startdex; // How big a buffer do we need? | |||||
char Bfr[BfrSize]; // Make one that size. | |||||
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need? | |||||
vector<char> heapBfr(BfrSize,0); // Make one that size. | |||||
char* Bfr = &heapBfr[0]; | |||||
copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. | copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. | ||||
// Read our data. | // Read our data. | ||||
int BfrSize = Stopdex - Startdex; // How big a buffer do we need? | |||||
char Bfr[BfrSize]; // Make one that size. | |||||
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need? | |||||
vector<char> heapBfr(BfrSize,0); // Make one that size. | |||||
char* Bfr = &heapBfr[0]; | |||||
NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. | NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. | ||||
#define configuration_included | #define configuration_included | ||||
#include <string> | #include <string> | ||||
#include <vector> | |||||
#include <sstream> | #include <sstream> | ||||
#include <fstream> | #include <fstream> | ||||
#include <cstring> | #include <cstring> |