mIRC Home    About    Download    Register    News    Help

Print Thread
#8117 24/01/03 07:17 PM
Joined: Dec 2002
Posts: 25
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 25
Hi,

Has anyone succesfully made a (C++) DLL that calls functionality from a C# assembly, to be used in mIRC?

I've made a C# assembly, a Managed C++ part to call the functions I need (that compiles to a .lib) and a regular C++ part which uses that LIB file again.

It compiles, but mIRC crashes if I actually try to call into the MC++ part from the exported DLL function frown

#8118 12/02/03 11:33 AM
Joined: Feb 2003
Posts: 30
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Feb 2003
Posts: 30
You can actually create a mIRC DLL in Managed C++, be sure to include windows.h and wrap your exports in an extern "C" block, and if you plan to use new, you will have to create a struct to hold the pointers and use System::Collections to handle the garbage clean up. Also you will have to use System::InteropServices for alot of the conversions to C types that also needs to happen for this to be useful.

I plan on releasing a bit of code that will give you a very basic framework for creating DLLs that can take advantage of the .NET Library, not sure if it will be on this board or not, waiting for a response. I will update this thread when/if/where it is.


Bluesock - Better than a redhat.
http://www.bluesock.com
#8119 13/02/03 05:02 PM
Joined: Feb 2003
Posts: 30
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Feb 2003
Posts: 30
Here is my code blurb.


Bluesock - Better than a redhat.
http://www.bluesock.com
#8120 13/02/03 10:51 PM
Joined: Dec 2002
Posts: 25
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 25
Thanks, I'll try the more direct approach and see if I can get it working then.. when I find the time smile


Link Copied to Clipboard