Archive: Reading PDA registry using RAPI


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



${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

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!


... implementing a few of the RAPI file functions
In the registry plugin only registry functions.