Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkpay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
sbkpay
Commits
b728ada5
Commit
b728ada5
authored
Aug 31, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 可配置依赖dll路径。
parent
8d5665ff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
sbkpay/global.h
+1
-0
sbkpay/main.cpp
+9
-3
No files found.
sbkpay/global.h
View file @
b728ada5
...
@@ -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"
...
...
sbkpay/main.cpp
View file @
b728ada5
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment