Click here to Skip to main content
15,921,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generala quastion Pin
24-Jul-01 3:45
suss24-Jul-01 3:45 
GeneralRe: a quastion Pin
Tomasz Sowinski24-Jul-01 3:52
Tomasz Sowinski24-Jul-01 3:52 
GeneralMaking A CFont Go Bold Pin
AJ12324-Jul-01 3:26
AJ12324-Jul-01 3:26 
GeneralRe: Making A CFont Go Bold Pin
Tomasz Sowinski24-Jul-01 3:40
Tomasz Sowinski24-Jul-01 3:40 
GeneralRe: Making A CFont Go Bold Pin
AJ12324-Jul-01 6:00
AJ12324-Jul-01 6:00 
GeneralRe: Making A CFont Go Bold Pin
fantastic_mr_fox24-Jul-01 6:26
fantastic_mr_fox24-Jul-01 6:26 
GeneralSQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:11
Derek Price24-Jul-01 3:11 
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 3:22
sitebuilderMichael Dunn24-Jul-01 3:22 
I would like to create a format string like "DSN=%s\0DatabaseName=%s\0DatabaseFile=%s\0"

This doesn't work because the first \0 is interpreted as the end of the format string. AFAIK neither the C string APIs nor CString support embedded null characters. BSTRs do support them, but working with plain BSTRs is a hassle, and CComBSTR doesn't handle embedded nulls well.

What I usually do is use some other unique separator like '|' when building the string, then loop thru the string and replace '|' with '\0'.

--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
  -- Chris Maunder
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:35
Derek Price24-Jul-01 3:35 
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 3:42
sitebuilderMichael Dunn24-Jul-01 3:42 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:46
Derek Price24-Jul-01 3:46 
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 4:02
sitebuilderMichael Dunn24-Jul-01 4:02 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 4:35
Derek Price24-Jul-01 4:35 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 4:33
Derek Price24-Jul-01 4:33 
GeneralRe: SQLConfigDataSource() & string problem Pin
Mike Burston24-Jul-01 13:04
Mike Burston24-Jul-01 13:04 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price25-Jul-01 6:44
Derek Price25-Jul-01 6:44 
GeneralRe: SQLConfigDataSource() & string problem Pin
Carlos Antollini25-Jul-01 7:02
Carlos Antollini25-Jul-01 7:02 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price25-Jul-01 7:08
Derek Price25-Jul-01 7:08 
GeneralA RichEdit poblem... Pin
24-Jul-01 2:59
suss24-Jul-01 2:59 
GeneralRe: A RichEdit poblem... Pin
Ernest Laurentin24-Jul-01 3:24
Ernest Laurentin24-Jul-01 3:24 
GeneralThanks a lot!... Pin
24-Jul-01 3:42
suss24-Jul-01 3:42 
GeneralGetting Mouse Position Pin
24-Jul-01 2:56
suss24-Jul-01 2:56 
GeneralRe: Getting Mouse Position Pin
Tomasz Sowinski24-Jul-01 3:07
Tomasz Sowinski24-Jul-01 3:07 
GeneralRe: Getting Mouse Position Pin
29-Aug-01 12:44
suss29-Aug-01 12:44 
QuestionWM_CREATE ? Pin
24-Jul-01 2:48
suss24-Jul-01 2:48 

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.