By making a donation,
you are helping us improve this forum.
|
Blueinput
Universal Bluetooth Mouse and Keyboard driver for Pocket PC
Fingertouch PRO
Software keyboard supporting multiple languages (English, French, German, Greek, Italian, Portuguese, Russian, Spanish)
and the fT9 engine for fast text input
|
|
|
| View previous topic :: View next topic |
| Author |
Message |
Raul Tinca TEK-Giant


Joined: 06 Apr 2006 Posts: 272
|
Posted: Tue Jun 20, 2006 4:00 pm Post subject: Detect Active Sync connection on WM 5 devices |
|
|
On 2005 devices the RAS API doesn't help too much... but there is a key in the registry that is updated by the OS in case if an AS connection:
Registry key:
HKEY_LOCAL_MACHINE \ System\State\Hardware key:Cradled
Here is a short code to help you read this key programatically:
bool bisActiveSyncConnected()
{
HKEY hKey;
DWORD dwTip, dwPos;
DWORD dwsize = sizeof(DWORD);
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\State\\Hardware"), 0, 0, &hKey) == ERROR_SUCCESS)
{
if (RegQueryValueEx(hKey, _T("Cradled"), 0, &dwTip, (LPBYTE)&dwPos, &dwsize)==ERROR_SUCCESS)
{
RegCloseKey(hKey);
return (dwPos>0);
}
else return 0;
}
return 0;
}
You can also register for notifications related to changes on this key value.  |
|
| Back to top |
|
 |
dr.ppc TEK-Newbie

Joined: 16 Jan 2007 Posts: 1
|
Posted: Tue Jan 16, 2007 11:01 am Post subject: |
|
|
Hi,
What do you mean "You can also register for notifications related to changes on this key value. "
Could you please point me how to to that? You mean to automatically monitor the change of registry (key value)?
Thanks & best wishes,
dr.ppc |
|
| Back to top |
|
 |
Raul Tinca TEK-Giant


Joined: 06 Apr 2006 Posts: 272
|
Posted: Tue Jan 16, 2007 4:28 pm Post subject: |
|
|
The following table shows the registry notification functions with a description of the purpose of each.
CeFindCloseRegChange This function stops change notification handle monitoring.
CeFindFirstRegChange This function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified registry key, or subkeys.
CeFindNextRegChange This function requests that the operating system signal a change notification handle the next time it detects an appropriate change.
Cheers,
Raul |
|
| Back to top |
|
Neo
Advisor

Joined: 04 Mar 2006
Posts: 1301
|
|
Post subject: Best choice for your Pocket PC!
|
|
|
I've heard it's possible to use a bluetooth Mouse with my PDA?
I've found some info here regarding Blueinput, did anyone test this?
Thanks!
|
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
Powered by phpBB © 2001, 2007 phpBB Group
|