}
二、关闭GPRS网络数据连接
void platform_close_gprs_connect(void)
{
RASCONNSTATUS status;
DWORD result;
status.dwSize = sizeof(RASCONNSTATUS);
//关闭Ras拨号连接
if(WINCE_GPRS_NODE.hRasConn) {
result = RasHangUp(WINCE_GPRS_NODE.hRasConn);
if (result == 0)
{
//延时,判断连接是否关闭
while (RasGetConnectStatus(WINCE_GPRS_NODE.hRasConn, &status) == 0 )
{
Sleep(10);
}
WINCE_GPRS_NODE.hRasConn = NULL;
}
//else {
// MessageBox(NULL,L"关闭失败,请重试!",NULL,MB_OK);
//}
}
}