Passing data from C# to unmanaged C++ (using COM Interop)
I'm using Com Interop method to communicate with unmanaged C++ and C#.
I need to send data to unmanaged C++ from C#.
Im already sending "bool" values values from C# & accessing it through
"VARIANT_BOOL*" in c++.
I need to send a integer from C#. How can i access that integer value in
unmanaged c++ side ?
for example:
C#
public int myValue()
{
return 5;
}
Unmanaged C++
CoInitialize(NULL);
hRes = IMyPointer.CreateInstance(MyNSpace::CLSID_MyClass);
if (hRes == S_OK)
{
//// ??? define x type
IMyPointer->myValue(x);
}
No comments:
Post a Comment