Re: AzMan Access Check



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.

.



Relevant Pages

  • Re: Starting a Dial Up connection?
    ... > From the Function I had I recieved this error code "30064771159" how ... C: DWORD InternetDial( ... indicates that a ANSI version (i.e. InternetDialA) will be used on Win9x ... It takes 4 bytes so you can declare it as Integer but all ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Issue with LINEAGENTGROUPENTRY -> Name
    ... > Andreas - Oops, I was using DWORD instead of LONG for Status. ... In TAPI.H error code ... I have authored a tool to dump all TAPI error codes / messages: ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Getting error code 6 when creating a dialog
    ... CDialog* tempDlg = new CDialogTestDlg; ... DWORD dword = GetLastError; ... dword always comes back with an error code of 6 which is invalid handle. ...
    (microsoft.public.windowsce.embedded)
  • Whats goings-on calling WZCEnumInterfaces return error 1008 under WinXP
    ... It returns error code ... DWORD LoadWZCLibrary() ... if (dwStatus!= ERROR_SUCCESS) ...
    (microsoft.public.win32.programmer.networks)