From WikiChip
Difference between revisions of "mirc/commands/dll"
m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
m (Bot: Fixing compatibility) |
||
Line 51: | Line 51: | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|5.6}} | |
== See also == | == See also == |
Revision as of 01:54, 6 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
Added on: 03 Jun 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC commands list