OK so I have to use uInt32 to get the value
Dim ObjReg As OpenNETCF.Win32.Registry
Dim regkey As OpenNETCF.Win32.RegistryKey
Dim sReglocation As String = "Software\Microsoft\AirSync\Connection"
Dim sKey As String = "LastActiveSyncTime"
Dim myValue As UInt32
myValue =
CType(Registry.CurrentUser.OpenSubKey(sReglocation ).GetValue(sKey), UInt32)
but the value's I'm retreiving are, for example
myValue =
2598258112 (which displays 11/9/04 5:08 pm in ActiveSync )
3628519744 (which displays 11/9/04 6:08 pm in ActiveSync )
1043552448 (which displays 11/9/04 6:10 pm in ActiveSync )
so any ideas on how I can get this value back to Date/Time format so I an
display it in my app?
thanks
B
"brharsh17" wrote:
I'm accessing the registry to get the value of the LASTACTIVESYNCTIME stored
in bytes
I'm trying to use the following code below to achive this but I'm running
into
System.InvalidCastException. Do I need to put this into a byte array, then
convert it ... I don't know . Any help would be appreciated.
Dim ObjReg As OpenNETCF.Win32.Registry
Dim regkey As OpenNETCF.Win32.RegistryKey
Dim sReglocation As String = "Software\Microsoft\AirSync\Connection\"
Dim sKey As String = "LastActiveSyncTime"
Dim mybyte As Byte()
''''Dim ByteArray() As Byte
mybyte = CType(Registry.CurrentUser.OpenSubKey(sReglocation ).GetValue(sKey),
Byte())
--
b