MemoryLoadLibrary()

Auto Hotkey

MemoryLoadLibrary

Loads the specified dll into the process. Similar to LoadLibrary but loads the module from memory rather than disk and allows loading a module multiple times.

OutputVar := MemoryLoadLibrary(PathToDll)
Function Example: ahkdllModule := MemoryLoadLibrary(A_AhkDir "\AutoHotkey.dll"))

Parameters

OutputVar

The name of the variable in which to store the handle of loaded module.

PathToDll

Path to a dll file saved on disk or network.

Related

MemoryModule, MemoryGetProcAddress, MemoryFreeLibrary, MemoryFindResource, MemorySizeofResource, MemoryLoadResource, MemoryLoadString, DllCall, DynaCall

Examples

MemoryLoadLibrary, ahkdllModule, %A_ScriptDir%\AutoHotkey.dll ; Load the AutoHotkey module.
MemoryGetProcAddress, ahkdll, %ahkdllModule%, ahkdll ; get address of ahkdll function.
MemoryGetProcAddress, ahkReady, %ahkdllModule%, ahkReady ; get address of ahkReady function.
DllCall(ahkdll,"Str","NewScript.ahk","Str","") ; start new thread
While DllCall(ahkReady)
  Sleep 100
MemoryFreeLibrary(ahkdllModule)