C
cyberco
Using: WM5 PPC, .NetCF 2.0 OpenNetCF, C#
Before opening a socket I have to make sure the phone is on (not in
flight mode) and there is a GPRS attach. The latter can be solved by:
=============
bool connected = false;
ConnectionManager connMgr = new ConnectionManager();
connMgr.Connect(true, ConnectionMode.Asynchronous);
while (!connected) {
if (connMgr.Status != ConnectionStatus.Connected) {
Thread.Sleep(1000);
continue;
}
connected = true;
}
=============
But how about when the phone is in flight mode? I've read that you can
use OpenNetCF's Telephony API (tapi) for that, more specifically the
lineSetEquipmentState(hLine, dwState) method. But how do I invoke this
method? How do I know what the parameters should be? I'm using C#.
Before opening a socket I have to make sure the phone is on (not in
flight mode) and there is a GPRS attach. The latter can be solved by:
=============
bool connected = false;
ConnectionManager connMgr = new ConnectionManager();
connMgr.Connect(true, ConnectionMode.Asynchronous);
while (!connected) {
if (connMgr.Status != ConnectionStatus.Connected) {
Thread.Sleep(1000);
continue;
}
connected = true;
}
=============
But how about when the phone is in flight mode? I've read that you can
use OpenNetCF's Telephony API (tapi) for that, more specifically the
lineSetEquipmentState(hLine, dwState) method. But how do I invoke this
method? How do I know what the parameters should be? I'm using C#.