problem loading files with windows 7

Blitz3D Forums/Blitz3D Programming/problem loading files with windows 7

RGF(Posted 2010) [#1]
Hi everybody

Anyone exprienced trouble when loading meshes or textures in windows 7?
Even when typing full path: i.e. LoadTexture("c:\game\tex.bmp"), I get an error message: Texture does not exist
I made sure all the files are present in the directories, I moved all files to a folder placed directly in root (c:\game\*.*), I used "ChangeDir" before loading textures...
And what's more surprising: the same folder structure, the same code, they load perfectly in windows xp.

Please, help me... What's going on? I don't understand

By the way, I migrated from xp to 7, didn't use vista...


Ross C(Posted 2010) [#2]
Try not using the full path? I've heard people having sprite problems with win 7. ANyway, try relative paths for your textures. Other reason being, if someone else tries to run it, and doesn't put it in the root of C, then your game won't work.


RGF(Posted 2010) [#3]
I did. In fact, I've used relative paths before experimenting that. I moved everything to root folder just for testing...
The problem seems to be that windows denies permission to access some files... Don't know why?
Dude, I don't like this w-seven thing. Thanks Ross, ;) now you can say you've heard of someone else having sprite problems with w7


Rroff(Posted 2010) [#4]
Probably due to security settings - when you run the exe with default settings it should prompt you to allow this program access to the HDD - if you deny it then it can only access program files/user folders. If your security settings are turned up you won't see this dialog and be denied by default. Tho I'm not sure if this affects files writen to or read as well.

So its a good idea for developers using b3d to start using the windows user paths.


PowerPC603(Posted 2010) [#5]
You can also try using a d: drive, instead of the c: drive.
Like d:\game\*.*

In Windows Vista, if I attempt to write to a file somewhere in the c:\windows directory, I also get a message that it isn't possible.
Like editing the lmhosts file with Notepad.
I have to copy the file somewhere else (d: drive), edit it there and copy it back. I can replace the original file with the edited file, but I cannot write directly to the file in the windows directory.

Perhaps Windows 7 has increased the protection for reading/writing files all over the system drive (usually c:), not only the c:\windows directory.


RGF(Posted 2010) [#6]
Both solutions worked fine. Placing folders under windows user paths worked fine, as well as running from d:, e:, f: drives. Even running from a usb drive worked fine. Thank you