You can call almost any DLL export function with the MsgPlus! scripting.
The calling method has to be stdcall, so the Windows 32 API works fine. The function does also have to return int (if you're going to read the return value).
For example: You can call the SetWindowsHookEx function, but you won't be able to anything with it because javascript cannot handle the callbacks functions needed.
To use Win32 APIs, simply use the Interop object. The Interop object has a method/function which is called Call.
To use call in order to call any API function do like this:
code:
Interop.Call("user32.dll", "SetWindowsTextW", 0, "Hello");
The first parameter is the DLL the function is in, the second is the export name, rest are optional parameters used by the function.
Note: Always use the unicode version of Win32 APIs instead of the ANSI version. So put a W after a function to use the unicode function (only on functions whichs contains one string in its parameters, all expect GetProcAddress).
Edit: After using the DLL, you might want to free it, then simply do:
code:
Interop.FreeDll("dllname.dll");