From WikiChip
Difference between revisions of "mirc/commands/dll"
(→See also) |
(→See also) |
||
Line 57: | Line 57: | ||
* [[List of identifiers - mIRC|List of identifiers]] | * [[List of identifiers - mIRC|List of identifiers]] | ||
* {{mIRC|$dll}} | * {{mIRC|$dll}} | ||
− | * {{mIRC|$ | + | * {{mIRC|$dllcall}} |
{{mIRC command list}} | {{mIRC command list}} | ||
[[Category:MIRC commands]] | [[Category:MIRC commands]] |
Revision as of 11:34, 19 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