Hi guys, I encounter a strange issue, that, call to CreateEnvironmentBlock() consumes 15 seconds before return. This issue only occurs on one computer. If it's preceded by the call of LoadUserProfile(),the occurance reate reduce, but still can reproduce. I don't know why it's 15 seconds. Is there any time-out mechanism? Any idear about this issue? thanks in advance.
Here is a link, in which states that the CreateEnvironmentBlock API will fail if it is used to retrieve environment variables for a user whose profile is not currently loaded. I think the failure calling will consume a longer time than success calling. http://support.microsoft.com/kb/305136
Hope this helps!
Marked as answer byYan-Fei WeiFriday, August 01, 2008 9:46 AM