AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi HKEY_CURRENT_USER für alle Benutzer anzeigen
Thema durchsuchen
Ansicht
Themen-Optionen

HKEY_CURRENT_USER für alle Benutzer anzeigen

Ein Thema von alcaeus · begonnen am 11. Aug 2003 · letzter Beitrag vom 12. Aug 2003
 
Assarbad
(Gast)

n/a Beiträge
 
#17

Re: HKEY_CURRENT_USER für alle Benutzer anzeigen

  Alt 11. Aug 2003, 23:39
LookupAccountSid() und LookupAccountName() arbeiten analog. Hier der Aufruf in LoggedOn2:

LookupAccountSid(Pchar(ServerName), sid, userName, userNameSize, domainName, domainNameSize, sidType)

Ein Blick ins PSDK sagt uns:

Zitat von Microsoft:
LookupAccountName
The LookupAccountName function accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of the domain on which the account was found.

Code:
BOOL LookupAccountName(
  LPCTSTR lpSystemName,
  LPCTSTR lpAccountName,
  PSID Sid,
  LPDWORD cbSid,
  LPTSTR ReferencedDomainName,
  LPDWORD cchReferencedDomainName,
  PSID_NAME_USE peUse
);
Parameters
lpSystemName
[in] Pointer to a null-terminated string that specifies the system. This string can be the name of a remote computer. If this string is NULL, the account name is retrieved on the local system.
lpAccountName
[in] Pointer to a null-terminated string that specifies the account name.
Use a fully qualified string in the domain\username format to ensure that LookupAccountName finds the account in the desired domain.

Sid
[out] Pointer to a buffer that receives the SID structure that corresponds to the account name pointed to by the lpAccountName parameter. If this parameter is NULL, cbSid must be zero.
cbSid
[in, out] Pointer to a variable. On input, this value specifies the size, in bytes, of the Sid buffer. If the function fails because the buffer is too small or if cbSid is zero, this variable receives the required buffer size.
ReferencedDomainName
[out] Pointer to a buffer that receives the name of the domain where the account name is found. For computers that are not joined to a domain, this buffer receives the computer name. If this parameter is NULL, the function returns the required buffer size.
cchReferencedDomainName
[in, out] Pointer to a variable. On input, this value specifies the size, in TCHARs, of the ReferencedDomainName buffer. If the function fails because the buffer is too small, this variable receives the required buffer size, including the terminating null character. If the ReferencedDomainName parameter is NULL, this parameter must be zero.
peUse
[out] Pointer to a SID_NAME_USE enumerated type that indicates the type of the account when the function returns.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:49 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz