Commit b728ada5 by NitefullWind

1. 可配置依赖dll路径。

parent 8d5665ff
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
#define JSON_REQTYPE_FIND 2 #define JSON_REQTYPE_FIND 2
#define CONFIG_ALL_PATH "ALL/DLLPATH"
#define CONFIG_OLTP_PATH "OLTP/DLLPATH" #define CONFIG_OLTP_PATH "OLTP/DLLPATH"
#define CONFIG_OLTP_VER "OLTP/VER" #define CONFIG_OLTP_VER "OLTP/VER"
#define CONFIG_OLTP_FROM "OLTP/FROM" #define CONFIG_OLTP_FROM "OLTP/FROM"
......
...@@ -74,6 +74,12 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/ ...@@ -74,6 +74,12 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/
} }
QString path = QString::fromLocal8Bit(mod); QString path = QString::fromLocal8Bit(mod);
QApplication::addLibraryPath(path); QApplication::addLibraryPath(path);
FMPSettings setting;
QString configPath = setting.GetValue(CONFIG_ALL_PATH, "C:\\Freemud\\").toString();
QApplication::addLibraryPath(configPath);
ownApplication = QMfcApp::pluginInstance( hInstance ); ownApplication = QMfcApp::pluginInstance( hInstance );
} }
if ( dwReason == DLL_PROCESS_DETACH && ownApplication ) if ( dwReason == DLL_PROCESS_DETACH && ownApplication )
...@@ -108,9 +114,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata) ...@@ -108,9 +114,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
QString errorString; QString errorString;
if(!CopyApiDll(errorString)) { if(!CopyApiDll(errorString)) {
errorString = QString::fromLocal8Bit("{\"statusCode\":23, \"message\":\"%1\"}").arg(errorString); // errorString = QString::fromLocal8Bit("{\"statusCode\":23, \"message\":\"%1\"}").arg(errorString);
strcpy(outdata, errorString.toLocal8Bit()); // strcpy(outdata, errorString.toLocal8Bit());
return; // return;
} }
static RollBack rollback; static RollBack rollback;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment