Dll » History » Version 7
Per Amundsen, 02/16/2023 12:15 PM
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 | 6 | 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 | 5 | Per Amundsen | _ |
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 | 7 | Per Amundsen | table(ktable). |
19 | |*Switch*|*Description*| |
||
20 | | -u | Unloads the [[DLL]] instead of loading. | |
||
21 | 1 | Per Amundsen | |
22 | *Parameters* |
||
23 | |||
24 | 7 | Per Amundsen | table(ktable). |
25 | |*Parameter*|*Description*| |
||
26 | | <name.dll> | Path/Filename to the [[DLL]]. | |
||
27 | | <procname> | procName to call. | |
||
28 | | [data] | Data to pass to procName() function. | |
||
29 | 1 | Per Amundsen | |
30 | *Example* |
||
31 | |||
32 | <pre> |
||
33 | /* |
||
34 | gcc -c -O3 reverse.c |
||
35 | gcc -shared --export-all-symbols -o reverse.dll -O3 reverse.o |
||
36 | |||
37 | reverse.c: |
||
38 | |||
39 | #include <windows.h> |
||
40 | #include <string.h> |
||
41 | |||
42 | int __attribute__((stdcall)) |
||
43 | reverse(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) |
||
44 | { |
||
45 | char *l = *data ? data + strlen(data) - 1 : data; |
||
46 | char *p = parms; |
||
47 | while ((*p++ = *l--)); |
||
48 | strcpy(data, "/echo -s "); |
||
49 | strcat(data+8, parms); |
||
50 | return 2; |
||
51 | } |
||
52 | */ |
||
53 | |||
54 | ; /reverse This is an example! |
||
55 | ; !elpmaxe na si sihT |
||
56 | alias reverse { |
||
57 | /dll "reverse.dll" reverse $1- |
||
58 | } |
||
59 | </pre> |