Page 1 of 1

how to call .dll ressources from AHK, like I did in VBA ?

Posted: 05 May 2022, 02:44
by Gio710
HI,

I'm currently passing several VB macros to AHK.

Some of these would refer to dll's, in the context of Dragon Naturally Speaking. In VB I would write :

#Reference {5C486340-2F92-11D1-A47C-00A024A3A678}#1.0#0#C:\Program Files (x86)\Nuance\NaturallySpeaking15\Program\dnstk10.dll#Dragon NaturallySpeaking ActiveX Controls#DNSTools

In AHK I tried
#DllLoad "C:\Program Files (x86)\Nuance\NaturallySpeaking15\Program\dnstk10.dll"

Can sdy orient me on what I do wrong ? Please ?

Thanks

Re: how to call .dll ressources from AHK, like I did in VBA ?

Posted: 05 May 2022, 03:34
by BoBo
Can't find this kinda "command" within AHK's Help. Neither for v1 nor v2. So, why do you expect it to work out in the first place?? :wtf: :shock:
Have you checked out AHK's :arrow: DllCall() already? :think:

Re: how to call .dll ressources from AHK, like I did in VBA ?  Topic is solved

Posted: 05 May 2022, 05:42
by swagfag
dllload is a v2 directive. it does a win32 LoadLibrary for u, while also pinning the dll, though it's not necessarily needed if all u want to do is invoke a function from the dll. for doing that, there is DllCall(but make sure to read the docs remarks carefully)

Re: how to call .dll ressources from AHK, like I did in VBA ?

Posted: 16 May 2022, 15:15
by Gio710
thanks both of you. I was not aware of https://www.autohotkey.com/docs/commands/DllCall.htm

It seems complex at 1st sight. I'll dig into it when i got more time