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

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Gio710
Posts: 31
Joined: 01 Mar 2022, 06:34

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

Post by Gio710 » 05 May 2022, 02:44

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

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

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

Post by BoBo » 05 May 2022, 03:34

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:

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

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

Post by swagfag » 05 May 2022, 05:42

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)

Gio710
Posts: 31
Joined: 01 Mar 2022, 06:34

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

Post by Gio710 » 16 May 2022, 15:15

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

Post Reply

Return to “Ask for Help (v1)”