DynamicLibrary

HC Communication Dynamic Libraries DynamicLibrary
Dynamic Libraries DynamicLibraryCall

DynamicLibrary dlname


outputs a new dynamic library node with the name dlname which can be assigned to a variable for usage with DLCall. The dynamic library is being loaded and stays in memory as long as the variable, to which it is assigned, exists.

Examples:

to FindWindowA title
	output DLCall user32 [FindWindowA] (list "Int
		"Class "Int 0
		"Title "Word title)
end
to SetFocus hWnd
	ignore DLCall user32 [SetFocus] (list "Int
		"hWnd "Int hWnd)
end
user32=DynamicLibrary "user32
hWnd=FindWindowA [aUCBLogo-4.67]
SetFocus hWnd

to GetCurrentDirectory
	local [buf status w]
	buf=StringBuffer 256
	status=DLCall kernel32 [GetCurrentDirectoryA] (list "Int
		"bufferLength "Int 4*count buf
		"buffer "Word buf)
	output StringBufferToWord buf
end
kernel32=DynamicLibrary "kernel32
show GetCurrentDirectory

Examples:

References:

Dynamic Libraries DynamicLibraryCall