I created a really quick dll in .net to go into the registry and grab a binary key value and convert it into usable data.
(It basically got the current DU-Meter stats)
This was my first attempt at creating a Mirc compatible dll, and I quickly realized it was malformed.
I scoured the net for a bit in hopes to find an example of a .net dll compatible with mirc, and I haven’t been able to find one yet.
Currently Mirc maintains it’s “$dll: no such routine ‘test’” no matter what I’ve tried.
To my understanding the functions within the dll have to be of the form:
int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause
granted this form isn't exactly native to .net, I took some liberties with it and came up with the following:
public unsafe int version(IntPtr mWnd, IntPtr aWnd,char *data,char *parms, bool show, bool nopause)
I wasn’t able to determine what data type HWND was in, but from what I gather it’s an IntPtr.
Because of the way .net handles pointers, I first tried to pass in the data and param variables by reference, but had no luck. I then tried to handle them as normal pointers, but the compiler wouldn’t let me touch them directly as they were “unsafe” so I had to flag the entire method as unsafe, and force the compiler to compile unsafe segments with the /unsafe compiler argument.
I converted the BOOL’s to bool’s as necessary.
Now at this point the function still wasn’t accessible, so I am wondering if I am completely off on the wrong tangent.
Has anybody successfully created a .net dll compatible with mirc? Or is there any help available?
Thanks very much for your time.
-pingh