You'll need to open file mapping to the mIRC instance.

You might want to try looking up 'file mapping' and 'sendmessage' on msdn.microsoft.com