interops and dll objects

  • Thread starter Thread starter Fabrizio
  • Start date Start date
F

Fabrizio

I want use an onbject exported from a C++ DLL in C# does it exist an
attribute like DllImport to do this.
 
Fabrizio said:
I want use an onbject exported from a C++ DLL in C# does it exist an
attribute like DllImport to do this.
What kind of dll is it:

1> If it's a com dll, then you can add it to your referece.
2> If it's not a com dll, then you need use DllImport, there are plenty
of samples over there.

Jianwei
 
Fabrizio said:
I want use an onbject exported from a C++ DLL in C# does it exist an
attribute like DllImport to do this.

If you mean C++ class objects, then the answer is no you can't use C++
classes from C#.
The only possibility is to wrap your native C++ class in a Managed C++
wrapper class.

Willy.
 
Back
Top