[ros-bugs] [Bug 2602] NT4 style Event Viewer App
ReactOS.Bugzilla at www.reactos.org
ReactOS.Bugzilla at www.reactos.org
Wed Aug 29 13:44:42 CEST 2007
http://www.reactos.org/bugzilla/show_bug.cgi?id=2602
--- Comment #3 from piulachs <marc.piulachs at codexchange.net> 2007-08-29 13:44:41 CET ---
Yes , I have used this fragment of code :
// Point to the SID.
lpSid = (PSID)((LPBYTE) pelr + pelr->UserSidOffset);
if (LookupAccountSid(
NULL,
lpSid,
szName,
&cbName,
szDomain,
&cbDomain,
&snu))
{
// Determine whether the buffer is large enough.
dwLen = lstrlen(szName) + 1;
if (dwLen > *pszUser)
{
SetLastError( ERROR_INSUFFICIENT_BUFFER );
*pszUser = dwLen;
return FALSE;
}
// Return the user's name.
strncpy ( pszUser, szName , dwLen);
}
else
{
// Use the error status from LookupAccountSid.
return FALSE;
}
SetLastError(0);
wich is available as a sample code on the msdn article
http://msdn2.microsoft.com/en-us/library/aa363645.aspx I think that this is
more than fair use as this code is just for that anyway there aren't a lot of
rewriting this code
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Ros-bugs
mailing list