Question : ShellExecute while remaining in process

Using the following to impersonate a user account cannot work on its own.

    IF LogonUser(cUser, cDomain, cPwd, LOGON32_LOGON_INTERACTIVE,LOGON32_PROVIDER_DEFAULT, @hToken) = 0
    ? "Token: ",hToken
    = ImpersonateLoggedOnUser(hToken)
    ? "Impersonated user:", SYS(0)
    lnRet = ShellExecute(hToken,'open', '',"","\\KGRAYD630\Share\test.txt", 1)

The reason is that the ShellExecute()  will start outside of the impersonation process obtained in the first two functions.  

My question is, this.  Is there a way to fire ShellExecute() InProcess, rather than Out of Process?

TIA

Dennis

Answer : ShellExecute while remaining in process

Domains don't automatically detect Exchange installations and if it is in a test domain, it's basically segregated from all other domains on your network. Mail routing has to be set up manually, and there is nothing dynamic about it for the most part. You should be just fine connecting it to the internet as long as you don't supply it with the IP address of the Exchange server that is routing Internet mail. You should also be able to set up Live Communications server on your test domain without issues as well.
Random Solutions  
 
programming4us programming4us