views:

82

answers:

1

Hi,

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  A: 

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.

wj32
hm it can't be a problem with my files either, these are only a few screenshots I made before, i run it on a new clean vista virtual machine not connected to the internet... anyway, thanks for the answer :)
Jay