Windows RPC远程过程调用(2): 返回整数和整数数组
来源:互联网 发布:5eplay对战平台知乎 编辑:程序博客网 时间:2024/06/14 20:02
在<1> http://blog.csdn.net/hustspy1990/article/details/7608422基础上编写。
1. 返回整数
在idl文件中,添加函数,并用midl编译。
void intAdd2([in]int x, [in]int y,[out]int* plus);
在server代码中添加函数实现
void intAdd2( /* [in] */ int x, /* [in] */ int y, /* [out] */ int __RPC_FAR *plus){*plus = x + y;}
在client中调用的方法是
int *pval = (int*)malloc(sizeof(int));intAdd2(x, y, pval);
2. 返回整数数组
idl文件中添加函数
void retIntArray([in]int num, [out] int ia[10]);
server中添加
void retIntArray( /* [in] */ int num, /* [out] */ int __RPC_FAR ia[ 10 ]){int i;for(i=0; i<num; i++){ia[i] = i*i;}}
client中调用方法
int ia[10];retIntArray(10, ia);
- Windows RPC远程过程调用(2): 返回整数和整数数组
- Windows RPC 远程过程调用
- 远程过程调用(RPC)
- Rpc远程过程调用
- RPC远程过程调用
- 远程过程调用RPC
- RPC远程过程调用
- RPC 远程过程调用
- RPC远程过程调用
- 远程过程调用(RPC)
- 远程过程调用 (RPC)
- RPC远程过程调用
- 远程过程调用RPC
- RPC远程过程调用
- RPC远程过程调用
- 远程过程调用RPC
- RPC 远程过程调用
- RPC远程过程调用
- expdp错误ORA-39029
- ACE操作配置文件
- 上海偶游
- [mark]SCSI mode pages& SCSI Mode Sense Command
- rtf format statment
- Windows RPC远程过程调用(2): 返回整数和整数数组
- android 执行sql的长度限制
- java.lang.IllegalArgumentException: The observer is null.
- 代码控制CheckBox或者其他控件的选中状态
- 一段难忘的岁月——五月份
- Diff的简单使用
- 返工流程
- 一些想法
- 如何计算汇兑损益