﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <description><![CDATA[Comments for How to detect if the current user is logged in administrator.]]></description>
    <title><![CDATA[Comments for How to detect if the current user is logged in administrator.]]></title>
    <link>http://dn.codegear.com/article/26752</link>
    <!-- source: http://dn.codegear.com/article/26752/feed-->
    <dc:date>2008-11-19T07:53:14-08:00</dc:date>
    <item>
      <description><![CDATA[The logic for the GetTokenInformation call is not correct. It does not work if the user is only in the local Administrators group. You need to get the buffer size rather than allocating a fixed 1024 bytes:  { Call the method one time using a nil reference in order to    determine the buffer size that is required. }  GetTokenInformation( hAccessToken,                       TokenGroups,                       nil,                       0,                       dwTokenInfoBufferSize );  { Allocate the memory necessary to receive the buffer. }  GetMem(ptgGroups, dwTokenInfoBufferSize);  { Call the method a second time using the buffer size that was    returned by the first call. }  fGotTokenInfo := GetTokenInformation( hAccessToken,                                        TokenGroups,                                        ptgGroups,                                        dwTokenInfoBufferSize,                                        dwTokenInfoBufferSize );  CloseHandle( hAccessToken );]]></description>
      <title><![CDATA[How to detect if the current user is logged in administrator.]]></title>
      <managingEditor>
	 (William Randlett)
</managingEditor>
      <guid isPermaLink="true">http://threads.codegear.com/threads/threads.exe/view?commentid=39248</guid>
      <dc:date>2006-07-19T09:19:43-07:00</dc:date>
      <pubDate>2006-07-19T09:19:43-07:00</pubDate>
      <source url="http://dn.codegear.com/article/26752/feed">Comments for How to detect if the current user is logged in administrator.</source>
    </item>
    <item>
      <description><![CDATA[Works fine on XP.Tested it.Just add these constants:const  SECURITY_NT_AUTHORITY: TSIDIdentifierAuthority =                                      (Value: (0, 0, 0, 0, 0, 5));  SECURITY_BUILTIN_DOMAIN_RID = $00000020;  DOMAIN_ALIAS_RID_ADMINS = $00000220;Thanks :)]]></description>
      <title><![CDATA[How to detect if the current user is logged in administrator.]]></title>
      <managingEditor>
	 (parag joshi)
</managingEditor>
      <guid isPermaLink="true">http://threads.codegear.com/threads/threads.exe/view?commentid=38182</guid>
      <dc:date>2005-02-21T07:04:01-08:00</dc:date>
      <pubDate>2005-02-21T07:04:01-08:00</pubDate>
      <source url="http://dn.codegear.com/article/26752/feed">Comments for How to detect if the current user is logged in administrator.</source>
    </item>
    <item>
      <description><![CDATA[I can't Complie this function in D5.Maybe I miss to uses some units. Why can tell me which units it is?]]></description>
      <title><![CDATA[How to detect if the current user is logged in administrator.]]></title>
      <managingEditor>
	 (Chen Ping)
</managingEditor>
      <guid isPermaLink="true">http://threads.codegear.com/threads/threads.exe/view?commentid=28129</guid>
      <dc:date>2001-02-26T21:46:37-08:00</dc:date>
      <pubDate>2001-02-26T21:46:37-08:00</pubDate>
      <source url="http://dn.codegear.com/article/26752/feed">Comments for How to detect if the current user is logged in administrator.</source>
    </item>
    <item>
      <description><![CDATA[What's missing in the Delphi 5 version of Windows.pas is the definition of some related constants:const  SECURITY_NT_AUTHORITY: SID_IDENTIFIER_AUTHORITY = (Value: (0,0,0,0,0,5));   // ntifs  SECURITY_BUILTIN_DOMAIN_RID: DWORD = $00000020;  DOMAIN_ALIAS_RID_ADMINS: DWORD = $00000220;  DOMAIN_ALIAS_RID_USERS : DWORD = $00000221;  DOMAIN_ALIAS_RID_GUESTS: DWORD = $00000222;  DOMAIN_ALIAS_RID_POWER_: DWORD = $00000223;]]></description>
      <title><![CDATA[How to detect if the current user is logged in administrator. - Missing constants]]></title>
      <managingEditor>
	 (Thomas Schimming)
</managingEditor>
      <guid isPermaLink="true">http://threads.codegear.com/threads/threads.exe/view?commentid=27836</guid>
      <dc:date>2001-02-05T05:54:06-08:00</dc:date>
      <pubDate>2001-02-05T05:54:06-08:00</pubDate>
      <source url="http://dn.codegear.com/article/26752/feed">Comments for How to detect if the current user is logged in administrator.</source>
    </item>
    <generator>Atom 1.0 XSLT Transform v1 (http://atom.geekhood.net)</generator>
  </channel>
</rss>