Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2005

Tip: Looking for answers? Try searching our database.

CString to BYTE* conversion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Igor Natachanny - 04 Sep 2005 16:09 GMT
Wich way I can to take the BYTE*-pointer to a string of characters  that
contain
into CString-object?
David Lowndes - 04 Sep 2005 22:50 GMT
>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
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq

Igor Natachanny - 05 Sep 2005 09:12 GMT
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.

> >Wich way I can to take the BYTE*-pointer to a string of characters  that
>>contain
[quoted text clipped - 5 lines]
>
> Dave
David Lowndes - 05 Sep 2005 09:35 GMT
>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
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq

Igor Natachanny - 05 Sep 2005 12:08 GMT
Thanks but it isn't help me. GetString metod  is the solution. Thanks

> >I'm looking for any method that can to receive a CString object as
> >parametr
[quoted text clipped - 6 lines]
>
> Dave
David Lowndes - 05 Sep 2005 14:16 GMT
>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
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.