CString to BYTE* conversion

  • Thread starter Thread starter Igor Natachanny
  • Start date Start date
I

Igor Natachanny

Wich way I can to take the BYTE*-pointer to a string of characters that
contain
into CString-object?
 
Wich way I can to take the BYTE*-pointer to a string of characters that
contain
into CString-object?

Igor,

Are you looking for the CString methods: GetBuffer & ReleaseBuffer?

Dave
 
I'm looking for any method that can to receive a CString object as parametr
and
return a pointer of BYTE* type to the character string that are contained
into the
CString object.

As I said, have a look at GetBuffer & ReleaseBuffer.

Dave
 
I'm looking for any method that can to receive a CString object as parametr
and
return a pointer of BYTE* type to the character string that are contained
into the
CString object.
 
Thanks but it isn't help me. GetString metod is the solution. Thanks
 
Thanks but it isn't help me. GetString metod is the solution. Thanks

Are you sure?

You wanted a BYTE * (I presumed you wanted a buffer you could change).
Note that GetString returns a const pointer, and the documentation
says:

"The returned PCXSTR pointer is const and does not allow direct
modification of CSimpleStringT contents"

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top