|
|||||||
| Windows Mobile 5 No more Magneto! |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||
|
Aximsite Prospect
|
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! | |||
|
|
|
| sponsor links |
|
|
#2 (permalink) | ||||||||
|
Aximsite All Star
|
Probably not the answer your looking for but you can check when active sync has been synced and what by the programs/ active sync.
| ||||||||
|
|
|
|
|
#3 (permalink) | ||||||||||
|
Aximsite Minor League ![]()
|
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; } | ||||||||||
|
35.50296% - Major Geek I am nerdier than 95% of all people. Are you nerdier? Click here to find out! Last edited by dtsouers; 03-13-07 at 05:12 PM.. Reason: added additional method |
|||||||||||
|
|
|
![]() |
| Tags |
| axim, code, cradled |
| sponsor links |
| Thread Tools | |
|
|
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 |