Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
Old
#1  
Guest
Thanks Meter
Posts: n/a
Default Turn off the phone part of the XDA

I am writing an application for the XDA using eVC++ 3.0 with the Pocket PC 2002 SDK.

What I need to do is turn on/off the phone part of the XDA programatically without displaying the progress bubbles that normally appear.

I have thought about sending keydown and keyup events if I can find the correct key codes but the progress bubbles still appear.

Any thoughts?
 
itsme
Old
#2  
Developer / Recognized Developer
Thanks Meter 2
Posts: 652
Join Date: Mar 2003
Location: delft 52'00N 4'22E
Code:
//-------------------------------------------------------------
HINSTANCE  hCCoreUtlDll;

typedef void (__cdecl *PSRSFN)(int state);

PSRSFN SetRadioState;

BOOL LoadCCoreUtl()
{
    hCCoreUtlDll= LoadLibrary(_T("ccoreutl.dll"));
    if (hCCoreUtlDll==INVALID_HANDLE_VALUE)
        return FALSE;
    SetRadioState= (PSRSFN)GetProcAddress(hCCoreUtlDll, (TCHAR*)0x10);

    return (SetRadioState != NULL);
}

void TurnRadioOn()
{
    SetRadioState(2);
}
void TurnRadioOff()
{
    SetRadioState(1);
}

From reverse engineering rsupgrade.exe.
Code not tested, but I think this is how to do it.
 
nick.sturrock
Old
#3  
Junior Member
Thanks Meter 0
Posts: 6
Join Date: Mar 2003
Location: London
are there other functions for getting the current radio state? presumably so. can someone publish a complete list of funtion ordinals for ccoreutl.dll? sounds like it might have some useful stuff in it.

on a related note - does anyone know where the functionality for entering the SIM pin code lives? Ideally I want to be able to programmatically turn the radio on and input the PIN code without being pestered for it.

thanks,

nick.
 
wacky.banana
Old
#4  
wacky.banana's Avatar
Moderator Committee
Thanks Meter 494
Posts: 3,427
Join Date: Apr 2007
Default Ah those were the days...

Just happen to make it to the last page of this forum. This thread is an example of what was on our minds then.....5 years ago.

WB
Current Device - Samsung Galaxy Note 2
Previous Devices - HTC Sensation, Various Nokia Phones, Sony Z5 & Z7, Palm PDA, Sony P900, HTC Tytn, HTC HD2 (legendary device), HTC Desire, HTC Desire HD

Food for thought:
"Motor vehicles are NOT inherently dangerous; the problem lies with the faulty nut behind the wheel...."

"Children need roots to make them fly.."

"Never judge someone until you have walked a mile in their shoes but make sure the shoes fit first...."

"Never look down on another human being unless you are there to help them get back up again..."

"Why do ships carry cargo but cars carry shipments?."

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...