Is there any way to format and print an UNICODE string in which there are some zero byte?
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
:confused:i write follow code: WCHAR cnt[100] = L"abc"; WCHAR* p = cnt; wcscpy(p + 50, L"def"); i want print out "abc............def.....",but only get "abc"; "def" was lost. someone may help me to resolve this problem?
hi BSTR is capable of storing zero byte..
BSTR bs = ::SysAllocString(L"abc\0def" );
is valid. i donno whether it will b a turning point for ur requirment.... try .. for printing and all, i dont think it is possible... unless u write ur own custom printf or wsprintf. rgds...mil10. -
:confused:i write follow code: WCHAR cnt[100] = L"abc"; WCHAR* p = cnt; wcscpy(p + 50, L"def"); i want print out "abc............def.....",but only get "abc"; "def" was lost. someone may help me to resolve this problem?