<?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>Code Library &#187; network</title>
	<atom:link href="http://www.ucosoft.com/tag/network/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ucosoft.com</link>
	<description>Free Source Code and Program Tips</description>
	<lastBuildDate>Mon, 19 Jul 2010 04:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to Get the Primary Domain name</title>
		<link>http://www.ucosoft.com/how-to-get-the-primary-domain-name.html</link>
		<comments>http://www.ucosoft.com/how-to-get-the-primary-domain-name.html#comments</comments>
		<pubDate>Wed, 03 Jan 2007 11:28:37 +0000</pubDate>
		<dc:creator>support</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ucosoft.com/archives/69.html</guid>
		<description><![CDATA[In gina, the system will list the domain name of the current system. How to get the primary domain name in your program? From the released the Windows2000 and NT source code, you can get the code of gina. It locate on \win2k\private\windows\gina\winlogon\usrpro.c. Here is the code: DWORD rc; PWSTR PrimaryDomain; rc = NetGetJoinInformation (]]></description>
			<content:encoded><![CDATA[<p><P><br />
In gina, the system will list the domain name of the current system. How to get the primary domain name in your program?</p>
<p>From the released the Windows2000 and NT source code, you can get the code of gina. It locate on <strong>\win2k\private\windows\gina\winlogon\usrpro.c</strong>.</p>
<p>Here is the code:</p>
<p><span id="more-69"></span><br />
<coolcode lang="cpp" linenum="no"><br />
DWORD rc;<br />
PWSTR PrimaryDomain;</p>
<p>rc = NetGetJoinInformation (<br />
     NULL,<br />
     &#038;PrimaryDomain,<br />
     &#038;Type<br />
     );</p>
<p>if (rc != ERROR_SUCCESS)<br />
{<br />
    PrimaryDomain = NULL;<br />
}<br />
else<br />
{<br />
    wprintf(TEXT(&#8220;PrimaryDomain : %s\n&#8221;),PrimaryDomain);<br />
}<br />
</coolcode></p>

	Tags: <strong><a href="http://www.ucosoft.com/tag/api" title="API" rel="tag">API</a>, <a href="http://www.ucosoft.com/tag/how-to" title="How-to" rel="tag">How-to</a>, <a href="http://www.ucosoft.com/tag/network" title="network" rel="tag">network</a>, <a href="http://www.ucosoft.com/tag/tips" title="Tips" rel="tag">Tips</a></strong><br />

	<ul class="st-related-posts">
	<li><a href="http://www.ucosoft.com/write-and-read-binary-data-in-variant.html" title="Write and read binary data in VARIANT (November 22, 2006)">Write and read binary data in VARIANT</a> (0)</li>
	<li><a href="http://www.ucosoft.com/the-simplest-way-to-change-the-row-height-of-clistctrl.html" title="The Simplest way to change the row height of CListCtrl (January 14, 2008)">The Simplest way to change the row height of CListCtrl</a> (0)</li>
	<li><a href="http://www.ucosoft.com/speed-up-loading-of-pages.html" title="Speed up loading of pages (November 21, 2006)">Speed up loading of pages</a> (1)</li>
	<li><a href="http://www.ucosoft.com/some-useful-shortcut-of-visual-studio-6.html" title="Some useful shortcut of Visual Studio 6 (November 30, 2006)">Some useful shortcut of Visual Studio 6</a> (0)</li>
	<li><a href="http://www.ucosoft.com/visual-sourcesafe-microsofts-source-destruction-system.html" title="Some comment about Visual SourceSafe (November 21, 2006)">Some comment about Visual SourceSafe</a> (0)</li>
	<li><a href="http://www.ucosoft.com/solution-of-fatal-error-rc1004-unexpected-end-of-file-found.html" title="Solution of fatal error RC1004: unexpected end of file found (November 6, 2007)">Solution of fatal error RC1004: unexpected end of file found</a> (11)</li>
	<li><a href="http://www.ucosoft.com/setup-scim-in-ubuntu-610.html" title="Setup SCIM in Ubuntu 6.10 (December 11, 2006)">Setup SCIM in Ubuntu 6.10</a> (0)</li>
	<li><a href="http://www.ucosoft.com/set-the-head-backgroud-color-of-cpropertypage.html" title="Set the head backgroud color of CPropertyPage (October 18, 2007)">Set the head backgroud color of CPropertyPage</a> (0)</li>
	<li><a href="http://www.ucosoft.com/65.html" title="MessageBox support Ctrl+C to copy content (January 1, 2007)">MessageBox support Ctrl+C to copy content</a> (0)</li>
	<li><a href="http://www.ucosoft.com/make-the-code-completion-working-again-in-vc-60.html" title="Make the Code Completion working again in VC++ 6.0 (December 6, 2006)">Make the Code Completion working again in VC++ 6.0</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ucosoft.com/how-to-get-the-primary-domain-name.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
