Link to home
Start Free TrialLog in
Avatar of Tdl
TdlFlag for Switzerland

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
ASKER CERTIFIED SOLUTION
Avatar of dannic
dannic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twalgrave
twalgrave

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

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.
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange