On Tue, 2007-12-11 at 00:15 +0100, Guido Diepen wrote: > Hi Mark, > > i was wondering whether you managed to find some time to look at the rapi > version1 stuff. I was looking at some old webpages from synce, regarding the > rapi protocol and there I found a small website that gave some info: > http://synce.sourceforge.net/synce/packet.php >
Had a bit of a tinker, but not much yet. I quickly tried again to use your new code with the rapi1 rapi_context_call, but no luck. > There I do see exactly the same stuff that I discovered myself while working > on the rapi2 stuff. What strikes me as odd in registry.c for example is lines > 172-183: > rapi_buffer_write_uint32 (context->send_buffer, hKey); > rapi_buffer_write_optional (context->send_buffer, lpClass, > lpcbClass ? > *lpcbClass * sizeof(WCHAR) : 0, false); > rapi_buffer_write_optional_uint32(context->send_buffer, lpcbClass, > true); > rapi_buffer_write_optional_uint32(context->send_buffer, lpReserved, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, lpcSubKeys, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, > lpcbMaxSubKeyLen, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, > lpcbMaxClassLen, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, lpcValues, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, > lpcbMaxValueNameLen, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, > lpcbMaxValueLen, > false); > rapi_buffer_write_optional_uint32(context->send_buffer, > lpcbSecurityDescriptor, false); > rapi_buffer_write_optional (context->send_buffer, > lpftLastWriteTime, > sizeof(FILETIME), false); > > > This means for example that when you are querying for all information of a > given regkey, you not only send the size of the buffer on the computer side > to hold the class name, but you also send the complete buffer over the wire. > This really looks dumb to me for a protocol, since the device does not need > to know about the buffer I have, except for how much info at max at may send > to me :) > > Besides that, pretty much all of the other lines in the above code, deal with > info we should get from the device, so the amount of subkeys, the amount of > values, etc. Therefore, it is also not logical to send that over the line. > What you're saying makes perfect sense to me. Unfortunately we have no way of knowing if the guy who thought this up had any sense at all :) > So far, from what I have seen on that website, which really does with rapi1 > calls, since the command code for CeGetSpecialFolderPath is only 0x44 in the > rapi1, not in the rapi2, the stuff that needs to be sent over the line is > actually the same. So did you already try to put the exact code, except for > the command part in the registry.c ? > > Really would like to get to the point that the registry tool can be updated > also. If that works we can look at some of the other functions that are not > implemented yet. > > Me too. I'm going to, hopefully today, go through all the rapi1 registry calls and see exactly what works. Ta Mark ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ SynCE-Devel mailing list SynCE-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel