mIRC Homepage
Posted By: redace mirc dll finding mirc directory/open sockets - 09/12/02 07:55 AM
I'm trying to code a mirc dll that will be able to determine if a certain script is running on mirc or if mirc has certain sockets open on certain ports. Does anyone know of a way for a dll to see what scripts mirc has loaded or what sockets it has open? I need to code it so its guaranteed to get stuff from the mirc process calling it, and not a clean copy of mirc's directory or anything else.

If anyone has any ideas, please share them.

Thanks,
Andrew
There's a few ways, I'm not sure if either are the best to do though.

1) You could always fopen() mIRC's .ini file (you can get the path/name easily) and read/parse that. Seems a bit of a burden though.

2) You could always use SendMessage() to look at $script(N) too. I'm pretty sure you can... been a while since I've done a mIRC dll though.
Could someone point me to an example of using SendMessage?
Well, you'd need to do some File Mapping to mIRC so you can send it stuff externally (through the DLL); SendMessage() itself is very simple to use:

SendMessage(HWND,MESSAGE,wParam,lParam); ......

It would take a lot of writing to explain how SendMessage and file mapping work so jump on google.com and search for 'Necroman DLL tutorial'

Good luck
A tutorial on how to make a DLL for mIRC can be found at http://necroman.wot.net/dllhelp.htm and/or http://www.mircscripter.com/mirc_dll.html
© mIRC Discussion Forums