Runtime support for both 32- and 64-bit apps on the same machine RRS feed

  • Question

  • I maintain a runtime library, basically a collection of DLLs, that up to now has supported 32-bit apps only.  When they run on 64-bit OSes, they of course run under WoW64.  The DLLs are in a hierarchy with the top one statically linked to the app and that one dynamically loads some of the others based on configuration information collected at runtime.  So far so good.  But now I have to support native 64-bit apps as well, and I need to be careful about how to organize the installed DLLs.  I can build both 32-bit and 64-bit DLLs, but I am looking for guidance on how/where to install them so that when a 32-bit app launches it finds the 32-bit version and when a 64-bit app launches it finds the 64-bit version.  Can someone point me to a good reference for that?  I confess to not being really clear on how WoW64 works, so a good reference on that would be good, too.
    Tuesday, April 27, 2010 2:22 PM

All replies

  • Greetings,

    A link is given below

    64-bit Applications

    Hope this helps

    Take Care


    Helping People To Solve Technical Problems
    Tuesday, April 27, 2010 4:18 PM
  • I certainly appreciate the try, but so far that hasn't shown me anything about how DLLs are found.  Also these are all native .exe and .dll (no .NET/CLR involved).  I'll click some more links and see if I stumble onto something useful.
    Tuesday, April 27, 2010 5:38 PM
  • In 64 bit systems, 32bit DLLs will be under Windows\SysWOW64 folder...64 bit dlls will be under Windows\System32.

    When your 64 bit application launches, it will search in System32 for dependent DLLs. 

    When your 32 bit application launches, DLL search will be redirected to SysWOW64 folder.

    So, if you can store 64bit DLL in System32 folder and 32 bit DLL in SysWOW64 folder you can achieve this.

    But its not preferred way to store your application DLL in System32 folder.


    Thursday, April 29, 2010 6:03 AM
  • Does 64-bit Windows follow the same rules about looking in the PATH if it can't find what it needs in Windows\System32 or Windows\SysWoW64?  If the DLL is not in either System32 or SysWoW64, are the different search priorities for 32- and 64-bit apps?  That "not preferred way" is the issue I'm concerned about.  In the simple 32-bit world, we store our DLLs in a folder and put that folder in the path.  I'd like to retain that for 32-bit support if possible, and to extend it in a logical way for 64-bit support.
    Thursday, April 29, 2010 10:48 PM