关于return的函数返回值的问题 countSystems 这个API没有说明文档吗?说明文档会说明参数和返回值的.不过从你这个函数的原型来看.返回值是函数执行标记, 即成功与否及错误码.而数量是通过int * count返回, 因为这里是一个指针, 而且还是一个普通指针. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 countSystems()函数定义就在这里,inline BGAPI_RESULT countSystems( int * count ) { return BGAPI_countSystems( count ); } 返回值就是return BGAPI_countSystems( count ); 是不是返回值是count出来系统的个数,count是几就返回几?上面的BGAPI::countSystems()函数的定义如下:/**\fn BGAPI_RESULT countSystems( int * count )\brief Function category: Entry Point.\brief Count the numer of available BGAPI systems.\param 'count' (OUT) The numer of available BGAPI systems.\retval 'BGAPI_RESULT_OK' No error.*/inline BGAPI_RESULT countSystems( int * count ) { return BGAPI_countSystems( count ); }BGAPI_DECL BGAPI_RESULT BGAPICALL BGAPI_countSystems( int * count ); 对的这里已经说明了 'count' (OUT) The numer of available BGAPI systems. OUT表示输出, 也就是通过count返回 有效的BGAPI系统的个数.retval 'BGAPI_RESULT_OK' No error.这个意思是countSystems函数在成功时返回BGAPI_RESULT_OK.所以你调用应该是这样:int nCount = 0;if( BGAPI_RESULT_OK == countSystems(&nCount) ){ //获取成功}else{ //获取失败} 用vc2008的“windows 窗体应用程序”创建了个项目,在窗体的哪2个事件里写注册热键和注销热键? TeeChart在vs2005中的使用 “浏览文件夹”对话框的自定义问题 组合框初始化后,选项不能显示,为什么? 如何获得设备管理里面的信息 如何在ini文件中的指定位置写入注释语句? 如何在98下读取网卡受到的数据包? 关于列表框的一个问题 放在Dialog 上的msflexGrid刚开始时(没最大化),为什么不出现水平滚动条??最大化才有?? 谁能提供一个典型的控制面板程序,万分感谢 图形透明处理(桌面自由截图) 多网卡机器上,如何判断网卡是否是集成网卡?
countSystems()函数定义就在这里,
inline BGAPI_RESULT countSystems( int * count ) { return BGAPI_countSystems( count ); }
返回值就是return BGAPI_countSystems( count ); 是不是返回值是count出来系统的个数,count是几就返回几?上面的BGAPI::countSystems()函数的定义如下:/**
\fn BGAPI_RESULT countSystems( int * count )
\brief Function category: Entry Point.
\brief Count the numer of available BGAPI systems.
\param 'count' (OUT) The numer of available BGAPI systems.
\retval 'BGAPI_RESULT_OK' No error.
*/
inline BGAPI_RESULT countSystems( int * count ) { return BGAPI_countSystems( count ); }
BGAPI_DECL BGAPI_RESULT BGAPICALL BGAPI_countSystems( int * count );
这里已经说明了
'count' (OUT) The numer of available BGAPI systems.
OUT表示输出, 也就是通过count返回 有效的BGAPI系统的个数.retval 'BGAPI_RESULT_OK' No error.
这个意思是countSystems函数在成功时返回BGAPI_RESULT_OK.所以你调用应该是这样:
int nCount = 0;
if( BGAPI_RESULT_OK == countSystems(&nCount) )
{
//获取成功
}
else
{
//获取失败
}