int arrays between C# and C++

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I transport int arrays between C# and C++ so that an int array
created in C# will be filled with contents in the C++ dll and so that this
content is accessible in the C# dll again.
 
I am assuming by C++ you mean unmanaged C++ dll. Without the signature of
the C++ dll function, I cannot tell you a definitive answer but you can try
applying

[MArshalAs(UnmanagedType.ByValTArray,SizeConst=number of elements in array)]

attribute to your parameter/return type.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top