<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Visual C++ Tips &#187; COM</title>
	<atom:link href="http://weseetips.com/category/com/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to generate GUID Programmatically?</title>
		<link>http://weseetips.com/2008/07/20/how-to-generate-guid-programmatically/</link>
		<comments>http://weseetips.com/2008/07/20/how-to-generate-guid-programmatically/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 15:52:10 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[COM]]></category>
		<category><![CDATA[CoCreateGuid()]]></category>
		<category><![CDATA[CoInitialize()]]></category>
		<category><![CDATA[CoUninitialize()]]></category>
		<category><![CDATA[guid]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=248</guid>
		<description><![CDATA[Guids are like humans&#8230; because are unique. In several instance we have to generate unique strings or ids and Guids are perfect match for those situations. Well, how can you generate guid programmatically? You can use the function &#8211; CoCreateGuid(). See the code snippet below. // Initialize COM. ::CoInitialize( 0 ); // Generate GUID. GUID [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
<span style="color:#0000ff;">Guids are like humans&#8230; because are unique.</span> <img src='http://weseetips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  In several instance we have to generate unique strings or ids and<span style="color:#0000ff;"> Guids are perfect match</span> for those situations. Well, how can you generate guid programmatically?</p>
<p><img class="alignnone size-medium wp-image-12" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
You can use the function &#8211; <span style="color:#0000ff;">CoCreateGuid()</span>. See the code snippet below.</p>
<pre>// Initialize COM.
::CoInitialize( 0 );

// Generate GUID.
GUID Guid = { 0 };
::CoCreateGuid( &amp;Guid );</pre>
<p><img class="alignnone size-medium wp-image-18" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Well, don&#8217;t forget to uninitialize COM by calling <span style="color:#0000ff;">CoUninitialize()</span>.</p>
<p><img class="alignnone size-medium wp-image-51" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/07/20/how-to-generate-guid-programmatically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

