Search code examples
c#c++hashtablemanaged

c++ call a c# DLL with Hashtable parameter


I'm trying to call a C# DLL from C++ using CLI as this link: http://tom-shelton.net/index.php/2008/11/01/calling-managed-code-from-a-dll-created-in-visual-c-2008/

Everything seem be fine.

But if the C# function has got a Hashtable parameter, I don't know how to call it. C# function like this:

public void DoSomething(Hashtable htb,int,string etc)

Please help me to how to use this kind of C# function in C++.

Best regards

John


Solution

  • If you use CLR option then your c++ code becomes managed code. so you can use

    System::Collections::Hashtable
    

    in your c++ code to use Hashtable