January 8, 200719 yr Just for grins I moved the FS9 airplane I'm debugging over to FSX to see what would happen...and 98 percent of it worked without a hitch! That's great news, but I have one perplexing mystery.I have a C gauge that reads a config file. It works just fine in FS9. But in FSX, it won't find its configuration file. Here's the part of the code that opens the file: GetCurrentDirectory(256, HomeDirectory); Ifile = fopen("./acme/acme.cfg", "r"); if (Ifile == NULL) return (-1);Now, there's an acme.cfg file all set up and waiting in the acme folder which I put under the main FSX folder. HomeDirectory shows the right path to the default folder. Yet under FS9 this works great, and in FSX it always returns -1. Same computer, same compiled gauge, same everything except FS9 vs FSX.Anyone have any ideas?ThanksDutch
January 8, 200719 yr Commercial Member Check the path your gauge dll is loaded in. It's no longer the FSX root folder. In other words... GetCurrentDirectory isn't "C:Program FilesMicrosoft GamesFSX" Ed Wilson Mindstar AviationMy Playland - I69
January 9, 200719 yr I figured it out...I thought I'd tried everything before posting here but noooooooo. The problem was that the filename in the fopen() call is treated by windows as *case-sensitive* ... something I didn't know since filenames aren't case-sensitive in Windows. I'd created my directory as 'Acme' instead of 'acme'. Once I changed that, it found it - in the FSX root folder no less.Now it's crashing FSX, but that's obviously another problem...sure would be boring if everything worked right the first time wouldn't it?
Create an account or sign in to comment