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