1
votes

I was writing a small program and have some problems with DEP, what I want to do is to open files stored on another windows-share, my code looks like this:

foreach (string file in files) 
{
    Process.Start(file);
}

files is a simple string array with file locations (for example "\myshare\dir\picture.jpg"). This code works without any problems on XP but trying to run in with windows vista throws exceptions and a message pops up that Data Execution Prevention stopped my prog. How can I fix that? I red about NXCOMPAT already but maybe there is a right way how to open files in C#?

Greetings

J

1
FYI: I didn't find out why my code doesn't work but found a way out, before I open the file I copy it to Temp and open it from local disk, this way it works without any problems. - Jay

1 Answers

1
votes

This is most likely not a problem with your code. Microsoft wouldn't leave serious bugs like attempting to execute NX pages in the .NET Framework. The problem may be caused by anything from anti-virus/security software to actual viruses.