Click here to Skip to main content
15,907,396 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDate greater than 2038 Pin
s@tish21-Nov-08 1:15
s@tish21-Nov-08 1:15 
AnswerRe: Date greater than 2038 Pin
Nibu babu thomas21-Nov-08 1:24
Nibu babu thomas21-Nov-08 1:24 
AnswerRe: Date greater than 2038 Pin
_AnsHUMAN_ 21-Nov-08 1:24
_AnsHUMAN_ 21-Nov-08 1:24 
QuestionLPBYTE to CString Pin
cpvc++21-Nov-08 1:12
cpvc++21-Nov-08 1:12 
AnswerRe: LPBYTE to CString Pin
Nibu babu thomas21-Nov-08 1:27
Nibu babu thomas21-Nov-08 1:27 
GeneralRe: LPBYTE to CString Pin
cpvc++21-Nov-08 1:29
cpvc++21-Nov-08 1:29 
GeneralRe: LPBYTE to CString Pin
David Crow21-Nov-08 3:02
David Crow21-Nov-08 3:02 
GeneralRe: LPBYTE to CString Pin
Rajasekharan Vengalil21-Nov-08 5:43
Rajasekharan Vengalil21-Nov-08 5:43 
The key thing to note here is the following qualifier:

Nibu babu thomas wrote:
If you are sure that LPBYTE contains a valid TCHAR* null terminated string...


If you aren't absolutely sure about this then you could be in trouble. As a general principle, when you're serializing to and deserializing from a byte stream, it may be better to stick to a "char" or a "wchar_t" instead of "TCHAR" and then do the appropriate conversions. That's assuming you have complete control over the data stream (i.e. only your program writes to and loads from the data store). If you are implementing this on a web server extension for instance, or if you are loading the string from a file that can potentially be created and edited by other programs then you'll want to worry about text encoding and byte order marks.

--
gleat
http://blogorama.nerdworks.in[^]
--

Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG


QuestionIn a dll, exception handling works in Debug but not in Release Pin
sashoalm21-Nov-08 1:09
sashoalm21-Nov-08 1:09 
AnswerRe: In a dll, exception handling works in Debug but not in Release Pin
_AnsHUMAN_ 21-Nov-08 1:15
_AnsHUMAN_ 21-Nov-08 1:15 
AnswerRe: In a dll, exception handling works in Debug but not in Release Pin
Randor 21-Nov-08 5:26
professional Randor 21-Nov-08 5:26 
QuestionUsing wxWidgets.... Pin
anna mathew20-Nov-08 23:40
anna mathew20-Nov-08 23:40 
AnswerRe: Using wxWidgets.... Pin
Cedric Moonen21-Nov-08 0:11
Cedric Moonen21-Nov-08 0:11 
GeneralRe: Using wxWidgets.... Pin
JudyL_MD21-Nov-08 3:48
JudyL_MD21-Nov-08 3:48 
QuestionEasy questions about C++ [modified] Pin
akirilov20-Nov-08 23:34
akirilov20-Nov-08 23:34 
AnswerRe: Easy questions about C++ Pin
Cedric Moonen20-Nov-08 23:58
Cedric Moonen20-Nov-08 23:58 
GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 0:16
akirilov21-Nov-08 0:16 
GeneralRe: Easy questions about C++ Pin
Maximilien21-Nov-08 0:43
Maximilien21-Nov-08 0:43 
GeneralRe: Easy questions about C++ Pin
Cedric Moonen21-Nov-08 1:04
Cedric Moonen21-Nov-08 1:04 
AnswerRe: Easy questions about C++ Pin
Code-o-mat21-Nov-08 0:06
Code-o-mat21-Nov-08 0:06 
GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 0:22
akirilov21-Nov-08 0:22 
GeneralRe: Easy questions about C++ [modified] Pin
Code-o-mat21-Nov-08 0:29
Code-o-mat21-Nov-08 0:29 
GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 4:17
akirilov21-Nov-08 4:17 
GeneralRe: Easy questions about C++ Pin
Code-o-mat21-Nov-08 6:23
Code-o-mat21-Nov-08 6:23 
GeneralRe: Easy questions about C++ Pin
bulg21-Nov-08 12:59
bulg21-Nov-08 12:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.