Re: AzMan Access Check
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Wed, 24 May 2006 09:53:45 GMT
Hi Tony,
Thanks for your feedback!
Yes, I have got your Win32 version sample project. After modifying the 4
user settings in the application like below, I managed to get your
application running:
LPWSTR lpszPath = L"my user account LDAP string";
LPWSTR lpszPwd = L"my domain password";
LPWSTR lpszSID=NULL;
LPWSTR lpszUser = L"my account alias";
PSID psid=NULL;
DWORD dwsid, dwdomain;
LPWSTR lpszDomain=NULL;
SID_NAME_USE snu;
const DWORD INITIAL_SIZE = 32;
DWORD dwSidBufferSize = INITIAL_SIZE;
psid = (PSID) new BYTE[dwSidBufferSize];
if (psid == NULL)
{
return 0;
}
memset(psid, 0, dwSidBufferSize);
lpszDomain=(LPWSTR)malloc(sizeof(256));
BOOL fResult=LookupAccountNameW(NULL, lpszUser, psid, &dwsid, lpszDomain,
&dwdomain, &snu);
if(!fResult)
{
printf("LookupAccountNameW failed with error code %d", GetLastError());
return 0;
}
fResult=ConvertSidToStringSid(psid, &lpszSID);
if(!fResult)
{
printf("ConvertSidToStringSid failed with error code %d", GetLastError());
return 0;
}
Are you sure we need Domain Admin rights to run the code? My account does
not have Domain Admin rights in the company domain, but the code runs
without any problem.
Based on my test, your sample application runs very fast on my Win2003 SP1
machine, after several minutes, the count goes above 10000, but I still did
not get any AV. Then I tried the application no another XP SP2 test
machine. I am not sure why, but the application runs very slow, almost
several seconds per loop. After running about 1 hour and getting more than
500 loops, I still did not get any AV in the application. Is there anything
I missed?
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: AzMan Access Check
- From: TonyCheung
- Re: AzMan Access Check
- References:
- AzMan Access Check
- From: TonyCheung
- RE: AzMan Access Check
- From: "Jeffrey Tan[MSFT]"
- Re: AzMan Access Check
- From: TonyCheung
- Re: AzMan Access Check
- From: "Jeffrey Tan[MSFT]"
- Re: AzMan Access Check
- From: TonyCheung
- AzMan Access Check
- Prev by Date: Re: CryptAcquireContext fails with 0x8009001d (NTE_PROVIDER_DLL_FAIL)
- Next by Date: Re: AzMan Access Check
- Previous by thread: Re: AzMan Access Check
- Next by thread: Re: AzMan Access Check
- Index(es):
Relevant Pages
|