is this a perfectly null terminated string?
Code:TCHAR* g_strFrameStats = _T("Hello\0");
Printable View
is this a perfectly null terminated string?
Code:TCHAR* g_strFrameStats = _T("Hello\0");
Ohhh...yeah it was....sorry, but I found out that it was an other thing causing the error..
ØØ
I'm pretty sure that when you use a string literal like that, most compilers will add a null terminator for you.
OK...I didn't know that. But I found a DX example that actualy used the same method as I did with the \0 at the end. So it is working now. But thanks anyway.Quote:
Originally posted by sunburnt
I'm pretty sure that when you use a string literal like that, most compilers will add a null terminator for you.
ØØ
All compilers add the \0, it's required. Why you have in your literal is a double-\0 terminated string. In some places in the API you need those.
The doc said I only needed a null terminated string as a parameter. So I guess I don't need a double. I can test it out later on today. I am sitting onthe wrong PC at the moment. And we have to rewrite most of the code anyway, becuase we overlooked a one of D3D internaly critical sections. So we have to rearagne the work of the two threads.
But I will give you guys a comment on it when I have tested it.
ØØ