![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a named pipe set up between 2 processes on my local computer. I am using NamedPipeClientStream and NamedPipeServerStream. After getting the connection, my server impersonates the client user using NamedPipeServerStream.RunAsClient(). It then calls Environment.GetFolderPath to get the impersonated user's Application Data folder. All seems to be working most of the time. However... I have 2 domain user accounts, both of which have been logged into my computer at one time or another. Let's call them Matt and Mary. I am currently logged in as 'Matt'. If I run the server as 'Mary' using "Run as different user", and I run the client as 'Matt, then I get an exception in the call to GetFolderPath: DllNotFoundException Unable to load DLL 'shfolder.dll': Exception from HRESULT: 0x80070542 I am using Windows 7. If I reverse who is running what, then it works ok. So if I impersonate Mary in the process running as Matt, then it works. Is "Run as different user" somehow flawed, or does this accurately depict that there's an issue with what I am doing? Thanks, ...Matt |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |