R

wrote in message news:c7211700-d745-4be9-9b47-9cb493fd90ea@discussions.microsoft.com...

Is it possible to read the LOGONSERVER environment variable of another domain?

I tried the following:

-login as a local user

-LogonUser() into another domain

-ExpandEnvironmentStrings() impersonating the token

-LOGONSERVER ist still the name of the work station

Thanks for your help

How does this question relate to C++?

Anyway, the Environment block is loaded with the process, so it represents the current users environment, if you need the impersonating users environment you have to load it's profile (see Win32 API - LoaduserProfile).

Willy

[707 byte] By [MVPUser] at [2007-12-16]
# 1

Is it possible to read the LOGONSERVER environment variable of another domain?

I tried the following:
-login as a local user
-LogonUser() into another domain
-ExpandEnvironmentStrings() impersonating the token
-LOGONSERVER ist still the name of the work station

Thanks for your help

PeterPeter at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
I don't have administrative privileges to call LoadUserProfile().
PeterPeter at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
This web forum is for questions and feedback on the Visual Studio 2005 product prereleases. You should be able to find quick help for this issue over in our public newsgroups (http://msdn.microsoft.com/newsgroups).

Thanks,
April Reagan, Visual C++ Program Management

AprilReagan at 2007-8-21 > top of Msdn Tech,Visual C++,Visual C++ General...