Jump to content
Sign in to follow this  
shanet

array assigned to DllCall() returns negative integer

Recommended Posts

Hi all,

I am trying to help my brother with a project of his and am having a problem with DllCall().

The variable its assigned to returns an array limit of -2147024809.

The code is:

_SetColor()
Exit

Func _SetColor()
    Local $result
    ConsoleWrite("In Function")
    Local $return = DLLCall(@Systemdir & "\dwmapi.dll", "int", "DwmIsCompositionEnabled", "int", "pfEnabled")
    ConsoleWrite($return[0])
    return $return
EndFunc   ;==> _SetColor

Does anyone have any idea what may be up with this code?

Thanks,

shanet

Edited by shanet

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

Furthermore, if I remove the first parameter, it freezes then returns -1073741819


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

nvm just figured it out :unsure:

_SetColor()
Exit

Func _SetColor()
    Local $result
    ConsoleWrite("In Function")
    Local $return = DLLCall(@Systemdir & "\dwmapi.dll", "BOOLEAN", "DwmIsCompositionEnabled", "BOOL", "pfEnabled")
    ConsoleWrite($return[0])
    return $return
EndFunc   ;==> _SetColor

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

nvm just figured it out :>

_SetColor()
Exit

Func _SetColor()
    Local $result
    ConsoleWrite("In Function")
    Local $return = DLLCall(@Systemdir & "\dwmapi.dll", "BOOLEAN", "DwmIsCompositionEnabled", "BOOL", "pfEnabled")
    ConsoleWrite($return[0])
    return $return
EndFunc   ;==> _SetColor

Figured out what? How to call it wrong? :unsure:

♡♡♡

.

eMyvnE

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