The idea wasnt symantecs. A remote process most likely wouldnt care or use the cid at all. I dont think including the context within the dll itself would harm any code and can only improve it. The real problem is the sample i gave above

/scid 2 dll ....

from that line its clear i want the dll executed from withing the context of the cid 2. It isnt by chance becuase im explicitly forcing the change.

InSendMessage wouldnt work with PostMessage either nor does it garuntee that its called from within the context of mIRC's primary thread or a worker thread. Same affect with a remote process wich is a primary thread.

What mIRC should do is export its own API and allow the dll to call it. My point here is you can call it whatever you like but its completly reasonable to assume that code like /scid 1 then echo -a $cid would work and theres no reason to assume that they wouldnt work just because the code was called from within a mapped file.

The help file doesnt state that it does work but it doesnt state that it doesnt work. The only other tool you have to determine how it will work is /help /scid wich shows you how it works not how it doesnt work.

If you want to call it a feature suggestion thats fine. My take is the help file says $cid works a certain way and in some cases it doesnt hence the bug. I only wanted to get it mentioned ive already droped the project i was working on when i noticed it.


Have Fun smile