I want have access to restrict folders when inside one application. A general
user using the browser does not have access to these folders, but using the
application is supposed have access to those folders.
Is possible the application use a specific login to have access to a
specific resource?
How can I use a different login in an application?
Thanks,
Rui
> How can I use a different login in an application?
- LogonUser
- ImpersonateLoggedOnUser
- RevertToSelf

Signature
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Rui Oliveira - 16 Jun 2005 20:28 GMT
I used these functions to logon like user administrator to have access to a
folder (with name “FolderAAA”) that a normal user do not have.
I have the following situation:
- When I logon in windows with user administrator, my application has access
to folder “FolderAAA” and the application use CopyFile function to copy files
from that folder.
- When I logon windows with a normal user that do not have access to that
folder, the application use functions “LogonUser/ImpersonateLoggedOnUser” to
logon like user administrator. But after these steps my application cannot
copy files anyway.
Is not suppose after call “LogonUser” and “ImpersonateLoggedOnUser”
functions have the user administrator permissions??
Tks,
Rui
Rui Oliveira - 16 Jun 2005 21:13 GMT
I used these functions to logon like user administrator to have access to a
folder (with name “FolderAAA”) that a normal user do not have.
I have the following situation:
- When I logon in windows with user administrator, my application has access
to folder “FolderAAA” and the application use CopyFile function to copy files
from that folder.
- When I logon windows with a normal user that do not have access to that
folder, the application use functions “LogonUser/ImpersonateLoggedOnUser” to
logon like user administrator. But after these steps my application cannot
copy files anyway.
Is not suppose after call “LogonUser” and “ImpersonateLoggedOnUser”
functions have the user administrator permissions??
Tks,
Rui
William DePalo [MVP VC++] - 16 Jun 2005 23:42 GMT
> Is not suppose after call "LogonUser" and "ImpersonateLoggedOnUser"
> functions have the user administrator permissions??
Did you check the return codes from those functions? What function are you
using to copy the file? What value did it return.
Regards,
Will