Notices

Windows Mobile 5 No more Magneto!

Reply
 
LinkBack Thread Tools
Old 03-13-07, 04:46 PM   #1 (permalink)
Aximsite Prospect
 
Join Date: Mar 2007
Posts: 3
Thanked 0 Times in 0 Posts
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   Reply With Quote
Sponsor Ads
Old 03-13-07, 05:44 PM   #2 (permalink)
Aximsite All Star
 
mostlylisten's Avatar
 
Join Date: Jun 2006
Location: Minnesota
Posts: 914
Thanked 11 Times in 10 Posts
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   Reply With Quote
Old 03-13-07, 05:54 PM   #3 (permalink)
Aximsite Minor League
 
dtsouers's Avatar
 
Join Date: Mar 2006
Location: Ohio
Posts: 148
Device: HTC Touch Pro2
Carrier: ATT
Thanked 0 Times in 0 Posts

Awards Showcase
Aximsite Silver Contributors 
Total Awards: 1

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;
}
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Organize your shortcuts en masse.

Last edited by dtsouers; 03-13-07 at 06:12 PM. Reason: added additional method
dtsouers is offline   Reply With Quote
Reply

Tags
axim, code, cradled

Sponsor Ads

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 07:48 AM
Distorted menus when cradled GuOD X50 / X51 Forums 2 07-06-06 02:49 AM
Cradled x51v keep turning on forumx X50 / X51 Forums 4 02-26-06 10:02 PM
Do you keep your Axim cradled all day at work? MetalManCPA X50 / X51 Forums 15 01-13-06 08:56 PM
help make my cradled Axim interesting c0ldb33r Applications and Utilities 24 06-03-05 03:08 PM


All times are GMT -5. The time now is 08:59 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC