Displaying 2 results from an estimated 2 matches for "_tcslen".
2007 Aug 31
0
[ win32utils-Bugs-13560 ] Service dependencies has wierd string.
...cies(LPTSTR lpDependencies){
VALUE v_dependencies = rb_ary_new();
if(lpDependencies){
TCHAR* pszDepend = 0;
int i = 0;
pszDepend = &lpDependencies[i];
while(*pszDepend != 0){
rb_ary_push(v_dependencies, rb_str_new2(pszDepend));
//i += _tcslen(lpDependencies) + 1; <-- Original code
i += _tcslen(&(lpDependencies[i])) + 1; // <-- Modified code
pszDepend = &lpDependencies[i];
}
}
if(RARRAY(v_dependencies)->len == 0)
v_dependencies = Qnil;
return v_dependencies;
}
The modif...
2006 Feb 02
5
Fwd: win32-clipboard and Unicode zero bytes
Hi all,
I''m forwarding this message from Brian Marick. If you
run this test script and then paste the results into a
Unicode aware text editor, you''ll notice that it only
prints one character instead of three.
I tried changing the strlen to _tcslen and strcpy to
_tcscpy, but that didn''t help. I mucked around a bit
with the MultiByteToWideChar function, too, but didn''t
have any luck.
Any ideas?
Thanks,
Dan
# test.rb
$:.unshift Dir.pwd
require ''clipboard''
def unicopy(hex_name_array)
Win32::Clipboard....