471,348 Members | 1,339 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

Re: MarshallAs for char* buffer

Try this....
>
[DllImport("mydll.dll", CharSet = CharSet.Ansi)]
public static extern int getData(StringBuilder result, ref long bufflen);

StringBuilder result = new StringBuilder(500);
int resultLen = 500;
getData(result, ref resultLen);
Thanks a lot. That worked.
Aug 27 '08 #1
0 814

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Axel | last post: by
8 posts views Thread by Ekim | last post: by
5 posts views Thread by Roy Hills | last post: by
12 posts views Thread by Lars Langer | last post: by
3 posts views Thread by fernandez.dan | last post: by
3 posts views Thread by gordy | last post: by
2 posts views Thread by esanchezfo | last post: by
18 posts views Thread by Pedro Pinto | last post: by
1 post views Thread by jacekbaz | last post: by
1 post views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.