I need to enumerate network resources from my service and for this i plan to use impersonation.
This is what i did.
LogonUser(username)
ImpersonateLoggedOnUser()
// do networking stuff
RevertToSelf()
when i perform these operations with username = Administrator, the networking code works fine but with username = xxxx (which belong to the Administrators group), the networking code fails (GetLatError = 2).
What am i doing wrong here
As i see the username(xxxx) does not have a few access rights or privileges which the Administrator has to enumerate network resources. any idea what are those rights or privileges
I tried with granting SeNetworkLogonRight to xxxx and it did not work.
any inputs will be helpful.

Impersonation and Access Rights
RaghuramKr
This is not a C++ question. I would post your question in the Win32 security newsgroup:
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.platformsdk.security&lang=en&cr=US