My MFC code has a function:
SelectItems(CDWordArray & awTop);
I invoke this thorugh another CPP project, as:
array< unsigned int >^ selectedItems;
DWORD cnt = m_handle->SelectItems(selectedItems);
But i get error
can not convert parameter 1 from 'cli::array<Type>^' to 'CDWordArray &'
A
CDWordArrayisn’t likely to be compatible with a managed array, theCObjectbase class makes it murky. You’ll have to create a new instance of it and copy the array elements. That’s expensive, consider restructuring the code so you can use thepin_ptr<>class. The MSDN HowTo article is here. Don’t cast the pointer you get frompin_ptr<>, that’s not likely to work.