mIRC Home    About    Download    Register    News    Help

Topic Options
#501 - 09/12/02 07:55 AM mirc dll finding mirc directory/open sockets
redace Offline
Self-satisified door

Registered: 09/12/02
Posts: 3
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

Top
#502 - 10/12/02 08:23 AM Re: mirc dll finding mirc directory/open sockets
GrimZ Offline
Babel fish

Registered: 09/12/02
Posts: 66
Loc: Missouri, USA
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.
_________________________
- Linux System Administrator, Darktides Communications, LLC.

Top
#503 - 11/12/02 06:48 AM Re: mirc dll finding mirc directory/open sockets
redace Offline
Self-satisified door

Registered: 09/12/02
Posts: 3
Could someone point me to an example of using SendMessage?

Top
#504 - 11/12/02 07:12 AM Re: mirc dll finding mirc directory/open sockets
GrimZ Offline
Babel fish

Registered: 09/12/02
Posts: 66
Loc: Missouri, USA
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
_________________________
- Linux System Administrator, Darktides Communications, LLC.

Top
#505 - 11/12/02 07:22 AM Re: mirc dll finding mirc directory/open sockets
Merlin Offline
Vogon poet

Registered: 08/12/02
Posts: 164
Loc: Germany
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
_________________________
DALnet: #HelpDesk, #mIRC, #MISHScript - Undernet: #mIRC, #mIRC-Scripts

Top