<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Windows Perl Scripting Forums &#187; Topic: Win32::Perms::ResolveSid</title>
<link>http://www.roth.net/forums/</link>
<description>Windows Perl Scripting Forums &#187; Topic: Win32::Perms::ResolveSid</description>
<language>en</language>
<pubDate>Wed, 22 May 2013 14:54:26 +0000</pubDate>

<item>
<title>Anonymous on "Win32::Perms::ResolveSid"</title>
<link>http://www.roth.net/forums/topic.php?id=278#post-590</link>
<pubDate>Wed, 01 Jul 2009 00:14:09 +0000</pubDate>
<dc:creator>Anonymous</dc:creator>
<guid isPermaLink="false">590@http://www.roth.net/forums/</guid>
<description>&#60;p&#62;Always fails with error code 0x000003e5 (Overlapped I/O operation is in progress).
&#60;/p&#62;</description>
</item>
<item>
<title>Anonymous on "Win32::Perms::ResolveSid"</title>
<link>http://www.roth.net/forums/topic.php?id=278#post-589</link>
<pubDate>Tue, 30 Jun 2009 11:45:05 +0000</pubDate>
<dc:creator>Anonymous</dc:creator>
<guid isPermaLink="false">589@http://www.roth.net/forums/</guid>
<description>&#60;p&#62;I have script form Chapter 11 of Win32 Perl Programming, by David Roth. There is always error in line 09 .&#60;br /&#62;
I change var $Account so:&#60;br /&#62;
$Account ='\\\\$machine\\$user';&#60;br /&#62;
$Account ='$domain\\$user';&#60;br /&#62;
$Account ='$user';&#60;br /&#62;
No effect. There is always error in line 09 .&#60;br /&#62;
Where is my mistake?&#60;/p&#62;
&#60;p&#62;01. use Win32::Perms;&#60;br /&#62;
02. my $Domain = Win32::DomainName();&#60;br /&#62;
03. my $User = Win32::LoginName();&#60;br /&#62;
04. my $Account = sprintf( &#34;%s%s&#34;, ( &#34;&#34; ne $Domain )?&#60;br /&#62;
&#34;$Domain\\&#34;:&#34;&#34;, $User );&#60;br /&#62;
05. my %Sid = (&#60;br /&#62;
06.  text  =&#38;gt; &#34;&#34;,&#60;br /&#62;
07.  binary =&#38;gt; &#34;&#34;&#60;br /&#62;
08. );&#60;br /&#62;
09. if( $Sid{text} = Win32::Perms::ResolveSid( $Account, $Sid{binary} ) )&#60;br /&#62;
10. {&#60;br /&#62;
11.  print &#34;You are logged in as $Account.\n&#34;;&#60;br /&#62;
12.  print &#34;Your SID is: $Sid{text}\n&#34;;&#60;br /&#62;
13.  print &#34;Your binary SID is: '$Sid{binary}'\n&#34;;&#60;br /&#62;
14. }&#60;br /&#62;
15. else&#60;br /&#62;
16. {&#60;br /&#62;
17.  print &#34;\tCouldn't lookup the SID for $Domain\\$User: $^E\n&#34;;&#60;br /&#62;
18. }
&#60;/p&#62;</description>
</item>

</channel>
</rss>
