Tdl
asked on
How to execute WinAPI calls with a different user account
Hi there.
My API stuff works now but when I'm logged in and run my program the API call NetFileEnum gets a access denied which is logical.
I can logoff and login as Admin and then execute it, this works. But I dont wanna logoff/login everytime I need to execute this prgm.
Is there a way that I can promt for a (Domain)Username and Password in my program and then execute those API calls as this user?
Thanks for any hints
Marc
My API stuff works now but when I'm logged in and run my program the API call NetFileEnum gets a access denied which is logical.
I can logoff and login as Admin and then execute it, this works. But I dont wanna logoff/login everytime I need to execute this prgm.
Is there a way that I can promt for a (Domain)Username and Password in my program and then execute those API calls as this user?
Thanks for any hints
Marc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Finalized as proposed
modulo
Community Support Moderator
Experts Exchange
modulo
Community Support Moderator
Experts Exchange
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to dannic
Please leave any comments here within the
next seven days.