Just Plain Weird
-
It wasn't a programming question. My question was whether or not Win2k compiles produced different binaries than win98 compiles. Your answer ("Of course not.") implies that you trust Microsoft not to do something off the wall (or just plain stupid) with their compilers. I guess I'm not that trusting, hence the question. I've been poking at this problem on and off for almost a week (with absolutely no help from the MSDN CD), and it's starting to really annoy me, so sorry if I seem a little abrupt about it.
> It wasn't a programming question. My question was whether or > not Win2k compiles produced different binaries than win98 compiles. What kind of question it is? > sorry if I seem a little abrupt about it. Don't explode. Use fc /b to compare the compiler/linker output and let me know if you'll find any differences. Tomasz Sowinski -- http://www.shooltz.com.pl
-
> It wasn't a programming question. My question was whether or > not Win2k compiles produced different binaries than win98 compiles. What kind of question it is? > sorry if I seem a little abrupt about it. Don't explode. Use fc /b to compare the compiler/linker output and let me know if you'll find any differences. Tomasz Sowinski -- http://www.shooltz.com.pl
I'm not angry or annoyed at you or anyone else. What I'm annoyed about is that I have to write a class that reads the entire file and parses the whole daggone thing because the company that produced this INI file in the first place blew it big time by creating a non-standard INI file, and some versions of Windows can't handle it. What's worse is that the other program in question has 27 INI files, two of which are properly formatted, but the rest of which are formatted incorrectly. I "scrubbed" one of the files (removed the offending spaces) to see if the other program would still read it correctly, and it does, so that just deepens the level of annoyance even more because they could have written it correctly in the first place.
-
Using VC6/SP4 on Win2K/SP1... I have an INI file (shipped with another program written by another company) that has sections that look like this:
[ Section ]
key1 = value
key2 = value
key3 = value(Yes, the spaces I put in the listing above actually do exist in the INI file.) The program I wrote that reads this INI file compiles and runs fine on Win2K, but on Win98 ist fails to find the sections (and maybe the keys but I don't know that yet). It fails to read the INI file (can't find section names), even if I use GetPrivateProfileSection and parse out the keys manually. Everything I tried on my Win2k machine worked flawlessly, but each method failed miserably on the win98 machine. Does VC6 create different code when compiled on win2k than it does when compiled on Win98? I know this sounds like I'm grasping at straws, but this is driving me absolutely nuts.
I normally use spaces in between the keys but never the sections. Have you tried GetPrivateProfileSectionNames(...) to get the section names of the ini file? Maybe you have to use " Section ", instead of "Section". I dunno :confused: Wayne
-
Using VC6/SP4 on Win2K/SP1... I have an INI file (shipped with another program written by another company) that has sections that look like this:
[ Section ]
key1 = value
key2 = value
key3 = value(Yes, the spaces I put in the listing above actually do exist in the INI file.) The program I wrote that reads this INI file compiles and runs fine on Win2K, but on Win98 ist fails to find the sections (and maybe the keys but I don't know that yet). It fails to read the INI file (can't find section names), even if I use GetPrivateProfileSection and parse out the keys manually. Everything I tried on my Win2k machine worked flawlessly, but each method failed miserably on the win98 machine. Does VC6 create different code when compiled on win2k than it does when compiled on Win98? I know this sounds like I'm grasping at straws, but this is driving me absolutely nuts.
Wonder if at some point that file became unicode?
-
Wonder if at some point that file became unicode?
You might have a point there, it it's unicode win9x don't like it, and NT just reads it... John: Try to open the file in notepad, in win2k, click save as, and see if it want to save it as unicode... - Anders Money talks, but all mine ever says is "Goodbye!"
-
I'm not angry or annoyed at you or anyone else. What I'm annoyed about is that I have to write a class that reads the entire file and parses the whole daggone thing because the company that produced this INI file in the first place blew it big time by creating a non-standard INI file, and some versions of Windows can't handle it. What's worse is that the other program in question has 27 INI files, two of which are properly formatted, but the rest of which are formatted incorrectly. I "scrubbed" one of the files (removed the offending spaces) to see if the other program would still read it correctly, and it does, so that just deepens the level of annoyance even more because they could have written it correctly in the first place.
Why dont you just write a proggy to fix the invalid files?
-
Why dont you just write a proggy to fix the invalid files?
A "proggy"? LOL! Chris, you and I are getting too old for this industry!
-
A "proggy"? LOL! Chris, you and I are getting too old for this industry!
That means that I'm also too old... I would prefer to say that some of the other are too young. I don't like to be "too old" just yet ;P - Anders - Anders Money talks, but all mine ever says is "Goodbye!"
-
Why dont you just write a proggy to fix the invalid files?
-
I normally use spaces in between the keys but never the sections. Have you tried GetPrivateProfileSectionNames(...) to get the section names of the ini file? Maybe you have to use " Section ", instead of "Section". I dunno :confused: Wayne
It found the section names in when I used GetPrivateProfileSectionNames(), but it wouldn't find them when I used GetPrivateProfileSection() or GetPrivateProfileString(). Weird. I think MS has a bug in the API, but since these functions are "obsolete", we'll never see a fix.
-
It found the section names in when I used GetPrivateProfileSectionNames(), but it wouldn't find them when I used GetPrivateProfileSection() or GetPrivateProfileString(). Weird. I think MS has a bug in the API, but since these functions are "obsolete", we'll never see a fix.
Were there extra spaces in the section names? If there are that would explain the reason GetPrivateProfileSection() and GetPrivateProfileString() are not working. Wayne
-
Were there extra spaces in the section names? If there are that would explain the reason GetPrivateProfileSection() and GetPrivateProfileString() are not working. Wayne
Yeah, there were spaces in the section names, but the bug (in Win9x/ME) is this - I could retrieve the section names, but I couldn't get sections in therir entirety or key values in those sections. It's a bug in KERNEL32.DLL, and will never be fixed because a) it involves "obsolete" operating systems, and b) involves "obsolete" API functions.