Obvious questions:

Have you tried your window creation code outside of a mIRC dll? Specifically: are you sure your window / threading code is working? I assume you posted this on an mIRC discussion board because you're having an issue that is specific to mIRC, and not just a general programming issue. If you haven't yet tested this, I suggest you do so first so we can narrow down and find out whether the problem is actually mIRC related.

If you have tried it and it crashes without mIRC, perhaps a better place to ask about threading / winapi code is on an MSDN / winapi discussion forum, not mIRC's forums.

Some pointers:

Threading + mIRC == bad. Instead of spawning a thread you should hook into mIRC's windowproc and do your processing from there to run mIRC's runloop along. Check MSDN on how to either subclass a window or hook into a windowproc.

Using "reinterpret_cast" smells fishy in general. Is this your code, or was it copied? You should probably stick to straight C.

Why are you passing a string literal as your thread parameter? Seems pointless...


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"