🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Optain the owner of a file on win xp ?

#1219
From: Asger Jørgensen
Date: Tue, 09 Oct 2007 19:39
33 lines
1864 bytes
Thanks Remy

It works like a charm, You are the best..:-)

One last question:

At the moment I am testing this on my own system
with no server, so the users are all local.

I set the servername in NetUserGetInfo to NULL 
but if I am to use this on a server system i need
a servername.

Can I use the ReferencedDomainName i get from the 
call to LookupAccountSid as servername or is there 
an other way ?

When I try it on my system it seem to work but
will it work on a system with server ?

Thanks again
Kind regards
Asger

LookupAccountSid(
    LPCTSTR lpSystemName,
    PSID Sid,
    LPTSTR Name,
    LPDWORD cbName,
    LPTSTR ReferencedDomainName,
    LPDWORD cbReferencedDomainName,
    PSID_NAME_USE peUse
   );
Technical Details
Message-ID: <MPG.2175f75a28b05fd298983e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <MPG.21755c2df166d99b98983c@newsgroups.borland.com> <470b4657$1@newsgroups.borland.com> <MPG.2175a94fb36222398983d@newsgroups.borland.com> <470bb72f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7b60148a7b6c5927
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Jørgensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Optain the owner of a file on win xp ?
Date: Tue, 9 Oct 2007 21:39:23 +0200
Message-ID: <MPG.2175f75a28b05fd298983e@newsgroups.borland.com>
References: <MPG.21755c2df166d99b98983c@newsgroups.borland.com> <470b4657$1@newsgroups.borland.com> <MPG.2175a94fb36222398983d@newsgroups.borland.com> <470bb72f$1@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.213.92
X-Trace: newsgroups.borland.com 1191958757 83.73.213.92 (9 Oct 2007 12:39:17 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail