When I try writing a C++ function my unmanaged C++ class which returns a char[], I get a compiler error C3409 empty attribute block is not allowed. Am I doing something wrong?
I also have a C++ library (without managed extensions). A function returns a char*. I want to call this function from C#. How can I access the char*?
I tried to use byte[] or char[] but I am having a problem because
as soon as I call my C++ function, I get an exception thrown with a message "Cannot marshal return value".
Here is the code that calls C++ function
byte[] charAr = new byte[41];
charAr = Region.RegionMgr_GetStateAbbrev(80);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.