mIRC Homepage

mirc dll finding mirc directory/open sockets

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
Posted By: GrimZ

Re: mirc dll finding mirc directory/open sockets - 10/12/02 08:23 AM

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.
Posted By: redace

Re: mirc dll finding mirc directory/open sockets - 11/12/02 06:48 AM

Could someone point me to an example of using SendMessage?
Posted By: GrimZ

Re: mirc dll finding mirc directory/open sockets - 11/12/02 07:12 AM

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
Posted By: Merlin

Re: mirc dll finding mirc directory/open sockets - 11/12/02 07:22 AM

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
© 2019 mIRC Discussion Forums