• ### What is your GameDev Story?

This topic is 4900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
Hey, i dont think that read-only makes the difference because a file or bitmap
that is opened to be displayed and rendered is normaly opened for read but in
some cases, i dont know how you open the file, it is possible you opened it for
read and write, but anyway. I think the problem that read-only is grayed
is because we are talking about parent and child relation. It is possible that
your partition lets say C or D has the option clicked on "Replace permission entries on all child objects with entry shown here that apply to the child objects". This checkbox can be found under the security tab and then advance.
If it isnt on go one level lower check the main store folder if this isnt
checked on go to the next folder in the main folder aso. Till you find
a checked option. This causes all underlying objects including folders,files,
aso to take the parents settings. If you uncheck this one, press apply and then
go to your folder and set the correct security settings and apply it on all bitmap files. During a copy of a file on another computer the security settings
of your pc are not the same. In the new destination the NTFS settings are applied of the main parent folder. That can be the reason.
Also makes sure you open a file like this or pass the parameter like this just
to be on the safe side. "C:\\MLOL\\KKKKK\\KKDKJDLK" \\ is to make sure
that C knows it is \ otherwise he thinks it may be a special feater like
\n newline or \t tab

I hope you understood my explanation. I am from belgium i dont write english
everyday so sorry.

##### Share on other sites

I have checked and I am using the \\ escape sequence for
Also, when I copy the .exe and data folder onto another computer's shared folder, then run the .exe from my pc, it fails..something to do with kernel.dll I think..so seems like a different problem but nothing major as I'd never be running the .exe from a shared folder normally.

When I right-click C: and click properties, there is no security tab?? I searched google and read that someone had to boot win2k to sort out their file permissions and winXP dumbs down the settings or something? Do you now how to expose these permission for me to change?

Cheers

##### Share on other sites
AFAIK, windows runs the executable in its own path, rather than the path it's actually in. This means if you try to use files local paths, rather than the full path, it probably wont work. However, there is a solution. Create a shortcut to the executable and use that instead, because you can set the exact path that the executable is run in in the shortcut, so you wont encounter this problem (well you shouldn't encounter it).

##### Share on other sites
Thanks, I'm using the full path though:

Application.StartupPath + "\\Data\\Skybox\\left.dds"

and by using a breakpoint I've seen that this directory is the correct directory.

##### Share on other sites
You might want to try to do

File.Exists(filename)

to see whether it is the texture loader that's wrong or not.

##### Share on other sites
Thanks Sijman, I've added that check.

Okay i figured out how to change to permissions, did what Joran said, still the same problem, fiddled the permissions some more and nothing.

This is really starting to be a pain now as I'm doing nothing wrong! Code:

string tmpdir = Application.StartupPath + "\\Data\\Skybox\\left.DDS
MessageBox.Show("The file exists = " + File.Exists(tmpdir));

When I run this on the other machine, a file IO exception is thrown before either of the msgboxes are shown?? And when I comment out the texture[0] line, everything works perfectly, with the file existing and no errors.

##### Share on other sites
Not directly linked to this problem, but you don't have to use the awkward \\ syntax, just use / instead.
So, Application.StartupPath + "\\Data\\Skybox\\left.DDS"; would be Application.StartupPath + "/Data/Skybox/left.DDS";
(I assume the missing "; on your code was a copy-paste mistake).

##### Share on other sites
cool thanks for the tip...yep was a copy/paste mistake

##### Share on other sites
I've tried changing this single texture to a random .jpg texture I got off the internet, but still no luck.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634135
• Total Posts
3015752
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!