下你所需,载你所想!
汇集开发技术源码资料

c++ 调用webservice示例

:12.362MB :1 :2022-09-19 18:09:15

部分简介

c++ 调用webservice示例如果开发者对于本文件有需要的可以参考,
#include
#include "soapH.h"
#include "WeatherWebServiceSoap.nsmap"
#include
#include
#include
#include
using namespace std;

//GB2312到UTF-8的转换
char* G2U(const char* gb2312)
{
int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
wchar_t* wstr = new wchar_t[len 1];
memset(wstr, 0, len 1);
MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
char* str = new char[len 1];
memset(str, 0, len 1);
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);。

热门推荐

相关文章