Dll » History » Version 5
Per Amundsen, 08/13/2014 07:31 AM
1 | 1 | Per Amundsen | _Added in 1.9.2_ |
---|---|---|---|
2 | |||
3 | */dll [-u] <name.dll> <procname> [data]* |
||
4 | |||
5 | 3 | Per Amundsen | This allows you to call routines in a [[DLL]] designed to work with AdiIRC. |
6 | 1 | Per Amundsen | |
7 | 5 | Per Amundsen | _At the moment only 64 bit DLL's can be loaded on 64 bit windows (even with the 32 bit AdiIRC), on 32 bit windows only 32 bit DLL's and even some mIRC DLL's can be loaded. |
8 | _ |
||
9 | 1 | Per Amundsen | *Prototype* |
10 | |||
11 | <pre> |
||
12 | #include <windows.h> |
||
13 | int procName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause); |
||
14 | </pre> |
||
15 | |||
16 | *Switches* |
||
17 | |||
18 | 4 | Per Amundsen | -u - Unloads the [[DLL]] instead of loading. |
19 | 1 | Per Amundsen | |
20 | *Parameters* |
||
21 | |||
22 | 4 | Per Amundsen | <name.dll> - Path/Filename to the [[DLL]]. |
23 | 1 | Per Amundsen | <procname> - procName to call. |
24 | [data] - Data to pass to procName() function. |
||
25 | |||
26 | *Example* |
||
27 | |||
28 | <pre> |
||
29 | /* |
||
30 | gcc -c -O3 reverse.c |
||
31 | gcc -shared --export-all-symbols -o reverse.dll -O3 reverse.o |
||
32 | |||
33 | reverse.c: |
||
34 | |||
35 | #include <windows.h> |
||
36 | #include <string.h> |
||
37 | |||
38 | int __attribute__((stdcall)) |
||
39 | reverse(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) |
||
40 | { |
||
41 | char *l = *data ? data + strlen(data) - 1 : data; |
||
42 | char *p = parms; |
||
43 | while ((*p++ = *l--)); |
||
44 | strcpy(data, "/echo -s "); |
||
45 | strcat(data+8, parms); |
||
46 | return 2; |
||
47 | } |
||
48 | */ |
||
49 | |||
50 | ; /reverse This is an example! |
||
51 | ; !elpmaxe na si sihT |
||
52 | alias reverse { |
||
53 | /dll "reverse.dll" reverse $1- |
||
54 | } |
||
55 | </pre> |