How do I marshal a LPWSTR argument? I need to read the string value after
calling the function. Should I use ref or out?
Something like:
static extern void Function([MarshalAs(UnmanagedType.LPWStr)] ref string
lpwVal);
??
Thanks,
Robert
Luis Abreu - 04 Oct 2004 20:44 GMT
I think that if you're going to need String Builder here...
---
Regards,
Luis Abreu
http://weblogs.pontonetpt.com/luisabreu
http://www.pontonetpt.com
> How do I marshal a LPWSTR argument? I need to read the string value after
> calling the function. Should I use ref or out?
[quoted text clipped - 7 lines]
> Thanks,
> Robert
Robert Misiak - 04 Oct 2004 20:56 GMT
Yes, StringBuilder worked, thanks!
Robert
>I think that if you're going to need String Builder here...
>
[quoted text clipped - 16 lines]
>> Thanks,
>> Robert
Luis Abreu - 04 Oct 2004 20:45 GMT
I think that you'll need to use StringBuilder here...

Signature
---
Regards,
Luis Abreu
http://weblogs.pontonetpt.com/luisabreu
http://www.pontonetpt.com
> How do I marshal a LPWSTR argument? I need to read the string value after
> calling the function. Should I use ref or out?
[quoted text clipped - 7 lines]
> Thanks,
> Robert
Luis Abreu - 04 Oct 2004 21:06 GMT
oops..sorry, I thought that I hadn't sent it the 1st time...

Signature
---
Regards,
Luis Abreu
http://weblogs.pontonetpt.com/luisabreu
http://www.pontonetpt.com
> I think that you'll need to use StringBuilder here...
>
[quoted text clipped - 9 lines]
> > Thanks,
> > Robert