Register Forums Today's Posts Reviews Gallery Video Vault Downloads Resources Shopping
Go Back   Mobility Site > PocketPC Software Forums > Windows Mobile OS > Windows Mobile 5

Windows Mobile 5 No more Magneto!

Reply
 
LinkBack Thread Tools
Old 03-13-07, 03:46 PM   #1 (permalink)
Aximsite Prospect
 
Join Date: Mar 2007
Posts: 3
iTrader Rating: (0)
How to tell, thru code, that Axim is cradled?

Trying to write some code. I need to determine if the handheld is cradled or not. Some have told me that the Windows CE Services section of the registry (on the PC) is the place to look. However, these keys on my systems do not change upon cradling.

Any help?

Thanks!
bmwpower is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
sponsor links


Old 03-13-07, 04:44 PM   #2 (permalink)
Aximsite All Star
 
mostlylisten's Avatar
 
Join Date: Jun 2006
Posts: 894
Location: Minnesota
PDA: Dell Axim X51V Ipaq 211
Laptop: Dell
PMP: Windows 11
iTrader Rating: (0)
View MyPDA
Probably not the answer your looking for but you can check when active sync has been synced and what by the programs/ active sync.
mostlylisten is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-07, 04:54 PM   #3 (permalink)
Aximsite Minor League

 
dtsouers's Avatar
 
Join Date: Mar 2006
Posts: 145
Location: Ohio
PDA: Axim x51v
Phone: LG 600G
Carrier: Tracfone
Laptop: Dell Inspiron 6000
PMP: Coreplayer
iTrader Rating: (0)
View MyPDA
Here is some snippets in c#:

//Add reference to ceutil in c:\windows\system32\ceutil.dll
[DllImport("CEUTIL.DLL", SetLastError = true)]
private static extern int CeGetDeviceId();


//------------------------------------------------------------------------------------
// Function: IsDeviceConnected()
// Desc: Returns true, if a device is connected. Devices with Guest are considered
// Receives: nada
// Returns: bool
//------------------------------------------------------------------------------------
public static bool IsDeviceConnected()
{
int b = CeGetDeviceId();

switch (b)
{
//Guest value
case -1:
return true;
//No device
case 0:
return false;
//Real device
default:
return true;
}
}


Or if you are using OpenNETCF:

RAPI r = new RAPI();
r.Connect(true);

// make sure we're connected
if (!r.Connected)
{
r.Dispose();
General.ShowErrorMessage("Device not connected. Please connect it and try again.");
return;
}

Aximsite Silver Contributors 


Last edited by dtsouers; 03-13-07 at 05:12 PM.. Reason: added additional method
dtsouers is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
axim, code, cradled

sponsor links



Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run program when cradled (e.g. instead of AS) tadeas Windows Mobile 5 1 11-01-06 06:48 AM
Distorted menus when cradled GuOD X50 / X51 Forums 2 07-06-06 01:49 AM
Cradled x51v keep turning on forumx X50 / X51 Forums 4 02-26-06 09:02 PM
Do you keep your Axim cradled all day at work? MetalManCPA X50 / X51 Forums 15 01-13-06 07:56 PM
help make my cradled Axim interesting c0ldb33r Utilities 24 06-03-05 02:08 PM


All times are GMT -5. The time now is 11:52 PM.