<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - C# has Sytem.String. C++ (Win32) has TCHAR, LPWSTR, LPCWSTR, PCSTR, etc..etc..etc..</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - C# has Sytem.String. C++ (Win32) has TCHAR, LPWSTR, LPCWSTR, PCSTR, etc..etc..etc..</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Thu, 20 Jun 2013 07:04:07 GMT</pubDate>
	<lastBuildDate>Thu, 20 Jun 2013 07:04:07 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>3</c9:totalResults>
	<c9:pageCount>-3</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - C# has Sytem.String. C++ (Win32) has TCHAR, LPWSTR, LPCWSTR, PCSTR, etc..etc..etc..</title>
		<description><![CDATA[<p>I've been a C# dev for several years...better part of a decade I guess. I'm a systems administrator by trade so rather than building web apps, I mainly use C# to do things that are out of the reach of vbscript. At least that's how it started. Now I have started spending more time with C&#43;&#43; because of an interest in systems level programming.</p><p>Before anyone gets all indignant on me I know that Win32 was developed in C and not C&#43;&#43;. I really don't want to argue about the pedigree of API's or languages.</p><p>&nbsp;</p><p>I guess what I'm wondering is how one gets over the hurdle of dealing with strings in native code and actually gets to a productive place like we are at with C# (or the rest of .Net). I'm really interested in C&#43;&#43; and native programming for the capabilities that it brings...so I guess what I would like is to be able to work with the native platform in a productive way.</p><p>Libraries like poco and boost seem to have some features that simplify something's like&nbsp;filesystem&nbsp; access...but I'm not really interested in portability.&nbsp;</p><p>For instance, Boost has a great recursive directory iterator. (Creatively named recursive_directory_iterator.) But once you have a file path if you want to know anything about it...the ACL applied, if the folder is encrypted via NTFS, or if it's junction/soft link/whatever you have to call Win32. Then starts the &quot;you can't cast a blah to a blah to a pointer of a blahblah&quot;.</p><p>&nbsp;</p><p>Right now I keep butting my head against marshaling different types of strings in and out of Win32. Is there any chance that some of the C&#43;&#43; softies could give us some direction for how to navigate this? I don't really care about UNICODE or ANSI...I realize why there are functions that end with A and W. I'm not going to ship software in China anytime soon. I would need to actually turn out something useful first.</p><p>I need to cut down on the friction here. Can anyone help?</p><p>&nbsp;</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/2106d4dd57cb42b5a144a03400fa4d52#2106d4dd57cb42b5a144a03400fa4d52</link>
		<pubDate>Sun, 15 Apr 2012 15:11:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/2106d4dd57cb42b5a144a03400fa4d52#2106d4dd57cb42b5a144a03400fa4d52</guid>
		<dc:creator>B3NT_0</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/B3NT_0/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - C# has Sytem.String. C++ (Win32) has TCHAR, LPWSTR, LPCWSTR, PCSTR, etc..etc..etc..</title>
		<description><![CDATA[<p>You should be able to find a lot of <a href="http://www.bing.com/search?q=marshal&#43;strings&#43;c%23&#43;c&amp;qs=n&amp;form=QBLH&amp;pq=marshal&#43;strings&#43;c%23&#43;c&amp;sc=0-18&amp;sp=-1&amp;sk=">information on the internet</a> regarding marshaling strings between managed and native code. <a href="http://www.pinvoke.net/">PInvoke.net</a> is another good place to look for general P/Invoke information.</p><p>But I hear you. I also have to do some C/C&#43;&#43; string manipulation after many years of being spoiled by C# and was surprised to realize how difficult (non-obvious/convoluted/verbose)&nbsp;it was to do simple string manipulation.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/7474bff311694ceeba3fa034012571c8#7474bff311694ceeba3fa034012571c8</link>
		<pubDate>Sun, 15 Apr 2012 17:48:23 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/7474bff311694ceeba3fa034012571c8#7474bff311694ceeba3fa034012571c8</guid>
		<dc:creator>BitFlipper</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/BitFlipper/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - C# has Sytem.String. C++ (Win32) has TCHAR, LPWSTR, LPCWSTR, PCSTR, etc..etc..etc..</title>
		<description><![CDATA[<p>Actually in Win32 there is only CHAR* and WCHAR* (ok and BYTE*)- almost everything else is either one of those or some way of saying how to do reference-counting or memory freeing of one of those.</p><p>You can convert between the two via MultibyteToWideChar or WideCharToMultibyte respectively.</p><p>If you're moving strings between C# and C&#43;&#43;, then the &quot;Marshal&quot; class is your friend <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/ef269e2a4ecb4da69742a034017f5218#ef269e2a4ecb4da69742a034017f5218</link>
		<pubDate>Sun, 15 Apr 2012 23:15:37 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/C-has-SytemString-C-Win32-has-TCHAR-LPWSTR-LPCWSTR-PCSTR-etcetcetc/ef269e2a4ecb4da69742a034017f5218#ef269e2a4ecb4da69742a034017f5218</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>