<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to convert CString to char* or LPTSTR?</title>
	<atom:link href="http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Wed, 14 Mar 2012 05:55:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Jijo.Raj</title>
		<link>http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/comment-page-1/#comment-239</link>
		<dc:creator>Jijo.Raj</dc:creator>
		<pubDate>Sat, 28 Feb 2009 08:28:24 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.com/?p=738#comment-239</guid>
		<description>Hello Saleem,

Try using MultiByteToWideChar(). This link - &lt;a href=&quot;http://support.microsoft.com/default.aspx/kb/138813&quot; rel=&quot;nofollow&quot;&gt; will help you.

Regards,
Jijo.</description>
		<content:encoded><![CDATA[<p>Hello Saleem,</p>
<p>Try using MultiByteToWideChar(). This link &#8211; <a href="http://support.microsoft.com/default.aspx/kb/138813" rel="nofollow"> will help you.</p>
<p>Regards,<br />
Jijo.</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saleem</title>
		<link>http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/comment-page-1/#comment-238</link>
		<dc:creator>Saleem</dc:creator>
		<pubDate>Sat, 28 Feb 2009 08:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.com/?p=738#comment-238</guid>
		<description>Hi,,
I need this info.

I am using this code,
int length = data.GetLength(); // data is CString
USES_CONVERSION;
wchar_t *pwcharMessageBody = T2W(data.GetBuffer()); //stack overflow,This line // fails for large string
data.ReleaseBuffer();

This is working for most cases. But not working for very large string size.

Any help will be great.

Thanks,
Saleem</description>
		<content:encoded><![CDATA[<p>Hi,,<br />
I need this info.</p>
<p>I am using this code,<br />
int length = data.GetLength(); // data is CString<br />
USES_CONVERSION;<br />
wchar_t *pwcharMessageBody = T2W(data.GetBuffer()); //stack overflow,This line // fails for large string<br />
data.ReleaseBuffer();</p>
<p>This is working for most cases. But not working for very large string size.</p>
<p>Any help will be great.</p>
<p>Thanks,<br />
Saleem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jijo.Raj</title>
		<link>http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/comment-page-1/#comment-237</link>
		<dc:creator>Jijo.Raj</dc:creator>
		<pubDate>Thu, 18 Dec 2008 06:51:47 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.com/?p=738#comment-237</guid>
		<description>Well, ViT, the c_str() function is for std::string not for CString.

Regards,
Jijo.</description>
		<content:encoded><![CDATA[<p>Well, ViT, the c_str() function is for std::string not for CString.</p>
<p>Regards,<br />
Jijo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ViT</title>
		<link>http://weseetips.com/2008/12/17/how-to-convert-cstring-to-char-or-lptstr/comment-page-1/#comment-236</link>
		<dc:creator>ViT</dc:creator>
		<pubDate>Thu, 18 Dec 2008 05:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://weseetips.com/?p=738#comment-236</guid>
		<description>You also can use
&lt;code&gt; ...
char * pString =  String.c_str();
...
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>You also can use<br />
<code> ...<br />
char * pString =  String.c_str();<br />
...<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

