Article View: borland.public.cppbuilder.nativeapi
Article #3616Re: WHat is my account type
From: Mike Collins
Date: Mon, 22 May 2006 16:25
Date: Mon, 22 May 2006 16:25
21 lines
1656 bytes
1656 bytes
Yes and no, you can determine if your current account rights match those of the adminitration group. there are a number of steps to go through to do this: 1) call OpenProcessToken on the current process. 2) call GetTokenInformation on the returned handle 3) call AllocateAndInitializeSid to get information on the admin rights.. 4) use EqualSid to compare the two. I believe Remy posted some code here last year explaining how to do this, if not I can post my version which as I remember is based on his (it might actually be his...) HTH Mike "Jos�" <jose@127.0.0.1> wrote in message news:lko372tv8d3pmfa8aljurjaqc4st3e5g9n@4ax.com... > Is there a system call which tells me whether I am signed on as an > administrator or as a limited user? > -- > Jos�
Technical Details
Message-ID:
<4471e604@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<lko372tv8d3pmfa8aljurjaqc4st3e5g9n@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,283096f94514b8ce X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: "Mike Collins" <its@TheBottomOfThePost.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <lko372tv8d3pmfa8aljurjaqc4st3e5g9n@4ax.com> Subject: Re: WHat is my account type Date: Mon, 22 May 2006 17:25:37 +0100 Lines: 23 Organization: SDA Ltd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.2663 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663 NNTP-Posting-Host: 81.2.92.14 Message-ID: <4471e604@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1148315140 81.2.92.14 (22 May 2006 09:25:40 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail