I'm wondering if it's possible for mIRC to run a DLL that does a system() call. I made one, but after the command has run, even with "debugging" in the form of MessageBox, when the DLL finishes and returns a 3, mIRC crashes. The Dr. Watson crash log doesn't show me where the crash happens, even though the DLL is compiled with debugging. I'm compiling the DLL using MinGW's gcc (specifically g++, as it's a DLL done in C++). I have written other DLLs for mIRC that function just fine, but none of them use system() calls, so I'm not sure if it's this or not. I did notice that mIRC will also crash if LoadDll has a MessageBox call in it, so is it also possible that if a DLL takes too long to do something, it'll crash mIRC?

EDIT:

I tried to compile the DLL under Visual C++ .NET 2003, and used it's debugging to find that it gets done with the DLL fine, but crashes immediately after the DLL has returned. Removing the system() call still causes it to crash, so I retract that it might be that. I have used DLLs made in C++ with mIRC, so I'm not even sure what's the cause now... I'll look into seeing what's causing it.

EDIT 2:

This is even stranger still. I removed ALL the code except for a single "return 3;" in the function being called by mIRC, and it STILL crashes. I'm not even sure how a DLL with nothing but a return can cause mIRC to crash...

FINAL EDIT:

I think this is a false alarm now. It's odd, but adding __stdcall before the variable name worked, which is odd since I haven't added that to any of my other DLLs. So it kinda stumped me as to why I had to do it.

Last edited by CyberBotX; 10/10/08 10:34 PM.