🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #106

Re: Problems with LogonUser API

#106
From: DreamChaser
Date: Fri, 27 Jun 2008 06:18
15 lines
1588 bytes
Darko MIletic wrote:
> I need to write a function that get's user profile folder for specified 
> username. I use SHGetFolderPath API for this in conjunction with 
> LogonUser. LogonUser is needed because since that is the only way (known 
> to me) to get acl user token  needed for SHGetFolderPath. Everything 
> works fine when account has password, however if I try to call LogonUser 
> with empty password I get error ERROR_ACCOUNT_RESTRICTION that states:
<snip>
> So any idea how to get acl token for user account that has no password?
> 
Is the user actually logged on to the machine, or are you trying to 
impersonate a user. If locally logged on take a look at 
SHGetSpecialFolderLocation()

dc
Technical Details
Message-ID: <4864863b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <48599a88$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6c634ffce5a80c5a
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 27 Jun 2008 01:18:37 -0500
From: DreamChaser <NO-Spam@No-Span.net>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Problems with LogonUser API
References: <48599a88$1@newsgroups.borland.com>
In-Reply-To: <48599a88$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.6.192.60
Message-ID: <4864863b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1214547515 65.6.192.60 (26 Jun 2008 23:18:35 -0700)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mail