Project

General

Profile

Dll » History » Version 8

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