C
chandra.somesh
Hi
I am trying to import a c++ code in c# using p/invoke but am having
some trouble in implementing it.
C++ code inside the dll
namespace abc{
class __declspec(dllexport) CommandLineParams{
void getCmdLineParams(wstring cc.wstring name );
};
}
C# code for p/invoke is this
[DllImport("Strider.dll")]
public extern void CommandLineParams.getCmdLineParams(string
cc, string Name);
when it use dumpbin to see what data is inside the dll , i see
following signature of this function
?getCmdLineParams@CommandLineParams@abc@@AAAXV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0000@Z
(private: void __cdecl abc::CommandLineParams::getCmdLineParams(class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> >,class std::basic_string<wchar_t,struct
std::char_traits<wchar_t>,class std::allocator<wchar_t> >))
Now i can't understand a thing in this signature ....
What am i doing wrong ? What should be the correct format of p/invoke ?
thanks in advance
Somesh
I am trying to import a c++ code in c# using p/invoke but am having
some trouble in implementing it.
C++ code inside the dll
namespace abc{
class __declspec(dllexport) CommandLineParams{
void getCmdLineParams(wstring cc.wstring name );
};
}
C# code for p/invoke is this
[DllImport("Strider.dll")]
public extern void CommandLineParams.getCmdLineParams(string
cc, string Name);
when it use dumpbin to see what data is inside the dll , i see
following signature of this function
?getCmdLineParams@CommandLineParams@abc@@AAAXV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0000@Z
(private: void __cdecl abc::CommandLineParams::getCmdLineParams(class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> >,class std::basic_string<wchar_t,struct
std::char_traits<wchar_t>,class std::allocator<wchar_t> >))
Now i can't understand a thing in this signature ....
What am i doing wrong ? What should be the correct format of p/invoke ?
thanks in advance
Somesh