Thread: Program works on Windows XP and 2000, not on 98 or ME

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    25

    Program works on Windows XP and 2000, not on 98 or ME

    Hello. I'm new to the boards, but a long time programmer.

    I'm creating a card game using C++, and unfortunately I cannot go into any details or post any code on the game because of contracts I have signed with my company.

    However, hopefully I can find a little help for this problem:

    My game runs perfectly smooth on Windows XP and Windows 2000. When I run the game on a system with Windows 98 or Windows ME, the entire computer freezes after a few cards are shown.

    I know this is not a system spec issue, because I have tried it on both Windows 98 (game froze) and Windows 2000 (game worked perfectly), both from the same machine.

    My question is this:

    What known problems might there be between code that works perfectly fine on Windows 2000 and XP, and freezes on 98 and ME.

    Any general issues that you can think of would be greatly appreciated. The more the merrier!

    Also, I have done quite a good deal of research through google and this board before asking, as I know is good practice.

    Thanks for any help!

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    What graphics library do you use (do you use any?)?

    If you use one, have you updated all the drivers for that OS? Make sure you dont use functions not supported by 98/ME.

    Have you tried to build the program under 98/ME?

    Just some of the stuff I can think of that might have something to do with it.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    It's most likely a function that doesn't exist back then. MSDN library's reference is a good place to check for compatibility of an API function. If you could run it in the debugger on the 98 install, it should break at the offending function.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    25
    Thanks for the quick replies!

    From what I have found is that there are alot of API functions that aren't supported by Windows ME or earlier versions of Windows.

    I've been to the MSDN site, I just couldn't find how to exactly find a "list" or a way to search the functions that do not work on older versions of windows.

    I was also wondering if it might be a memory issue, as I have heard that Windows 98 handled system resources horribly.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    To see if a function is supported by a specific OS you will have to search for the function, select the correct search-result and browse down to "Requirements".

    About the memory-concerns, that is why I asked if you had recompiled it all under 98/ME (not sure if it will/can make a difference but who knows).
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    25
    Oh, okay thanks alot. I will be searching as we speak.

    I will also be installing builder on one of the computers with 98, and running a build on it to see what happens.

    Thanks again for the help!

  7. #7
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    >> It's most likely a function that doesn't exist back then. <<

    If an imported function does not exist, the exe will fail to load with an error message to that effect. It won't run for a while then freeze.

    You need to debug your program on 98/ME. Windows NT is generally a far more robust OS than 9x. Some thoughts:

    - If you have a window, you need to pump a message queue. If a thread creates a message queue (there are several functions that implicitly create a message loop), it needs to continue to pump the messsage queue so that it responds to any broadcast messages.
    - NT may be more tolerant if you are accidently allocating excesive memory.

  8. #8
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    One other possible cause of programs working on one OS but not on another is related to pointer molestation (eg falling off the end of an array, dereferencing a pointer to an object that has been released, dereferencing a NULL, etc). Technically, doing such things results in undefined behaviour and, while a common symptom is a crash, another common symptom is for the program to work correctly on one machine and incorrectly when ported. The reason for that is that different OSs lay out memory differently, and pointer molestation therefore corrupts different things in memory which are used by different code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CreateFile returns err 5 on 2000, but works fine of XP
    By Yarin in forum Windows Programming
    Replies: 26
    Last Post: 08-10-2008, 09:34 AM
  2. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  3. how to Ensure my program works across platforms??
    By hanhao in forum C++ Programming
    Replies: 8
    Last Post: 07-09-2005, 03:43 AM
  4. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM
  5. Does windows XP handle color depth differently than ME or 2000?
    By Stormkoopa in forum Windows Programming
    Replies: 1
    Last Post: 11-05-2002, 06:10 AM