From WikiChip
Difference between revisions of "mirc/commands/dll"
m (Bot: Automated text replacement (-<small>Note: Individual switches were not taken into consideration.</small> +)) |
m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
||
Line 52: | Line 52: | ||
== Compatibility == | == Compatibility == | ||
Added: mIRC v5.6 | Added: mIRC v5.6 | ||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == |
Revision as of 23:08, 5 July 2014
The /dll command can be used to call an exported function from DLL with the specified parameters.
Prototype
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);
Note: These functions must use the stdcall calling convention. (This is also the standard calling convention for all other Microsoft Win32 API functions.)
Synopsis
/dll <libName.dll> <funcName> [data] /dll -u <libName.dll>
Switches
- -u - Unload the given loaded library.
Parameters
- <libName.dll> - The name and path of the dynamic link library (DLL) file.
- <funcName> - The name of the exported function to call
- [data] - The data to pass to that function.
Example
/* gcc -c -O3 reverse.c gcc -shared --export-all-symbols -o reverse.dll -O3 reverse.o reverse.c: #include <windows.h> #include <string.h> int __attribute__((stdcall)) reverse(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { char *l = *data ? data + strlen(data) - 1 : data; char *p = parms; while ((*p++ = *l--)); strcpy(data, "/echo -s "); strcat(data+8, parms); return 2; } */ ; /reverse This is an example! ; !elpmaxe na si sihT Alias reverse { dll "reverse.dll" reverse $1- }
Compatibility
Added: mIRC v5.6
See also
mIRC commands list