Jump to content

DllStructCreate()


Recommended Posts

Im trying to create the below DEVMODE structure, and seeing as this is kind of my first DllStruct script I'm not sure about this stuff.

I think I have done most of it correctly but I don't have any idea what to put for"String * 32" and "LONG" for DllStruct as it doesn't support those types, actaully it most probably does but I don't know the correct word type for it. If someone could please take a look at the msdn link below and check that I'm creating this structure correctly I would much appreciate it.

FYI: I'm trying to change access the ChangeDisplaySettings function, if someone has already done this please don't post it :), I would like to figure most of it out for myself.

Thanks.

http://msdn.microsoft.com/library/default....ntspol_8nle.asp

$DevMode = DllStructCreate("STRING * 32 _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;LONG _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;int _
                       ;STRING * 32 _
                       ;int _
                       ;int _
                       ;LONG _
                       ;LONG _
                       ;LONG _
                       ;LONG")
Edited by Burrup

qq

Link to comment
Share on other sites

IMO the struct doesnt look right.

the one on MSDN has sub-struct's.

and yours doesnt.

The one from MSDN also looks alot longer...

but i think "STRING * 32" = "char[32]"

and "LONG" = "int"

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

Larry, I don't understand how you created your structure, and it worked lol.

ie.

$DEVMODE = DLLStructCreate("byte[32];int[10];byte[32];int[6]")

Where my now 'modifed' structure looks like...

$DevMode = DllStructCreate("char[32] _
                        ;int _
                        ;int _
                        ;int _
                        ;int _
                        ;dword _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;short _
                        ;byte[32] _
                        ;int _
                        ;dword _
                        ;dword _
                        ;dword _
                        ;dword _
                        ;dword _
                        ;dword")

I am currently pondering how you figured out your's and got it to work whilst looking at the structure tree at msdn, as w0uter said it has sub-structure's etc. Would you care to enlighten me please?

qq

Link to comment
Share on other sites

Ok last thing, with...

$DEVMODE = DLLStructCreate("byte[32];int[10];byte[32];int[6]")

Does the int[6] = dmFields? If so is it because [6] is the 6th 'thing' of the structure and its 'int' because its a 'dword'?

Also why is it byte[32]?

Thanks again.

qq

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