i am reading a ini-file using the Kernel32-solution (GetPrivateProfileString). It was working fine under XP but now it is (not) running under Windows-7.
Now i have the problem that windows7 protects the file and i cannot write into it (with another program).
As soon as i open the ini-file with kernel32 it is blocked forever until i close the program.
Is there any parameter to simply reading the ini- file without write-protecting it?
Or any other solutions on reading an ini-file?
I am using C# 2010 express

Thanks for help

Edit:
Meanwhile i tried to copy the original ini-file to a second-file and then i am only reading the copied ini-file with the kernel32-functions.
But now it seems that the simple copy command 
 System.IO.File.Copy(PathOriginal, lokalPath, true); 
is blocking the original file for the other program after it is copied.

So my problem is not with the ini-file now. It is file-protection in generall under windows 7.

Is there a trick to "free" the handle of the file i windows 7?