i know that $dde is exist but i want that if one parameter is spcified and it's a number so it will return the Nth dde server
so i can know the dde servers on my computer
0 - total dde servers
I'm not too familiar with DDE programming, but I don't believe such a feature can exist. I don't think Windows gives applications a list of the running DDE servers. I quickly looked through the DDE function list, and I didn't see anything that would do this.
I think it can.
I don't know the specifics, but the DDE package for Tcl on windows, provides a method of obtaining the currently running DDE servers.
I started using Tcl to make external mIRC interfacing aplications, but gave up when I found that Tcl for windows is crash prone like most other ports using cygwin.
However, at the time, I was able to run 15 copies of mIRC. Each one called a external Tcl application, to find out what DDE name it should use. Tcl would look at the currebntly looking servers, and pick a name and return it. From then on, Tcl could mass address a list of mIRC servers.
The Tcl isn't needed anymore, seeing as mIRC now has native multi-server support.
I saw a pretty old application that did it on MSDN (it was 16 bit)... lemmie find the link
I htink this is it:
http://msdn.microsoft.com/library/default.asp?URL=/library/techart/msdn_rawdde.htmOk, well its not. mIRC now allows you to play with SendMessage, or a DLL coder could prolly whip somehting up from the similar ARTICLES found there...
Me? I'm too lazy to learn VC++ 6 well enough
As a simple workaround, wouldn't it be possible to just make any mIRC DDE server add itself to a list that's stored somewhere in a person's registry? then when you run $dde(0), it just reads the info from the registry and returns the appropriate value.
It could even use a simple .ini file that's temporarily stored in 'c:\temp\'. This file would be deleted when the last mIRC DDE server is shut down.
Could be useful to detect rogue instances of mIRC running, eg. pre-packaged scripts or hidden trojan copies. This would have been much more useful before multi-server support was added.
- Raccoon
Maybe the suggestion was in order to find other, unknown DDE servers, not only other copies of mIRC.