B
Brett Romero
I'm running the code below to get network paths.
DirectoryInfo diSource = new DirectoryInfo( fullPath );
They usually look like this:
\\cpx-270\SomeFolder
I may or may not have access to SomeFolder. Sometimes the machine
isn't on or the folder is spelled "SomeFolders" on a particular
machine. It seems when I run across those scenarios, my app hangs and
I get this error:
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not
attempt to run managed code inside a DllMain or image initialization
function since doing so can cause the application to hang.
Any one know how I can avoid this?
Also, it may take a little time to get the network path assigned to
diSource. I'd like to stall until that variable has a value. So I
need some type of synchronous contraint before moving on. Any
suggestions here as well are appreciated.
Thanks,
Brett
DirectoryInfo diSource = new DirectoryInfo( fullPath );
They usually look like this:
\\cpx-270\SomeFolder
I may or may not have access to SomeFolder. Sometimes the machine
isn't on or the folder is spelled "SomeFolders" on a particular
machine. It seems when I run across those scenarios, my app hangs and
I get this error:
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not
attempt to run managed code inside a DllMain or image initialization
function since doing so can cause the application to hang.
Any one know how I can avoid this?
Also, it may take a little time to get the network path assigned to
diSource. I'd like to stall until that variable has a value. So I
need some type of synchronous contraint before moving on. Any
suggestions here as well are appreciated.
Thanks,
Brett