I want to write an application with csharp which reads the content of a file and passes it to an ATL COM object.
I have a problem with IDL. I defined a method named "Decode" on an ATL-COM object like below:
[id(101), helpstring("Decode")] HRESULT Decode([in] BYTE* pBuff, [in] INT nLen, [out, retval] INT* pnRetVal);
But, when I compiled my own COM dll and wanted to use it in the CSharp application I found the method with this signature:
int MyClass.Decode(ref byte pBuff, int nLen);
But, I excepted to have a method like this:
int MyClass.Decode(byte[] pBuff, int nLen);
Do you have any suggestions? I also tried different types such as VARIANT* or BYTE**, but I look for best solution.