On Mon, Jun 29, 2009 at 7:42 AM, Mark Ellis <m...@mpellis.org.uk> wrote:
> On Mon, 2009-06-29 at 12:39 +0200, Mark Ellis wrote: > > On Fri, 2009-06-26 at 22:37 +0200, David Richardson wrote: > > > I called CeCreateFile("//test.txt", GENERIC_READ | GENERIC_WRITE, 0, > > > NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); and watched that > > > connection on wireshark so I had some basis for comparison. > > > > > > CeCreateFile has a command code of 0x16 and using this knowledge I > > > believe the command code for CeRapiInvoke is 0x4C on WM5. (Which > > > according to > > > > https://synce.svn.sourceforge.net/svnroot/synce/trunk/librapi2/src/rapi2/READMEis > already taken by CeSetDatabaseInfoEx which is troubling, I think) > > > > > > I've attached the log of CeCreateFile in case someone wants to double > > > check my work or like me finds it easier to compare the two > > > side-by-side. > > > > > > My amateur opinion is that CeCreateFile and CeRapiInvoke look really > > > similar on the wire and is hopefully not hard to implement for that > > > reason. I'll try my hand at it today. > > > > > > > > > -David Richardson > > > > > > > > On Fri, Jun 26, 2009 at 12:44 PM, David Richardson > > > <docgra...@gmail.com> wrote: > > > I'm calling > > > > > > > > > hr = CeRapiInvoke("\\invokeme.dll", "PingBuffer", > > > PING_BUFFER_SIZE, buffer, &output_size, &output_buffer, NULL, > > > 0); > > > > > > > > > with PING_BUFFER_SIZE = 10 > > > > > > > David, the trace of the call sent to the device looks good. It actually > > looks exactly like what rapi1 invoke would send apart from the command > > code, which should make life easier. > > > > I can't see the data being sent back however. The data returned from the > > first call (packet 16) looks like this > > > > 0c 00 00 00 data len = 0x0c = 12 > > 7e 00 00 00 error mod not found > > 7e 00 07 80 > > 00 00 00 00 > > > > which would suggest it can't find the dll. Is the path correct in your > > call ? > I noticed that as well. Check out this pcap file. I'm calling PingResult this time and you can actually see the data being returned. PingResult takes a value and returns it as a the return code. I'm passing in 0x12345678. I'm trying to take it one step at a time and just trying to get the return code and error code to be valid before I worry about reading the output_size and output_buffer. I've got that working. You're right, its pretty much exactly the same as the old invoke. I'll implement the reading of output_size and buffer today and send a patch. I'm not going to look into stream mode at this time, but may in the future. Thanks for all the help! > > > > As for code 0x4c being assigned to CeSetDatabaseInfoEx, none of the > > database functions for rapi2 have been implemented. Maybe David (E) can > > give some indication of how reliable that list is ? > > > > Mark > > > > Sometimes I wonder why I spend so much time writing software that deals > with MS rubbish :) > > Can't invoke on WM5+ because it's in 'RAPI Restricted Mode', anyone know > how to switch to 'Open Mode' ? I'm not encountering this problem. I'm guessing its because I disabled all security in Visual Studio for the device. > > > > > > > > > I've attached the wireshark pcap. Ignore everything before 12 > > > seconds. I called the identical invoke 3 times on the > > > device. buffer should be 10 0xDD's. output_buffer and > > > output_size were uninitialized and when finished output_buffer > > > is identical to buffer and output_size is 10 > > > (PING_BUFFER_SIZE). > > > > > > > > > I'm not sending this to hand it off to you guys. I'm still > > > looking at this myself to see if I can implement it or figure > > > out the command code, but I'm sure the people on this list > > > have more experience doing this. > > > > > > > > > Let me know if you have any questions or want me to redo with > > > some changes. > > > > > > > > > -David Richardson > > > > > > > > > > > > On Thu, Jun 25, 2009 at 3:44 AM, Mark Ellis > > > <m...@mpellis.org.uk> wrote: > > > > > > On Thu, 2009-06-25 at 00:39 +0200, David Richardson > > > wrote: > > > > > > > > > > > > On Wed, Jun 24, 2009 at 12:35 AM, Mark Ellis > > > <m...@mpellis.org.uk> > > > > wrote: > > > > On Mon, 2009-06-22 at 22:10 +0200, David > > > Eriksson wrote: > > > > > On Wed, 2009-06-17 at 18:07 -0700, Captain > > > Fourier wrote: > > > > > > Hey, > > > > > > > > > > > > I have been trying to get CeRapiInvoke > > > to work. Just using > > > > the unit > > > > > > tests in the release. All I get is > > > -2147467263 as a return > > > > result. > > > > > > > > > > 0x80004001 means "not implemented" > > > > > > > > > > > Is CeRapiInvoke implemented? Is it still > > > only Stream mode? > > > > > > > > > > UTSL :-) > > > > > > > > > > Unfortunately it has not been implemented > > > for Windows Mobile > > > > 5 or newer > > > > > devices. Any takers on the synce-devel > > > list? > > > > > > > > > > > > > > > > Thanks for your time, > > > > > > Rob > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > David Eriksson, > > > http://www.divideandconquer.se/ > > > > > > > > > > > > > > > > > Rob, I'll take a look at this sometime, but > > > my time is very > > > > limited at > > > > the moment, so I'll need three things, the > > > dll you're using on > > > > the > > > > device and the code you're using to call it, > > > and the command > > > > code for > > > > CeRapiInvoke on WM5 :) > > > > > > > > I believe Rob was trying to execute the test located > > > at > > > > > > > > http://synce.svn.sourceforge.net/viewvc/synce/trunk/librapi2/tests/CeRapiInvoke/which > has a DLL with it. > > > > > > > > > > > > > Ah yes, I've never noticed that there ! > > > > > > > If someone can briefly explain how I would go about > > > getting the > > > > command code for CeRapiInvoke on WM5, I have the > > > necessary hardware > > > > and time. > > > > > > > > > Theoretically, run a small program on a windows host > > > that just > > > RapiInit's and calls the command we're interested in, > > > and capture the > > > transmission on the network interface using eg. > > > wireshark. > > > > > > Of course, being MS it's rarely that straightforward, > > > and if David is > > > correct it could be a lot more complex. However, if > > > you could use the > > > test prog for CeRapiInvoke from windows and capture > > > everything over the > > > interface, we might be fortunate. > > > > > > > > > > > > > > I don't have anything set up to generate the > > > call > > > > on Windows to capture that code, so someone > > > will have to find > > > > it for me. > > > > > > > > Mark > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > > > > > > _______________________________________________ > > > > SynCE-Devel mailing list > > > > SynCE-Devel@lists.sourceforge.net > > > > > > > > https://lists.sourceforge.net/lists/listinfo/synce-devel > > > > > > > > > > > > > > > > > > > > > > > >
otherinvoke.pcap
Description: Binary data
------------------------------------------------------------------------------
_______________________________________________ SynCE-Devel mailing list SynCE-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel