mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2008
Posts: 4
J
Jehjoa Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: May 2008
Posts: 4
Hello everybody! smile

I'm new to mIRC scripting, but I have been programming in C/C++ for a few years now. Recently I saw a user in IRC post his system information (CPU type, available RAM, etc). He used NNScript for that, but I want to make my own. smile

So, as a test, I wrote the following in C:
Code:
#include <windows.h>

#define DLLEXPORT __declspec(dllexport)

DLLEXPORT int __stdcall mytestproc(HWND hwndMirc, HWND hwndOrigin, char * pData, char * pParams, BOOL fShow, BOOL fNoPause) {
   if (!fNoPause) {
      MessageBox(hwndMirc, TEXT("This messagebox comes from my dll!"), 0, MB_ICONINFORMATION);
   }

   return 1;
}


I compiled it, put the DLL in mIRC.exe's directory, and wrote the following alias in aliases.ini:
Code:
/sysinfo {
  /say $dll(jjmirc.dll, mytestproc, testdata)
}


Now, when I execute the /sysinfo command in mIRC, it says: "* $dll: no such routine 'mytestproc' (line 56, aliases.ini)". I opened the DLL in PE Explorer, and confirmed that the function is indeed in there. Who can tell me what I'm doing wrong?

Thanks in advance!

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
I would post this in the developper forum if I were you.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard