Jump to content

Recommended Posts

Posted (edited)

Hello!

I would ask about custom DllOpen problem on Windows 10.

#EDIT: Already solved! You need to install Microsoft Visual C++ 2010 Redistributable Package (x86), sorry for traishing forum.

; open lua dll
Local $hDll = DllOpen("lua51.dll")

; check for error
If @error Or $hDll = -1 Then
    MsgBox(16, "Error " & @error, "Failed to open lua51.dll!")
    Exit
EndIf

; call a new state function
Local $aRet = DllCall($hDll, "handle:cdecl", "luaL_newstate")

; check for errors
If @error Then
    MsgBox(16, "Error " & @error , "Failed to start lua.")
    Exit
EndIf

; success
MsgBox(32, "Success", "Successfully loaded a lua!")

 

Attached lua51.dll and lua5.1.dll

lua5.1.dll

lua51.dll

Edited by Ascer

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