Jump to content

DllStructCreate Help?


Recommended Posts

Hello,

i am trying to figure out for how to work correctly with DllStructCreate for creating correct alignment.

What i am trying to achieve is simulate several types of video types , for example i have file that is one frame of "RAWDV_PAL" i would like to

create DllStructCreate buffer correctly for it and the write it to file using _WinAPI_ReadFile .

i know it must be created using array but not sure how .

i have attached the frame file for example.

Please advice

Thanks,

frame1.zip

Edited by tbaror
Link to comment
Share on other sites

tbaror,

It would help if you provided the actual data structure. :P

But creating structures is easy. Just check the help file on DllStructCreate as it gives a very nice example.

It even discusses alignment in the Remarks section.

By default, a structure alignment of 8 is used (to be consistent with general Microsoft compilers and APIs). To use a different alignment prefix the structure with the align keyword - valid alignments are 1,2,4,8 and 16:

DllStructCreate("short;int") ; structure is 8 bytes, the "int" is at offset 4

DllStructCreate("align 2;short;int") ; structure is 6 bytes, the "int" is at offset 2

And BTW, posting the actual binary file is of no use without documentation on the data structure itself.

Edited by ACS
Link to comment
Share on other sites

tbaror,

It would help if you provided the actual data structure. :P

But creating structures is easy. Just check the help file on DllStructCreate as it gives a very nice example.

It even discusses alignment in the Remarks section.

And BTW, posting the actual binary file is of no use without documentation on the data structure itself.

Hello ACS,

thanks for you're answer , you right its does have nice example there but i do missing basic understanding of the structure buffer building :-(

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...