调整腾讯网吧特权组件位置
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
# 腾讯网吧特权组件
|
||||
|
||||
前端对接:https://iwiki.woa.com/p/4008054268
|
||||
后端对接(腾讯内网): https://iwiki.woa.com/p/1440190556
|
||||
后端对接: https://iwiki.woa.com/p/4008196267
|
||||
|
||||
# 示例代码
|
||||
```cpp
|
||||
#include <Windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "iigw_api_client.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
HMODULE hModule = ::LoadLibraryW(L"iigw_client_api.dll");
|
||||
if (hModule) {
|
||||
char* open_id = "979591";// "4724195171999796436";
|
||||
unsigned int game_id = 1;// 16300;
|
||||
iepm_qqwb::IQQNetbarIIGWPlugin *plugin =
|
||||
iepm_qqwb::CreateQQNetbarIIGWPlugin(hModule);
|
||||
if (plugin) {
|
||||
unsigned int zone_id = 0;
|
||||
char* tick_buff = nullptr;// "27A50B44430AAD6BFFBE09BA875E48BB";
|
||||
int tick_buflen = 0;// sizeof(tick_buff);
|
||||
iepm_qqwb::NetbarLv netbarlv = {0};
|
||||
|
||||
int ret = plugin->ReqNetbarLv2(
|
||||
20, // game_id=1(DNF的game_id)
|
||||
101, // zone_id=0(目前不重要的参数,暂时设置为0)
|
||||
"979591", // open_id (DNF目前还是使用的QQ号登录,这里传入用户的QQ号)
|
||||
iepm_qqwb::at_qq, // type (open_id的类型,这里使用qq号类型)
|
||||
nullptr, // ticketBuff, 传入空
|
||||
0, // ticketLen, 传入0
|
||||
&netbarlv, // netbarlv, 输出参数
|
||||
3000
|
||||
);
|
||||
|
||||
|
||||
if (ret == 0 && netbarlv.tokenLen > 0) {
|
||||
// do something
|
||||
printf("ret=%d, tokenLen=%d\n", ret, netbarlv.tokenLen);
|
||||
printf("ip=%s\n", netbarlv.ip);
|
||||
printf("token=%s\n", netbarlv.tokenBuff);
|
||||
printf("macSize=%d, macs='%s'\n", netbarlv.macSize, netbarlv.macs);
|
||||
}
|
||||
|
||||
ret = plugin->IsNetbarMachine(1, "979591", iepm_qqwb::at_qq);
|
||||
if(ret==IIGW_MSG_STATUS_NOT_IN_NETBAR)
|
||||
printf("IsNetbarMachine ret='IIGW_MSG_STATUS_NOT_IN_NETBAR'\n");
|
||||
else if (ret == IIGW_MSG_STATUS_NETBAR_PC)
|
||||
printf("IsNetbarMachine ret='IIGW_MSG_STATUS_NETBAR_PC'\n");
|
||||
else
|
||||
printf("IsNetbarMachine ret=%d\n", ret);
|
||||
}
|
||||
|
||||
::FreeLibrary(hModule);
|
||||
} else {
|
||||
DWORD err = ::GetLastError();
|
||||
printf("LoadLibraryW fail, err=%d\n", err);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user