Jump to content

Possible Bug In Dllstructgetdata


Recommended Posts

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...