Peter Beedell
27th February 2006 17:36 UTC
Reading PDA registry using RAPI
I know it is a bloody cheek, but would somebody be a darling and fill in the gaps for me - truth is I am just too stupid to get my battered brain around this stuff any more!
This function should read the registry of a connected PDA and return the value at the given key. I hope I can get a string back that would then be used as the path to copy a database file onto the SD card of target devices. I figure this could be useful to other PDA developers (bugger all support from MS!).
Function GetSDPath
System::Call "rapi::CERegOpenKeyEx(
t 'HKEY_LOCAL_MACHINE',
t 'System\StorageManager\Profiles\SDMemory',
etc, etc, )"
System::Call "rapi::CERegQueryValueEx(
t 'Folder'
etc, etc, )"
System::Call "rapi::CERegCloseKey()"
FunctionEnd
Instructor
27th February 2006 18:23 UTC
${PPC-registry::CeRapiInit} $R0
MessageBox MB_OK "PPC-registry::CeRapiInit$\n$\n\
Errorlevel: [$R0]"
${PPC-registry::Read} "HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory" "Folder" $R0 $R1
MessageBox MB_OK 'PPC-registry::Read$\n$\n\
$$R0 "string" =[$R0]$\n\
$$R1 "type" =[$R1]$\n'
${PPC-registry::CeRapiUninit}
${PPC-registry::Unload}
http://nsis.sourceforge.net/Registry_plugin
Peter Beedell
28th February 2006 14:36 UTC
Reading PDA registry using RAPI
Wow, well I am impressed!
For an encore perhaps you are interested in implementing a few of the RAPI file functions. I have found an implementation using RAPI::CeWriteFile directly which works but only for 64Kb and I have a 53Mb database (.sdf file) to copy over. I guess I could put this in a loop, but as we established in my first message, I am a bear of very little brain..... :-]
Whatever; a wopsy big thank you for all your kind support!
Instructor
28th February 2006 17:04 UTC
... implementing a few of the RAPI file functions
In the registry plugin only registry functions.