Hi Steeve,
Thanks again for your support.
I have done some tests with the binary reading, but it still gets me 
a lot of problems when I start about structs etc. like they do in 
the "c"-examples.

But in the meantime I have tested between XML "select single node" 
compared to get values by strscan.
Well the result is amazing.... strscan is nearly 8 times faster!!!!
I thought it would be helpfull for anybody to point that here.

And I'm not sure if I will get much beter results when I use the dll-
functions and iterate through the fields. Specially compared to the 
lot of work I have to do to get it worked (if ever...)
So for now the processing is more than fast enough to work with and 
I'm very happy with the results.

Thanks again and regards.
/B

--- In development-axapta@yahoogroups.com, "Steeve Gilbert" 
<[EMAIL PROTECTED]> wrote:
>
> I've worked with struct when I used WinINet DLL.  
> Here's an exemple when I try to find a filename in an FTP session.
> 
> ***CODE BEGIN
> Binary findFiledata = new Binary(512); // WIN32_FIND_DATA struct
> Binary dwContext = new Binary(4); // DWORD size
> 
> dwContext.word(0, 0);
> 
> // Here I pass the pointer to findFiledata
> // the dll fills findFileData with WIN32_FIND_DATA struct
> _ftpFindFirstFile.call(_intSessHandle, lpszSearchFile, 
findFiledata, 
> 0, dwContext);
> 
> // The file found is in findFileData, we just need to extract it
> // I know that the file name is located at 0x2C in the struct and
> // length is 260
> info(substr(findFiledata.string(0x2C), 1, 260));
> ***CODE END
> 
> Since you cannot declare struct in Axapta the same way you can in 
C, 
> it's a bit more work, but you can also create a class that will 
> encapsulate all the struct management.
> 
> If you need more info about this, let me know.
> 
> Steeve...
> 
> --- In development-axapta@yahoogroups.com, "surfing2alien" 
> <carlbergman@> wrote:
> >
> > Hi Steeve,
> > Thanks for your answer.
> > In the meantime I have found the way to handle the message 
through 
> > XML.
> > And the speed is OK, but if it's possible todo faster I would be 
> very 
> > glad.
> > So I read you were able to extract fields to a struct, from a 
DLL??
> > Would you share some idea's or code with me?
> > 
> > Satch
> > 
> > --- In development-axapta@yahoogroups.com, "Steeve Gilbert" 
> > <steeve.gilbert@> wrote:
> > >
> > > Hi,
> > > 
> > > I think the XML version will indeed be a bit slower, but unless 
> > your 
> > > code is heavily used, I don't think you'll see a difference 
> between 
> > XML 
> > > and DLL call.  I've been able to use struct with DLL but not 
> array.
> > > 
> > > If you want to extract data from your XML string, use XML 
helper 
> > class 
> > > (XMLDocument, XMLNode, XMLElement, etc...) and that should be 
> easy 
> > > enough.  Start with : 
> > > 
> > > XMLDocument xmlDoc = new XMLDocuement();
> > > xmlDoc.loadXML(yourXMLString);
> > > ...
> > > check methods available in XMLDocument.
> > > 
> > > regards,
> > > 
> > > Steeve...
> > >
> >
>


Reply via email to