Hello everybody!
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.
So, as a test, I wrote the following in C:
#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:
/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!