<?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>Thu, 22 Jul 2010 05:17:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</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 />
]]></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>

