There's a tutorial on mIRC DLLs using C++ by Necroman on mircscripts.org called Using and creating mIRC DLLs.