From WikiChip
Difference between revisions of "mirc/dynamic-link library"
m (→Synopsis) |
|||
Line 11: | Line 11: | ||
/dll <filename> <procname> [data] | /dll <filename> <procname> [data] | ||
− | + | ||
/dll -u <filename> | /dll -u <filename> | ||
− | + | ||
$dll(<filename>, <procname>, [data]) | $dll(<filename>, <procname>, [data]) | ||
− | + | ||
$dllcall(<filename>, <alias>, <procname>, data) | $dllcall(<filename>, <alias>, <procname>, data) | ||
Revision as of 14:03, 20 July 2014
Template:mIRC Guide The /dll and $dll() features allow you to make calls to DLLs designed to work with mIRC. The main reason you would want to do this is that processing information in a DLL can be far faster than doing so in a script, so for intensive data processing a DLL would be more efficient.
Note: mIRC also supports calling COM objects, for calling non-standard DLLs.
Synopsis
If you are using a dll:
/dll <filename> <procname> [data] /dll -u <filename> $dll(<filename>, <procname>, [data]) $dllcall(<filename>, <alias>, <procname>, data)
Parameters
- <filename> - The filename for the dll you wish to use.
- <procname> - The name of the function/procedure you wish to call.
- [data] - The optional parameters for the function/procedure.
- <alias> - If you use $dllcall, it calls the function asynchronously, meaning that the code won't halt, $dllcall won't return a value. Instead, mIRC calls the specified <alias> when the function finished.
If you are making a dll, the exported function must have the following function prototype:
#include <windows.h>
int funcName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);
- mWnd - The handle of the main mIRC window.
- aWnd - The handle of the window in which the command is being issued, this might not be the currently active window if the command is being called by a remote script.
- mWnd - The handle the main mIRC window
- mWnd - The handle the main mIRC window
- mWnd - The handle the main mIRC window
Note: These functions must use the stdcall calling convention. (This is also the standard calling convention for all other Microsoft Win32 API functions.)