ahh, ok. Another (probably better) way to do this would be to use
LsaQueryInformationPolicy with PolicyDnsDomainInformation. This will return
a POLICY_PRIMARY_DOMAIN_INFO structure containing the domain's name and SID.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/lsaqueryinformationpolicy.asp
for LsaQueryInformationPolicy and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/policy_primary_domain_info.asp
for the POLICY_PRIMARY_DOMAIN_INFO structure.
--
This message is provided "AS IS" with no warranties, and confers no rights.
This message originates in the State of Washington (USA), where unsolicited
commercial email is legally actionable (see
http://www.wa.gov/ago/junkemail).
Harvesting of this address for purposes of bulk email (including "spam") is
prohibited unless by my expressed prior request. I retaliate viciously
against spammers and spam sites.
Post by smurfHello Dave,
The API "GetWindowsAccountDomainSid" requires at least WinXP or
WinSrv-2003 but i need
it for Win2000.
Another question is whitch computername i have to supply to the
"LookupAccountName"
for the computer-account (as "System-Name" param).
I Think, one of the logon-server but does it work in offline-Mode? (a
Notebook for example)
The client itself also have to know the domain-sid for the
netlogon-service or not?
Do you known a way to yuery the SIDs directly from the client without
sending a request
to any logon-server ?
Thank you for any furhter suggestions