Visual C++ Developer Center > Visual C++ Forums > Visual C++ General > GetSystemWindowsDirectoryW not found using VS 2008 C++ under Windows 98 SE
Ask a questionAsk a question
 

AnswerGetSystemWindowsDirectoryW not found using VS 2008 C++ under Windows 98 SE

  • Monday, December 17, 2007 12:00 PMJurgenJ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

     

    I installed the VS 2008 C++ and do validation tests for our software. We are not using the function GetSystemWindowsDirectoryW.

     

    Without changes the code does not run anymore on Windows 98 SE.

     

    Using VS 2005 C++ SP1 there was no problem.

     

    The problem comes from the fact that C++ 9.0 needs to link to GetSystemWindowsDirectoryW in kernel32.dll that is not present on Windows 98 SE.

     

    Will this problem be corrected?

     

    Is there a work-around?

     

    Regards

     

    Jurgen

     

     

     

Answers

  • Monday, December 17, 2007 1:50 PMJurgenJ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Hello,

     

    My code is a simple dll (named xlstatcr1c.dll) that does link with the c++ libs mscvp90.dll and msvcr90.dll (and some other windows dlls, but they do not pose any problem).

     

    The link to mscvp90.dll is ok.

     

    dependency walker indicates a problem in msvcr90.dll that links with kernel32.dll.

    kernel32.dll has the color red and displays the message "At least one module has an unresolved import due to a missing export function in an implicitly dependent module."

     

    When I display the import information on kernel32.dll, I see in red the "GetSystemWindowsDirectoryW".

    The export information of kernel32.dll does not have an entry "GetSystemWindowsDirectoryW". There is only an entry named "GetSystemDirectoryW"

     

    Is there a way to have VS 2008 working on windows 98 SE?

  • Monday, December 17, 2007 4:19 PMGabriel Topala Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    The Windows 95, Windows 98, Windows ME, and Windows NT platforms are no longer supported. These operating systems have been removed from the list of targeted platforms.

    http://msdn2.microsoft.com/en-us/library/bb531344(VS.90).aspx

     

    Thanks,

    Gabriel Topala

    www.gtopala.com

     

     

All Replies

  • Monday, December 17, 2007 12:15 PMRamkrishna Pawar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Whats C++ 9.0 ? And what error are you seeing on 98 SE?

     

    One more thing is, 98 is no more supported, which means the compatibility for 98 will be ignored by Microsoft Development studios, you should code the logic to handle OS specific part yourself.

  • Monday, December 17, 2007 12:40 PMJurgenJ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

     

    Thank you for your quick answer.

     

    C++ 9.0 is the C++ that comes with VS 2008. The error message when I try to load the product is "xlstatcr1c.dll could not be loaded". This is a generic error message.

     

    I used dependance checker to find the problem. I discovered, that msvc9xxx.dll now needs to link to GetSystemWindowsDirectoryW which is not in the kernel32.dll file of windows98.

     

    I read about the fact that VS 2008 is no more compatible with windows 98. But our clients still use this os. We will only have one product version out.

     

    The only point is the missing entry point in kernel32.dll under windows 98.

     

    What do you mean by "you should code the logic to handle OS specific part yourself"? Do you have an example?

     

    I think I am not the only one having this problem.

     

    Regards

     

    Jurgen

     

  • Monday, December 17, 2007 12:55 PMRamkrishna Pawar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    And what part of your code makes it link to that API ?

  • Monday, December 17, 2007 1:50 PMJurgenJ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Hello,

     

    My code is a simple dll (named xlstatcr1c.dll) that does link with the c++ libs mscvp90.dll and msvcr90.dll (and some other windows dlls, but they do not pose any problem).

     

    The link to mscvp90.dll is ok.

     

    dependency walker indicates a problem in msvcr90.dll that links with kernel32.dll.

    kernel32.dll has the color red and displays the message "At least one module has an unresolved import due to a missing export function in an implicitly dependent module."

     

    When I display the import information on kernel32.dll, I see in red the "GetSystemWindowsDirectoryW".

    The export information of kernel32.dll does not have an entry "GetSystemWindowsDirectoryW". There is only an entry named "GetSystemDirectoryW"

     

    Is there a way to have VS 2008 working on windows 98 SE?

  • Monday, December 17, 2007 4:19 PMGabriel Topala Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    The Windows 95, Windows 98, Windows ME, and Windows NT platforms are no longer supported. These operating systems have been removed from the list of targeted platforms.

    http://msdn2.microsoft.com/en-us/library/bb531344(VS.90).aspx

     

    Thanks,

    Gabriel Topala

    www.gtopala.com

     

     

  • Monday, December 17, 2007 4:59 PMJurgenJ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

     

    Thank you for the information. I read that Visual Studio will not support Windows 98 SE as platform.

     

    I still have customers that are using Windows 98, therefore I cannot migrate to Visual Studio 2008 before having found a work-around.

     

    Our code does not need the import that poses problem. I was looking for a work-around to have the problem fixed.

     

    - Is there a way to force the include to be ignored?

    - To supply a file that satisfies this include?

     

    I think I am not the only person with this problem.

     

    Regards

     

    Jurgen

  • Tuesday, August 26, 2008 12:36 AMmcb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    > Is there a work-around?

    Yes. My preferred workaround is the Legacy Extender library which you can link to and it will include the required functions to make the code work on Windows 9x/Me/NT4:

    Legacy Extender for Visual Studio 2005/2008 (www.legacyextender.com)

    You can build with Visual Studio 2008 (SP1 too) and the project will then run fine even on a vanilla Windows 95 box.

    Legacy Extender is not a quick patch, it is a supported and tested solution. It is compatible with code optimization, and it recalculates the checksum when you edit the post-build version.

    (Conflict of interest: I was involved in testing Legacy Extender!)
    • Proposed As Answer bymcb Tuesday, August 26, 2008 12:40 AM
    •  
  • Thursday, September 25, 2008 2:03 PMYodel Ing Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Legacy extender is interesting.  however, that solution only works if your project can use /mt or /mtd exclusively.  If you aredragging in all sorts of third-party libraries, you will inevitably have to build the whole thing against /md and /mdd, which meansdynamically linking against the vc++ runtimes, which, in turn, requires the vc++ 2008 redistributables.  legacy extender is acompile-time, link-time solution for static linking to the runtimes only.


    > Is there a [more complete] work-around?

    Apparently, yes.  someone appears to have created a 4MB installer of sorts for the vc++ 2008 redistributables for everything pre-windows2000.  i found about the solution here.  in my own tests, based heavily on the solution the openssl peeps have come up with,it appears to work regardless of compiler switches.  looking at the end result through dependency walker, everything appears toredirect the missing apis on older oses to unicows.dll and vc90hook.dll via a third dll that gets created by some tool calledpeproxy.  i have no idea how peproxy works behind the scenes to create a whole brand new dll but it is the coolest piece ofsoftware i've seen in a decade.  it looks like it could also be used as a general purpose hooking mechanism similar to detours.

    Whoever made this is a damn genius.  saved my day job too as i was the one who made the purchase decision for our companyto upgrade to vc++ 2008.
    • Proposed As Answer byYodel Ing Thursday, September 25, 2008 2:03 PM
    •