Jump to content
Sign in to follow this  
ANGRO

Struct alignment on 4 Bytes

Recommended Posts

$a  = DllStructCreate("dword;int;dword;int;int;char[257];dword;uint;uint")
DllStructSetData($a,1,292);dwSize                                        alignment on 4 Bytes!!!!!!!!
DllStructSetData($a,2,0);hwndOwner
DllStructSetData($a,3,$RASEDFLAG_NewPhoneEntry);dwFlags
DllStructSetData($a,4,0);xDlg
DllStructSetData($a,5,0);yDlg
DllStructSetData($a,6,0);szEntry
DllStructSetData($a,7,0);dwError
DllStructSetData($a,8,0);reserved
DllStructSetData($a,9,0);reserved2

$Dll_X = DllCall("Rasdlg.dll", "int", "RasEntryDlg", "str", 0, "str", 0, "ptr", DllStructGetPtr($a))
MsgBox(48,"Error 2","Error: "&@error&" | "&"Size: "&DllStructGetSize($a))

Share this post


Link to post
Share on other sites

Valuater

No. Error DllStructCreate

Confuzzled

In an example all works. DllStructSetData ($a, 1,292); dwSize it is aligned in hand-held.

Why AutoIT it does not do itself ????

Or I not correctly write a code.

Edited by ANGRO

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...