$value =~ s!\0.*!!; # we assume that the first \0 returned indicates end of the string
That is a pretty bad assumption. BSTRs are fixed length arrays of unsigned shorts with a prefix length and can contain multiple nulls.
See http://blogs.msdn.com/b/ericlippert/archive/2003/09/12/52976.aspx
In reply to Re^2: calling a function from a dll
by BrowserUk
in thread calling a function from a dll
by nmeijer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |