As of Windows XP and VB6 (I think it was VB 6), DDE is no longer a supported messaging method. You should use the SendMessage functionality in mIRC. It's not only available from a C app. I've attached a link to a project of mine which is a VB.NET 2003 sample showing you how to communicate with mIRC and making mIRC respond to the app.

http://mirc.stealth.net/developer/mIRC.Class.VB.NET.rar