-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsdkclk.cpp
80 lines (73 loc) · 1.95 KB
/
sdkclk.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "stdafx.h"
#include "sdk.h"
#include "rpcutil.h"
#include "sdkclk_h.h"
//for sdkclk.idl
int CoreWSDKClkRecvTextMsg(
/* [in] */ unsigned int funptr,
/* [string][in] */ wchar_t *wxid,
/* [string][in] */ wchar_t *msg)
{
RPC_WSTR StringBinding = NULL;
int ret = ConnectSDKServer(&StringBinding);
if (ret == 0) {
// 下面是调用服务端的函数了
RpcTryExcept
{
ret = WSDKClkRecvTextMsg(funptr, GetCurrentProcessId(), wxid, msg);
}
RpcExcept(1)
{
printf("RPC Exception %d/n", RpcExceptionCode());
}
RpcEndExcept
DisconnectSDKServer(&StringBinding);
}
return ret;
}
int CoreWSDKClkRecvTransferMsg(
/* [in] */ unsigned int funptr,
/* [string][in] */ wchar_t *wxid,
/* [string][in] */ wchar_t *tid,
/* [string][in] */ wchar_t *msg)
{
RPC_WSTR StringBinding = NULL;
int ret = ConnectSDKServer(&StringBinding);
if (ret == 0) {
// 下面是调用服务端的函数了
RpcTryExcept
{
ret = WSDKClkRecvTransferMsg(funptr, GetCurrentProcessId(), wxid, tid, msg);
}
RpcExcept(1)
{
printf("RPC Exception %d/n", RpcExceptionCode());
}
RpcEndExcept
DisconnectSDKServer(&StringBinding);
}
return ret;
}
int CoreWSDKClkRecvPayMsg(
/* [in] */ unsigned int funptr,
/* [string][in] */ wchar_t *wxid,
/* [string][in] */ wchar_t *tid,
/* [string][in] */ wchar_t *msg)
{
RPC_WSTR StringBinding = NULL;
int ret = ConnectSDKServer(&StringBinding);
if (ret == 0) {
// 下面是调用服务端的函数了
RpcTryExcept
{
ret = WSDKClkRecvPayMsg(funptr, GetCurrentProcessId(), wxid, tid, msg);
}
RpcExcept(1)
{
printf("RPC Exception %d/n", RpcExceptionCode());
}
RpcEndExcept
DisconnectSDKServer(&StringBinding);
}
return ret;
}