Jump to content

DllCall Error


Recommended Posts

Alright, I'm trying to call NirCmd DLL's function "DoNirCmd", in autoit, and no matter what I try, @error always returns 1 (unable to use the DLL file), so is there something with the DLL it's self or am I doing something wrong?

Func _NirCmdCall($NirCmdStr)
    DllCall("nircmd.dll", "int", "DoNirCmd", "str", $NirCmdStr)
    If @error Then
        MsgBox(4096, "", @error)
    EndIf
EndFunc
Edited by zeffy
Link to comment
Share on other sites

No, everything is ok. It's you.

Check that you use right version of the dll (if your AutoIt is 32bit then nircmd.dll must be 32bit too).

This works for me just fine:

_NirCmdCall("cdrom open")
Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

No, everything is ok. It's you.

Check that you use right version of the dll (if your AutoIt is 32bit then nircmd.dll must be 32bit too).

This works for me just fine:

_NirCmdCall("cdrom open")

Yeah, I thought everything should be working, I tried running my code on the 32-bit version of autoit as well (I'm on a 64-bit system)

I'm trying to run this

_NirCmdCall("setdisplay 800 600 24")

and it should work, because it works fine on the command line version of nircmd, so i dont get whats going wrong ;_;

EDIT: Omfg, im so stupid,it is suposed to be

_NirCmdCall("setdisplay 800 600 32")

my monitor doesnt support 24 bit coloring lolol sorry I feel like an idiot :idea:

Edited by zeffy
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...