Sign in to follow this  
Followers 0
MadBoy

Dllcall change in BETA

3 posts in this topic

This works fine in production but doesn't work in beta. I know there were some changes done to beta for Dllcall but since it's still magic for me i don't realy know how to fix this:

DetectPlugAndPlay()

Func DetectPlugAndPlay()
        Local Const $CM_LOCATE_DEVNODE_NORMAL = 0
        Local Const $CR_SUCCESS = 0
        $status = DllCall("cfgmgr32.dll", "int", "CM_Locate_DevNode", _
                "int_ptr", 0, "int", 0, "int", $CM_LOCATE_DEVNODE_NORMAL)
        
        If Not ($status[0] = $CR_SUCCESS) Then
            MsgBox(4096, "", "CM_Locate_DevNode failed: " & $status[0])
            Return 0
        EndIf
        
        $status = DllCall("cfgmgr32.dll", "int", "CM_Reenumerate_DevNode", "int", $status[1], "int", 0)
        
        If Not ($status[0] = $CR_SUCCESS) Then
            MsgBox(4096, "", "CM_Reenumerate_DevNode failed: " & $status[0])
            Return 0
        EndIf
EndFunc

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

"int_ptr"

to

"int*"


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

"int_ptr"

to

"int*"

Thank You


My little company: Evotec (PL version: Evotec)

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  
Followers 0