shanet Posted May 13, 2011 Share Posted May 13, 2011 (edited) 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 May 13, 2011 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 Link to comment Share on other sites More sharing options...
shanet Posted May 13, 2011 Author Share Posted May 13, 2011 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 Link to comment Share on other sites More sharing options...
shanet Posted May 13, 2011 Author Share Posted May 13, 2011 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 [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 Link to comment Share on other sites More sharing options...
trancexx Posted May 13, 2011 Share Posted May 13, 2011 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? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Yashied Posted May 13, 2011 Share Posted May 13, 2011 _WinAPI_DwmIsCompositionEnabled() from My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 15, 2011 Share Posted May 15, 2011 You can't pass a string to a parameter that expects an int. AutoIt should be failing there... Link to comment Share on other sites More sharing options...
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