Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Theory question about "void pBuffer" Pin
led mike9-Oct-07 5:00
led mike9-Oct-07 5:00 
QuestionRe: Theory question about "void pBuffer" Pin
Nelek10-Oct-07 0:27
protectorNelek10-Oct-07 0:27 
AnswerRe: Theory question about "void pBuffer" Pin
led mike10-Oct-07 4:46
led mike10-Oct-07 4:46 
GeneralRe: Theory question about void pBuffer Pin
Nelek10-Oct-07 20:45
protectorNelek10-Oct-07 20:45 
GeneralRe: Theory question about void pBuffer Pin
led mike11-Oct-07 4:59
led mike11-Oct-07 4:59 
GeneralRe: Theory question about void pBuffer Pin
Nelek12-Oct-07 1:59
protectorNelek12-Oct-07 1:59 
AnswerRe: Theory question about "void pBuffer" Pin
Bram van Kampen9-Oct-07 15:31
Bram van Kampen9-Oct-07 15:31 
GeneralRe: Theory question about "void pBuffer" Pin
Nelek9-Oct-07 22:14
protectorNelek9-Oct-07 22:14 
Thanks for such a good explanation.

So szValue = pBuffer works fine because the adress of pBuffer is actually being asigned to that intern buffer of the CString, and the rest of the information is find out internally (i.e. the length of the string is determined with the "\0"), but...

&Array[0] = pBuffer can not be made because, although the type of data is the same and both will point to the same place, the Array has a fixed length due to the allocation or the creation with [M], and the pointer can not really determine how many place is needed...

But pBuffer = &Array [0] works fine because when the pBuffer is used in other place, the most of the functions that use a buffer need a parameter "sizeof (...)" to determine the needed length of the data field. I.e. the &nLength by using RegQueryEx (..), or file->Write ( pBuffer, (n * sizeof (BYTE)) )
or sizeof (Object);


Is that correct?

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

QuestionMCI -> set video position at a specific time Pin
sdancer759-Oct-07 4:36
sdancer759-Oct-07 4:36 
AnswerRe: MCI -> set video position at a specific time Pin
Hamid_RT9-Oct-07 9:46
Hamid_RT9-Oct-07 9:46 
QuestionRe: MCI -> set video position at a specific time Pin
sdancer7510-Oct-07 0:39
sdancer7510-Oct-07 0:39 
AnswerRe: MCI -> set video position at a specific time Pin
Hamid_RT10-Oct-07 7:09
Hamid_RT10-Oct-07 7:09 
GeneralRe: MCI -> set video position at a specific time Pin
sdancer7510-Oct-07 20:00
sdancer7510-Oct-07 20:00 
GeneralRe: MCI -> set video position at a specific time Pin
Hamid_RT10-Oct-07 21:32
Hamid_RT10-Oct-07 21:32 
QuestionMultiline textout Pin
vSteve9-Oct-07 3:44
vSteve9-Oct-07 3:44 
AnswerRe: Multiline textout Pin
Chris Losinger9-Oct-07 3:51
professionalChris Losinger9-Oct-07 3:51 
GeneralRe: Multiline textout Pin
vSteve9-Oct-07 4:20
vSteve9-Oct-07 4:20 
GeneralRe: Multiline textout Pin
led mike9-Oct-07 5:02
led mike9-Oct-07 5:02 
QuestionBuffer Overrun Pin
LCI9-Oct-07 2:33
LCI9-Oct-07 2:33 
AnswerRe: Buffer Overrun Pin
David Crow9-Oct-07 2:51
David Crow9-Oct-07 2:51 
AnswerRe: Buffer Overrun Pin
Stephen Hewitt9-Oct-07 12:29
Stephen Hewitt9-Oct-07 12:29 
QuestionDirectX - Generall Question Pin
GermanGeorge9-Oct-07 2:05
GermanGeorge9-Oct-07 2:05 
AnswerRe: DirectX - Generall Question Pin
El Corazon9-Oct-07 15:17
El Corazon9-Oct-07 15:17 
GeneralRe: DirectX - Generall Question Pin
GermanGeorge9-Oct-07 20:37
GermanGeorge9-Oct-07 20:37 
GeneralRe: DirectX - Generall Question Pin
El Corazon10-Oct-07 4:04
El Corazon10-Oct-07 4:04 

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.