Managed C++

Discussion in 'Windows 64bit' started by =?Utf-8?B?U3RldmVu?=, Oct 2, 2005.

  1. I was wondering if there is a catch when you use a win32 compiled Managed C++
    asssembly on XP 64bit. (2.0 Framework)

    My app runs on 32 bit systems fine! But it says that there is a
    BadImageFormatException when I try to run it on XP 64bit. It doesn't matter
    if the application is compiled for an x64 system or the standard 'mixed
    platforms'.

    I realize I am basically saying, "It doesn't work." Therefore, I am
    specifically asking if you can use a win32 Managed C++ assembly on XP 64bit.
    I didn't see an option to compile a Managed C++ project for x64.
     
    =?Utf-8?B?U3RldmVu?=, Oct 2, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U3RldmVu?=

    James Park Guest

    http://blogs.msdn.com/joshwil/archive/2005/04/08/406567.aspx

    "Steven" <> wrote in message
    news:D...
    >I was wondering if there is a catch when you use a win32 compiled Managed
    >C++
    > asssembly on XP 64bit. (2.0 Framework)
    >
    > My app runs on 32 bit systems fine! But it says that there is a
    > BadImageFormatException when I try to run it on XP 64bit. It doesn't
    > matter
    > if the application is compiled for an x64 system or the standard 'mixed
    > platforms'.
    >
    > I realize I am basically saying, "It doesn't work." Therefore, I am
    > specifically asking if you can use a win32 Managed C++ assembly on XP
    > 64bit.
    > I didn't see an option to compile a Managed C++ project for x64.
     
    James Park, Oct 3, 2005
    #2
    1. Advertising

  3. Hi,

    Do you have the same version of the dot net framework 2.0
    installed on both computers? By that I mean beta 1, 2, a ctp, or rc not 32
    or 64bit versions.

    Ken
    -----------
    "Steven" <> wrote in message
    news:D...
    >I was wondering if there is a catch when you use a win32 compiled Managed
    >C++
    > asssembly on XP 64bit. (2.0 Framework)
    >
    > My app runs on 32 bit systems fine! But it says that there is a
    > BadImageFormatException when I try to run it on XP 64bit. It doesn't
    > matter
    > if the application is compiled for an x64 system or the standard 'mixed
    > platforms'.
    >
    > I realize I am basically saying, "It doesn't work." Therefore, I am
    > specifically asking if you can use a win32 Managed C++ assembly on XP
    > 64bit.
    > I didn't see an option to compile a Managed C++ project for x64.
     
    Ken Tucker [MVP], Oct 3, 2005
    #3
  4. =?Utf-8?B?U3RldmVu?=

    Tim Guest

    OP:

    Before you compiled for X64 did you create a new configuration for the
    project and copy it from an existing one? This seems to be an important step
    as often people change a setting here or there to create a new config for EG
    Managed code and forget some of the other switches. The switches are
    supposed to cross check each other, but this did not always seem to work
    100%.

    This was certainly the case with Beta 2. The latest RC version seems to have
    fixed the BIFE's I was getting for other reasons (excessively large image
    being generated - 36 mb!).

    I suggest if you have difficulty on this front you plod on over to the VC
    Technical Forums...

    http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=29

    Regards,
    - Tim



    "Ken Tucker [MVP]" <> wrote in message
    news:...
    > Hi,
    >
    > Do you have the same version of the dot net framework 2.0
    > installed on both computers? By that I mean beta 1, 2, a ctp, or rc not
    > 32 or 64bit versions.
    >
    > Ken
    > -----------
    > "Steven" <> wrote in message
    > news:D...
    >>I was wondering if there is a catch when you use a win32 compiled Managed
    >>C++
    >> asssembly on XP 64bit. (2.0 Framework)
    >>
    >> My app runs on 32 bit systems fine! But it says that there is a
    >> BadImageFormatException when I try to run it on XP 64bit. It doesn't
    >> matter
    >> if the application is compiled for an x64 system or the standard 'mixed
    >> platforms'.
    >>
    >> I realize I am basically saying, "It doesn't work." Therefore, I am
    >> specifically asking if you can use a win32 Managed C++ assembly on XP
    >> 64bit.
    >> I didn't see an option to compile a Managed C++ project for x64.

    >
    >
     
    Tim, Oct 3, 2005
    #4
  5. I don't even see an option to compile the Managed C++ project for anything
    but Win32. I have been told I won't be able to compile for x64 until the
    actual VS release. I don't know if that is true or not.

    That doesn't explain why the normal 32 bit build won't work. I would have
    thought it would run just be like every other 32 bit program that runs on 64
    bit.

    "Steven" wrote:

    > I was wondering if there is a catch when you use a win32 compiled Managed C++
    > asssembly on XP 64bit. (2.0 Framework)
    >
    > My app runs on 32 bit systems fine! But it says that there is a
    > BadImageFormatException when I try to run it on XP 64bit. It doesn't matter
    > if the application is compiled for an x64 system or the standard 'mixed
    > platforms'.
    >
    > I realize I am basically saying, "It doesn't work." Therefore, I am
    > specifically asking if you can use a win32 Managed C++ assembly on XP 64bit.
    > I didn't see an option to compile a Managed C++ project for x64.
     
    =?Utf-8?B?U3RldmVu?=, Oct 5, 2005
    #5
  6. =?Utf-8?B?U3RldmVu?=

    James Park Guest

    If you are using /clr:safe, the compiled exe will be platform-independent,
    meaning it will run as 32-bit on x86 and as 64-bit on x64 . If you are
    dependent on a 32-bit dll, it will work fine on x86 because the app will run
    as 32-bit, but will throw a BIFE if you run it on x64 (can't mix "bitness").

    On another topic, VC++ 2005 can already compile for x64 unless you are using
    the Express beta. I think I had read that it would be added in the release
    version but later read that it wouldn't be. I guess we'll find out in about
    a month.

    "Steven" <> wrote in message
    news:D...
    >I don't even see an option to compile the Managed C++ project for anything
    > but Win32. I have been told I won't be able to compile for x64 until the
    > actual VS release. I don't know if that is true or not.
    >
    > That doesn't explain why the normal 32 bit build won't work. I would have
    > thought it would run just be like every other 32 bit program that runs on
    > 64
    > bit.
    >
    > "Steven" wrote:
    >
    >> I was wondering if there is a catch when you use a win32 compiled Managed
    >> C++
    >> asssembly on XP 64bit. (2.0 Framework)
    >>
    >> My app runs on 32 bit systems fine! But it says that there is a
    >> BadImageFormatException when I try to run it on XP 64bit. It doesn't
    >> matter
    >> if the application is compiled for an x64 system or the standard 'mixed
    >> platforms'.
    >>
    >> I realize I am basically saying, "It doesn't work." Therefore, I am
    >> specifically asking if you can use a win32 Managed C++ assembly on XP
    >> 64bit.
    >> I didn't see an option to compile a Managed C++ project for x64.
     
    James Park, Oct 5, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alp
    Replies:
    0
    Views:
    539
  2. SpiritBoy

    Inexpensive access points that can be centrally managed

    SpiritBoy, Mar 31, 2005, in forum: Wireless Networking
    Replies:
    0
    Views:
    522
    SpiritBoy
    Mar 31, 2005
  3. hairbrash

    Cisco 837 Managed Ethernet?

    hairbrash, Apr 15, 2004, in forum: Cisco
    Replies:
    7
    Views:
    3,382
    hairbrash
    Apr 17, 2004
  4. Ned Hart
    Replies:
    5
    Views:
    540
    Farouq Taj
    May 13, 2004
  5. xlr8
    Replies:
    1
    Views:
    588
    Russell Lusignan
    Aug 19, 2004
Loading...

Share This Page