| treizesegments |
19th December 2005 06:26 |
Pocket PC Registry with RAPI.DLL
Hello,
I want to read data from the PocketPC Registry.
I use this code :
Quote:
System::Call "rapi::CeRapiInit() i .r0"
; Recherche la clé Ident
; LONG CeRegOpenKeyEx( HKEY hKey, LPCWSTR lpszSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
System::Call "rapi::CeRegOpenKeyEx(i, w, i, i, *i) i(0x80000002, 'Ident', 0, 0, .r1) .r0"
; LONG CeRegQueryValueEx( HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved,LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData );
System::Call "rapi::CeRegQueryValueEx(i, w, i, *i, i, *i) i(r1., 'Name', 0, .r2, 0, .r3) .r0"
; LONG CeRegQueryValueEx( HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved,LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData );
System::Call "rapi::CeRegQueryValueEx(i, w, i, *i, *t, *i) i(r1., 'Name', 0, .r2, .r4, .r3) .r0"
|
I can read type of data and its number of bytes with the second call. But when I want to read the data itself (third call), the CeRegQueryValueEx function returns ERROR_FILE_NOT_FOUND or E_FAIL (0x80004005) error code.
I can't find the correct parameter type or I forget an important initialization !!! Somebody have an idea ? Thanks.
|