BPS服务没有启动应用程序Blackberry10的启动

时间:2016-03-08 11:32:12

标签: c++ blackberry-10

   if(bps_initialize() == BPS_SUCCESS){
      qDebug() << "............................................"; 
      netstatus_interface_details_t *details;
      if (netstatus_get_interface_details(interface, &details) == BPS_SUCCESS) {
           QString ipAddr = netstatus_interface_get_ip_address(details, 0);
          netstatus_free_interface_details(&details);
      }
   }
bps_shutdown();

我在启动应用程序时调用此函数来获取设备的IP地址。但是(netstatus_get_interface_details(interface,&amp; details))返回false,当我删除这个if语句时应用程序崩溃。可能是什么原因。有帮助吗?如果我在我的应用程序中调用此功能,除了当我启动应用程序时,此代码工作正常。感谢提前。

0 个答案:

没有答案