git-svn-id: https://svn.microneil.com/svn/PKG-SNF-SDK-WIN/trunk@29 7d91e7c8-5a61-404e-b06a-95855fde9112master
@@ -19,9 +19,9 @@ namespace SNFMultiDLLExampleCsharp | |||
#region DLL Imports | |||
// 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 = "..\\..\\..\\..\\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. */ | |||
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | |||
@@ -100,8 +100,8 @@ namespace SNFMultiDLLExampleCsharp | |||
// const string LicenseID = "licensid"; // SNF License ID can be passed | |||
// const string Authentication = "authenticationxx"; // directly or read from the | |||
// 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 |
@@ -19,9 +19,9 @@ namespace SNFMultiDLLExampleCsharp | |||
#region DLL Imports | |||
// 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 = "..\\..\\..\\..\\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. */ | |||
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] | |||
@@ -100,8 +100,8 @@ namespace SNFMultiDLLExampleCsharp | |||
// const string LicenseID = "licensid"; // SNF License ID can be passed | |||
// const string Authentication = "authenticationxx"; // directly or read from the | |||
// 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 |
@@ -905,8 +905,9 @@ bool ConfigurationElement::interpret(ConfigurationData& Data) { | |||
) { // then translate the content! | |||
// 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. | |||
@@ -1097,8 +1098,9 @@ bool ConfigurationAttribute::interpret(ConfigurationData& 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. | |||
@@ -109,6 +109,7 @@ | |||
#define configuration_included | |||
#include <string> | |||
#include <vector> | |||
#include <sstream> | |||
#include <fstream> | |||
#include <cstring> |