Click here to Skip to main content
16,007,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Deleting Locked Files Pin
Christian Graus24-Nov-02 16:02
protectorChristian Graus24-Nov-02 16:02 
GeneralUser folder / file search dialog Pin
Still learning how to code23-Nov-02 22:27
Still learning how to code23-Nov-02 22:27 
GeneralAdvice Required Pin
Shamoon23-Nov-02 19:20
Shamoon23-Nov-02 19:20 
GeneralRe: Advice Required Pin
roboo24-Nov-02 18:11
roboo24-Nov-02 18:11 
GeneralHooks: Global Pin
keravon23-Nov-02 17:00
keravon23-Nov-02 17:00 
Generalfonts Pin
kjessee23-Nov-02 14:19
kjessee23-Nov-02 14:19 
GeneralRe: fonts Pin
kjessee24-Nov-02 16:31
kjessee24-Nov-02 16:31 
Questionchar, wchar, TCHAR, BYTE ??? Pin
Matt Gullett23-Nov-02 14:03
Matt Gullett23-Nov-02 14:03 
I have never had to fully support UNICODE in my code before but I am making an effort to insure that all future code I write will work with it anyway.

I think I understand TCHAR, LPCTSTR, LPTSTR and all the _tcsxxx functions. BUT, I have a questions which I haven't been able to find an adequate answer to.

Many functions and classes use sizes in BYTEs when working with data. Examples include memcmp, memcpy, the _open, _write, _read file support functions, etc.

What is the correct way of working with these functions and UNICODE strings. My first thought is to write a macro or inline function like this:

#define _tcsbytelen(text) (_tcslen(text)*sizeof(TCHAR))


and use this whenever working with functions where BYTE length is needed. Is there a more correct way of doing this that I have overlooked?

Thanks,

Matt Gullett

PS. MFC is not an option and whatever solution I find must work with or without STL too.
AnswerRe: char, wchar, TCHAR, BYTE ??? Pin
Michael Dunn23-Nov-02 15:08
sitebuilderMichael Dunn23-Nov-02 15:08 
GeneralRe: char, wchar, TCHAR, BYTE ??? Pin
Matt Gullett23-Nov-02 15:29
Matt Gullett23-Nov-02 15:29 
GeneralRe: char, wchar, TCHAR, BYTE ??? Pin
Michael Dunn23-Nov-02 18:18
sitebuilderMichael Dunn23-Nov-02 18:18 
AnswerRe: char, wchar, TCHAR, BYTE ??? Pin
includeh1024-Nov-02 6:23
includeh1024-Nov-02 6:23 
GeneralQuestion about float format Pin
rsasalm_23-Nov-02 10:21
rsasalm_23-Nov-02 10:21 
GeneralRe: Question about float format Pin
Chris Losinger23-Nov-02 10:37
professionalChris Losinger23-Nov-02 10:37 
GeneralRe: Question about float format Pin
Michael Dunn23-Nov-02 15:10
sitebuilderMichael Dunn23-Nov-02 15:10 
QuestionSMTP Gateway ?? Pin
Muslima23-Nov-02 8:54
Muslima23-Nov-02 8:54 
Generalto owner of the site, in the 3 monthes .... Pin
includeh1023-Nov-02 8:47
includeh1023-Nov-02 8:47 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Chris Losinger23-Nov-02 9:58
professionalChris Losinger23-Nov-02 9:58 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Michael P Butler23-Nov-02 10:37
Michael P Butler23-Nov-02 10:37 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
kjessee23-Nov-02 11:29
kjessee23-Nov-02 11:29 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Christian Graus23-Nov-02 21:35
protectorChristian Graus23-Nov-02 21:35 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Stephane Rodriguez.24-Nov-02 6:08
Stephane Rodriguez.24-Nov-02 6:08 
GeneralRe: to owner of the site, in the 3 monthes .... Pin
Christian Graus24-Nov-02 15:13
protectorChristian Graus24-Nov-02 15:13 
GeneralBMP -> JPG, once more - no mfc. Pin
int01h23-Nov-02 8:46
int01h23-Nov-02 8:46 
GeneralRe: BMP -> JPG, once more - no mfc. Pin
Chris Losinger23-Nov-02 9:57
professionalChris Losinger23-Nov-02 9:57 

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.