Re: SetString



Hans-Peter Diettrich wrote:
J French wrote:
D4 does automatic conversion it creates a new WideString up to the
position of the first #0#0

Unfortunately I need an substring, not everything up to the end :-(

If you don't have SetString, you can also call the SysAllocStringLen API function. It returns a BStr, which is really a WideString. I'm not sure the return type is declared correctly in Windows.pas, though, so you might need some creative type-casting, or just redeclare the function.

--
Rob
.