locked
Difference between DssHost.exe and DssHost32.exe? RRS feed

  • Question

  • Dogulas wrote:

    I never did figure out what the difference was between DssHost.exe
    and DssHost32.exe, nor why the "Run DSS Node" shortcut runs
    DssHost32.exe, while the default value for the "Debug: Start
    external program: property runs DssHost.exe.
    
    http://social.msdn.microsoft.com/Forums/en-US/roboticsdss/thread/f2acef59-470f-480d-a33a-2d7dd02ce8b5
    
    If one of these is incorrect, could that be fixed for the next release?
    
    Thanks,
    Dogulas
    


    Edward AE wrote:

    I was under the impression that 'DssHost32.exe' was included to allow development on 64-bit systems...
    
    



    Edward AE,

    That rings a bell, but if that were true, why would my "out of the box" 32-bit system installation run DssHost32.exe from the "Run DSS Node" shortcut off the Start menu?  For that matter, why does it work on my 32-bit system?

    Thanks,
    Dogulas

    Monday, September 14, 2009 4:47 PM

Answers

  • The problem is that on a 64-bit system each time you start a new process it makes it either a 32-bit or 64-bit process. The type of process is determined by the attributes of the executable, i.e. you cannot switch it after the exe has started running. If you start a 64-bit process, it cannot load 32-bit DLLs, which the Simulator needs.

    So DssHost32.exe was invented as a way to run simulations in a 32-bit process on a 64-bit system.

    If you are on a 32-bit system, then DssHost and DssHost32 operate exactly the same.

    There is perhaps an inconsistency between the "Run DSS Node" start menu item and the Debug properties in some samples. However, it will only "bite" you if you try to run a simulation. I think you will find that all of the Simulation Tutorials have DssHost32 in their Debug properties. If this is not the case, please let me know.

    Trevor
    Tuesday, September 15, 2009 2:33 AM

All replies


  • Hi Dogulas,

    I've taken the following quote from Trevor Taylor's Pro MRDS website: "http://www.promrds.com/"

    "In previous versions of RDS, simulation was not supported on 64-bit operating systems. (The problem is actually in XNA). In RDS 2008 Microsoft  shipped a new version of DssHost.exe called DssHost32.exe. This allows the Simulator to be run in a 32-bit environment so it is now possible to use the Simulator on 64-bit operating systems."

    I'm thinking that Microsoft were a little smart about it and decided that it would be easier just to package DssHost for 32 and 64 bit into one executable which checks the operating system before getting into it's work. Avoids confusion with multiple executables, even though DssHost.exe still seems to come in the package as well...


    p.s. I would highly recommend the 'ProMRDS' text, good as a starting point (for understanding the foundations) as well as an ongoing reference and source of quality sample code.


    AE.


    • Edited by Edward AE Tuesday, September 15, 2009 2:24 AM Formatting!
    Tuesday, September 15, 2009 2:23 AM
  • The problem is that on a 64-bit system each time you start a new process it makes it either a 32-bit or 64-bit process. The type of process is determined by the attributes of the executable, i.e. you cannot switch it after the exe has started running. If you start a 64-bit process, it cannot load 32-bit DLLs, which the Simulator needs.

    So DssHost32.exe was invented as a way to run simulations in a 32-bit process on a 64-bit system.

    If you are on a 32-bit system, then DssHost and DssHost32 operate exactly the same.

    There is perhaps an inconsistency between the "Run DSS Node" start menu item and the Debug properties in some samples. However, it will only "bite" you if you try to run a simulation. I think you will find that all of the Simulation Tutorials have DssHost32 in their Debug properties. If this is not the case, please let me know.

    Trevor
    Tuesday, September 15, 2009 2:33 AM
  • Edward AE and Trevor,

    Thank you both for the great feedback.

    Edward, that makes perfect sense.  Thanks for clearing up the difference.  By the way, I have Kyle and Trevor's book Pro MRDS and I agree that it is a great resource.  I didn't think to check the website.

    Trevor, Thanks for the detailed explanation.  It now make sense looking at it historically.  I have not been using the simulation environment, so I haven't been bitten, but where I am seeing the issue is now I have to keep DssHost.exe.config and DssHost32.exe.config synchronized in order to get consistant behavior.

    From what you describe, could you make all applications simply use DssHost32 in the upcomming release?

    Thanks,
    Dogulas

    Tuesday, September 15, 2009 1:22 PM
  • Forcing everything to run using DssHost32 is not a good idea because you would lose the benefit of a 64-bit OS in situations where you did not run 32-bit DLLs. It's a bit of a "Catch 22". If we make all the samples use DssHost32, people who do not know any better will wonder why their 64-bit services don't run as fast or have as large an address space as they should. I think the best we can do is try to document it a bit better.

    Trevor

    Sunday, September 20, 2009 1:45 AM
  • Trevor,

    Thanks for the detailed explanation.  It now makes sense.  I was wondering would it be possible to have both executables use the same config file.  I know that would break naming conventions, but it would help with synchronicity.

    Thanks,
    Dogulas
    Sunday, September 20, 2009 2:50 PM