Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkclient
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
李定达
sbkclient
Commits
efb78a9d
Commit
efb78a9d
authored
Jul 27, 2017
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.RES和spn导出接口统一;2.修复部分bug
parent
1606d0df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
ZH_Client.suo
+0
-0
ZH_Client/sbk_client.cpp
+10
-4
No files found.
ZH_Client.suo
View file @
efb78a9d
No preview for this file type
ZH_Client/sbk_client.cpp
View file @
efb78a9d
...
...
@@ -617,7 +617,10 @@ int SaveRollBackFile(const string text)
return
1
;
}
int
GetValue
(
char
*
indata
,
char
*
outdata
)
extern
"C"
{
__declspec
(
dllexport
)
int
_stdcall
GetValue
(
char
*
indata
,
char
*
outdata
)
{
int
reqType_i
=
0
;
...
...
@@ -750,6 +753,7 @@ endflag:
return
1
;
}
}
extern
"C"
{
...
...
@@ -867,7 +871,7 @@ int UTF8ToGBK(unsigned char * lpUTF8Str,unsigned char * lpGBKStr,int nGBKStrLen)
nRetLen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,(
char
*
)
lpUTF8Str
,
-
1
,
NULL
,
NULL
);
//获取转换到Unicode编码后所需要的字符空间长度
//lpUnicodeStr = new WCHAR[nRetLen + 1]; //为Unicode字符串空间
lpUnicodeStr
=
(
WCHAR
*
)
malloc
(
sizeof
(
WCHAR
)
*
(
nRetLen
+
1
));
memset
(
lpUnicodeStr
,
0
,
nRetLen
+
1
);
memset
(
lpUnicodeStr
,
0
,
sizeof
(
WCHAR
)
*
(
nRetLen
+
1
)
);
nRetLen
=
MultiByteToWideChar
(
CP_UTF8
,
0
,(
char
*
)
lpUTF8Str
,
-
1
,
lpUnicodeStr
,
nRetLen
);
//转换到Unicode编码
if
(
!
nRetLen
)
//转换失败则出错退出
return
0
;
...
...
@@ -986,11 +990,13 @@ int SendMsg(const std::string &text, const string &url, int iscret)
LOG
()
<<
"get sign : "
<<
sign
;
headers
=
curl_slist_append
(
headers
,
string
(
"sign:"
).
append
(
sign
).
c_str
());
}
headers
=
curl_slist_append
(
headers
,
"Content-Type:text/json"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type:application/json;charset=utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Accept:application/json"
);
}
else
{
headers
=
curl_slist_append
(
headers
,
"Content-Type:text"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type:text;charset=utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Accept:text"
);
}
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
...
...
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