tbaror Posted March 8, 2009 Posted March 8, 2009 (edited) 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 March 8, 2009 by tbaror
ACS Posted March 8, 2009 Posted March 8, 2009 (edited) tbaror,It would help if you provided the actual data structure. 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 4DllStructCreate("align 2;short;int") ; structure is 6 bytes, the "int" is at offset 2And BTW, posting the actual binary file is of no use without documentation on the data structure itself. Edited March 8, 2009 by ACS
tbaror Posted March 8, 2009 Author Posted March 8, 2009 tbaror,It would help if you provided the actual data structure. 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 :-(
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now