TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
cbachellam
NA
1
0
marshal unsigned cahr pointer
Sep 14 2004 7:10 PM
Hello, I am trying to call c++ dll function calls from C#. The c++ dll function takes in pointer to unsigned char array. Can anybody help me in what marshalling parameter value that i have to declare in C# side. For eg: in c++ X.dll the function is: extern "C" __declspec(dllexport) void Getcharpointer(unsigned char* v) { //Just for test purpose, i alter and check on the C# side whether it persists. This is another thing which i want to do but i cant. v[0] = 'p'; } on the c# side declaration: -------------------------- [DllImport("X.dll",CharSet=CharSet.Auto)] static extern Getcharpointer([MarshalAs( UnmanagedType.LPStr )] System.String IncharPtr) ----- IF i try this syntax, the change doesnt persist in the value of the first index of unsigned char pointer array. Can anybody help me here?.Is this is the right way?. Thanks., Chellam.
Reply
Answers (
0
)
Sorting Hashtable
Convert to C# code from Vb.Net