Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. dotNET 2.0 application failing under Vista

dotNET 2.0 application failing under Vista

Scheduled Pinned Locked Moved Windows API
csharpvisual-studiohelp
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ScruffyDuck
    wrote on last edited by
    #1

    I have an application that is developed using Visual Studio 2005 under Windows XP SP2. In fact there are several applications using a DLL developed under the same IDE etc. The applications load (i.e the executable runs I presume in compatibility mode) but it seems that the first call into the DLL fails the first few lines of the exception thrown are: ************** Exception Text ************** System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) at ScruffyDuck.Flightsim.Scenery.SceneryFile.SceneryFile..ctor(String filename, FileType fileType) at Bgl2Xml.Form1.goButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) I do not have Vista and have no idea where to start on this. The problem has been confirmed by two users. These applications work fine under XP. I have no unsafe code as far as I know everything is managed. Any pointers would be much appreciated.

    Jon

    V 1 Reply Last reply
    0
    • S ScruffyDuck

      I have an application that is developed using Visual Studio 2005 under Windows XP SP2. In fact there are several applications using a DLL developed under the same IDE etc. The applications load (i.e the executable runs I presume in compatibility mode) but it seems that the first call into the DLL fails the first few lines of the exception thrown are: ************** Exception Text ************** System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) at ScruffyDuck.Flightsim.Scenery.SceneryFile.SceneryFile..ctor(String filename, FileType fileType) at Bgl2Xml.Form1.goButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) I do not have Vista and have no idea where to start on this. The problem has been confirmed by two users. These applications work fine under XP. I have no unsafe code as far as I know everything is managed. Any pointers would be much appreciated.

      Jon

      V Offline
      V Offline
      Vega02
      wrote on last edited by
      #2

      Did some quick searching.. are these problems cropping up on 64-bit Vista? If so, try specifying in the IDE that your application should always be compiled to 32-bit. See here for more info: http://www.nabble.com/BadImageFormatException-in-vista-64-t3341669.html[^] http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=665884&SiteID=1[^]

      S 1 Reply Last reply
      0
      • V Vega02

        Did some quick searching.. are these problems cropping up on 64-bit Vista? If so, try specifying in the IDE that your application should always be compiled to 32-bit. See here for more info: http://www.nabble.com/BadImageFormatException-in-vista-64-t3341669.html[^] http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=665884&SiteID=1[^]

        S Offline
        S Offline
        ScruffyDuck
        wrote on last edited by
        #3

        Thank you very much - that did the trick. One of my testers can now run the program on Vista 64bit

        Jon

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups