Project

General

Profile

Dll » History » Revision 4

Revision 3 (Per Amundsen, 08/13/2014 07:30 AM) → Revision 4/8 (Per Amundsen, 08/13/2014 07:30 AM)

_Added in 1.9.2_ 

 */dll [-u] <name.dll> <procname> [data]* 

 This allows you to call routines in a [[DLL]] designed to work with AdiIRC. 

 Note: 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 dll's can be loaded. 

 *Prototype* 

 <pre> 
 #include <windows.h> 
 int procName(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause); 
 </pre> 

 *Switches* 

 -u - Unloads the [[DLL]] dll instead of loading. 

 *Parameters* 

 &lt;name.dll&gt; - Path/Filename to the [[DLL]]. dll. 
 &lt;procname&gt; - procName to call. 
 [data] - Data to pass to procName() function. 

 *Example* 

 <pre> 
 /* 
   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- 
 } 
 </pre>