你的需求我还不是很了解, 看看下面的.不知能不能帮到你.(摘自MSDN LogonUser的说明)
LogonUser()
A user is considered logged on as long as at least one token exists. If you call CreateProcessAsUser and then close the token, the system considers the user as still logged on until the process (and all child processes) have ended.
If the LogonUser call is successful, the system notifies network providers that the logon occurred by calling the provider's NPLogonNotify entry-point function.