Page 1 of 1

Dll translate ahk

Posted: 23 Sep 2017, 21:20
by ahk new user
Hi Ahk World

I have this code in VB referring to use DLL


/*
Dim strResultado As String
strResultado = DLL_Trazabilidad.cls_Trazabilidad.Consulta_ICT("123456789")
MsgBox("Resultado : " & strResultado)
*/

I try to use dll with ahk , but I recibe error -4: The specified function could not be found inside the DLL.
I don´t know if this make an error DLL_Trazabilidad.cls

This code is in AHK

Result := DllCall("DLL_Trazabilidad\ Trazabilidad.Consulta_ICT" , str, "123456789")
MsgBox %ERRORLEVEL%
MsgBox Resultado %Result%

Any help could help

Thanks in advance

Re: Dll translate ahk

Posted: 23 Sep 2017, 23:08
by tmplinshi

Re: Dll translate ahk

Posted: 24 Sep 2017, 09:32
by ahk new user
I can´t see the function inside the DLL

I attach DLL here
if someone can help me to see the function inside the dll would be nice :D

thanks in advance

Re: Dll translate ahk

Posted: 24 Sep 2017, 21:48
by tmplinshi
Your dll is .NET dll, you will need CLR library.

Something like this (not sure it is correct):

Code: Select all

#Include CLR.ahk

asm := CLR_LoadLibrary("DLL_Trazabilidad.dll")
DLL_Trazabilidad := CLR_CreateObject(asm, "DLL_Trazabilidad.DLL_Trazabilidad")
result := DLL_Trazabilidad.Consulta_ICT("123456789")
MsgBox, % result
You can use ilspy or dotPeek to view the .NET dll apis.

Re: Dll translate ahk

Posted: 24 Sep 2017, 22:04
by AHK New user
Thanks y tmplinshi

let's do some try

Thanks :clap: