Re: EuCOM : Attn Matt : String Return Value
- Posted by jacques deschĂȘnes <desja at gl?betro?ter.net> Oct 07, 2007
- 724 views
jacques deschĂȘnes wrote: > > Matt Lewis wrote: > > > > Bernie Ryan wrote: > > > > > > Matt Lewis wrote: > > > > > > > > > > > > Again, I can't explain the behavior... > > > > > > > > > > Matt: > > > > > > I'am confused by your alloc_bstr() in unicode.ew file > > > Here you call the ansi_to_unicode() and in that function you > > > add two extra bytes then when you peek you ignore them > > > and return just the string in a sequence. > > > > Yeah, all I'm concerned about is the actual data, not the null terminator. > > > > > str = ansi_to_unicode( str ) & 0 > > > > > > But on the return of the unicode sequence you are just appending > > > a single NULL. > > > > Yeah, there should probably be two nulls appended (that's what you're > > asking, right?). I'm not sure why I didn't do that. It's never been > > a problem, though. > > > > Matt > > No Its OK like that as the string is ansi. The unicode string returned by the > function must have 2 zero. > > Jacques d. NO. I'M WRONG the zero is appended to result not the argument. It's time for some sleep. Jacques d.