Hi everybody i really need your help, this is my problem:

I have a c++ dll that use MFC, i need to use it in a c# project
I need to end with another dll that to use it in the c# project

I just cant find solution all over the internet, i have found many but not well documented solutions so i just got confused a lot :S pleasssee somebody orient me. i have found this solutions:

1.- in the same project of the c++dll make a managed class that act as a proxy. i tried this but a lot of compilation errors because i need to use /clr option.

2.- in another project a c++ managed project use the unmanaged c++ dll and create a kind of proxy. i just couldnt make use the dll.

3.- in c# create rcw with sentences like comimport, marshal, etc. but i just cant find a good tutorial that explain everything example i dont know where to get the guid of the dll....

any help please!!!!!

What about Project->Add reference!!

What about Project->Add reference!!

Come on! that was the first thing i did!! it doesnt work!!!! because it is not managed code! :@!

It works with you?

It works with you?

Nop actually the main problem is that calling function is not enough, i need to create an instance, because the class inside the dll conects to a server and keeps information, i was trying this... but in the constructor appears a memory error...

http://blogs.msdn.com/sanpil/archive/2004/07/07/175855.aspx

any ideas?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.