I have recently made a windows dll in VB with a help from a few people, tested this dll in a vb application, works perfectly.
I am not a VB guru, nor a mIRC guru, thats why I need someones help, someone who is fairly good with vb/mIRC?
I try to test this dll in mIRC using something like:
//echo -a $dll(MathLib.dll,Square,2) which should echo 4, but instead it crashes mIRC and displays this error:

Firstly, any ideas whats causing that?
Secondly, I am willing to show the VB dll source to anyone if they are interested in helping me.
Thanks in advance.
Please don't cross post