Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logonuser impersonate user
Message
From
14/12/2006 11:10:16
 
 
To
13/12/2006 16:14:21
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01177208
Message ID:
01177618
Views:
14
>Stuart,
>
>Sorry for the hand hold in this. But if I'm understanding you properly I do the following:
>
>1. Run the class and logon user from the Launching Program.
>2. From the Launching Program set my default to what I want to run.
>3. From my Launching Program run the Application I desire.

Yes, I suppose so. One option would be to use CreateProcessAsUser using the token returned by LogonUser, see http://news2news.com/vfp/?group=58&function=697

>What is the physical location of your Launching Program. I'm trying to run my Launching Program from I:\seclaunch.

To access network resources while impersonated a change needs to be made to the code I posted: pass LOGON32_LOGON_INTERACTIVE (which has the value of 2) to the LogonUser's LogonType parameter instead of LOGON32_LOGON_NETWORK:
#define LOGON32_LOGON_INTERACTIVE 	2
nSuccess = LogonUser(cUsername, cDomainName, cPassWord, ;
    LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, @nUserHandle)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform