Sign in to follow this  
Followers 0
GioVit

Possible Bug In Dllstructgetdata

5 posts in this topic

I am trying to read an old Database file made with BTreeFile (an extinct database manager library made with Turbo Pascal by TurboPower).

I'm using Larry's ApiFileReadWrite Functions and reading each record with a Structure defined with DllStructCreate() Function, in the Structure there are many String Fields that I defined as "char[xx]" in the string structure definition (ie "ubyte;char[40];char[8] " etc).

The problem is that when I'm trying to get a string field with DllStructGetData, this function return a string larger than the limit defined. (ie Field2 is "char[40]" it will return a string with length > 40).

The size of the string returned depends on the next byte equal to zero found.

So the questions are:

1) Is this the correct behaviour of DllStructGetData when reading a "char[xx]" field

2) If so, which is correct way to read strings from a binary file.

Thanks in Advance

Share this post


Link to post
Share on other sites



is this using the latest beta? go there first...

Lar.

Yes I'm using Beta release of AutoIt for a long time ago

Share this post


Link to post
Share on other sites

try downloading today's beta. Then tell me if it still is broken.

Lar.

Ok I wll, Thanks

Share this post


Link to post
Share on other sites

Larry, I Tested with Autoit beta version v3.1.1.123 and have the same result (Bug).

Please download the files below save them in the same folder and execute the DllStructBug.au3 file so you can realize what is the problem.

Sorry for being late with the answer, But I was very Busy

Thank you very much in advance

Share this post


Link to post
Share on other sites

possible bug should go first in the support forum. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0