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.

