Browse Source

using the dll name from the xml doc,specialized by the xml doc.

gsp 1 year ago
parent
commit
8947f10f37

+ 3 - 3
OTSCPP/OTSControl/Bruker/Bruker.API.Esprit.cpp

@@ -196,13 +196,13 @@ namespace BrukerDll
 	PEBSDStartAcquisitionFromPointList pEBSDStartAcquisitionFromPointList = NULL;
 	PEBSDGetPointResults pEBSDGetPointResults = NULL;
 
-	bool LoadEspritAPI()
+	bool LoadEspritAPI(char* csAPILibFile)
 	{
-	#ifdef _WIN64
+	/*#ifdef _WIN64
 	   const char* csAPILibFile = "Bruker.API.Esprit2.4.DLL";
 	#else
 	   const wchar_t* csAPILibFile = L"Bruker.API.Esprit.DLL";
-	#endif
+	#endif*/
 
 	   LoadCommonFunctions(csAPILibFile);
 		hEspritDllBaseAddress = LoadLibrary(csAPILibFile);

+ 1 - 1
OTSCPP/OTSControl/Bruker/Bruker.API.Esprit.h

@@ -56,7 +56,7 @@ namespace BrukerDll
 
 	typedef TFeatureData* PFeatureDataList;
 
-	bool LoadEspritAPI();
+	bool LoadEspritAPI(char* csAPILibFile);
 
 	//----------------------------------------------------------------------------------
 	// Interface functions of Bruker.API.Esprit.DLL

+ 2 - 2
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.cpp

@@ -58,7 +58,7 @@ namespace OTSController {
 	{
 	
 	
-		//m_bInit is the dll loading flag,so there's no need to free it manually , it'll be release when the the process  complete.(gsp)
+		//m_bInit is the dll loading flag,so there's no need to free it manually , it'll be release when the the whole process is  complete.(gsp)
 		if (!m_bInit)
 		{
 			// calculate Bruker client dll name
@@ -68,7 +68,7 @@ namespace OTSController {
 				// load Bruker client dll name succeed
 			LogTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::Init: bruker client dll name: %s"), strBruckerDllName);
 	
-			m_bInit=BrukerDll::LoadEspritAPI();
+			m_bInit = BrukerDll::LoadEspritAPI(strBruckerDllName.GetBuffer());
 			// load Bruker client dll OK?
 			if (!m_bInit)
 			{