المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# function(out byte buffer, ..) and its ActiveX module in C++ function(unsigned char* buffer, ...



C# Programming
11-05-2009, 03:35 AM
There is an ActiveX dll in C++ that has some function:


void function(unsigned char* buffer, unsigned long* size);


I added its reference in C# project from COM components tab.
However in C# function it is defined as


void function(out byte buffer, out uint size);


The dll just writes to buffer some bytes array of specific size.
How can we pass that allocated byte[] array to C# implementation?

????????