Jump to content

Recommended Posts

Posted (edited)

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

Posted

@Larry

I did ask people not to post it if they have it lol, but anyway I will look over your code and attempt to learn :), thanks.

@w0uter

Thanks for info, I am now changing the structure.

qq

Posted

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

Posted

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

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
  • Recently Browsing   0 members

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