Hi!
In my C++ application I need to use COM object (written in c#). The cooperation of COM and C++ application works fine, but I have a problem with calling one of C# methods.
MyComObject::Co mClass InterfacePtr p (__uuidof(MyCom Object::ComClas s ));
_com_ptr = p;
_com_ptr->ProcessFile(_b str_t a_strNewFileNam e, SAFEARRAY * a_arrFileConten ts )
the original C# method is defined as follows:
public string ProcessFile(str ing a_strNewFileNam e, byte[] a_arrFileConten ts)
the byte array represents the content of the file red from C++ level.
I need a piece of code showing how to read a content of the file and save this in a SAFEARRAY object (so as to call the ProcessFile method)
Would anyone help me to solve this problem,please? ?
In my C++ application I need to use COM object (written in c#). The cooperation of COM and C++ application works fine, but I have a problem with calling one of C# methods.
MyComObject::Co mClass InterfacePtr p (__uuidof(MyCom Object::ComClas s ));
_com_ptr = p;
_com_ptr->ProcessFile(_b str_t a_strNewFileNam e, SAFEARRAY * a_arrFileConten ts )
the original C# method is defined as follows:
public string ProcessFile(str ing a_strNewFileNam e, byte[] a_arrFileConten ts)
the byte array represents the content of the file red from C++ level.
I need a piece of code showing how to read a content of the file and save this in a SAFEARRAY object (so as to call the ProcessFile method)
Would anyone help me to solve this problem,please? ?
Comment