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. C / C++ / MFC
  4. win32 dll is not working for c# application.

win32 dll is not working for c# application.

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharp
7 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    Hi all, this error comes when i am using win32 dll in c# application. An unhandled exception of type 'System.BadImageFormatException' occurred in Test.exe Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) please help me for this. thanks in advance.

    C M 2 Replies Last reply
    0
    • L Le rner

      Hi all, this error comes when i am using win32 dll in c# application. An unhandled exception of type 'System.BadImageFormatException' occurred in Test.exe Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) please help me for this. thanks in advance.

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Please ask in the C# forum.

      Cédric Moonen Software developer
      Charting control [v3.0] OpenGL game tutorial in C++

      1 Reply Last reply
      0
      • L Le rner

        Hi all, this error comes when i am using win32 dll in c# application. An unhandled exception of type 'System.BadImageFormatException' occurred in Test.exe Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) please help me for this. thanks in advance.

        M Offline
        M Offline
        Malli_S
        wrote on last edited by
        #3

        Are you building both the binaries on the same platform? 32 bit or 64 bit ?

        [Delegates]      [Virtual Desktop]      [Tray Me !]
        -Malli...! :rose:****

        L 1 Reply Last reply
        0
        • M Malli_S

          Are you building both the binaries on the same platform? 32 bit or 64 bit ?

          [Delegates]      [Virtual Desktop]      [Tray Me !]
          -Malli...! :rose:****

          L Offline
          L Offline
          Le rner
          wrote on last edited by
          #4

          yes.

          M 1 Reply Last reply
          0
          • L Le rner

            yes.

            M Offline
            M Offline
            Malli_S
            wrote on last edited by
            #5

            Try this one, make your application run inside WoW64. For that go to the project properties, select the "build" tab and set the "platform target" to x86. FYI : Read this.[^]

            [Delegates]      [Virtual Desktop]      [Tray Me !]
            -Malli...! :rose:****

            L 1 Reply Last reply
            0
            • M Malli_S

              Try this one, make your application run inside WoW64. For that go to the project properties, select the "build" tab and set the "platform target" to x86. FYI : Read this.[^]

              [Delegates]      [Virtual Desktop]      [Tray Me !]
              -Malli...! :rose:****

              L Offline
              L Offline
              Le rner
              wrote on last edited by
              #6

              thanks,its working fine but its safe and secure for further use. is C# application work for all platform x86 and x64.

              M 1 Reply Last reply
              0
              • L Le rner

                thanks,its working fine but its safe and secure for further use. is C# application work for all platform x86 and x64.

                M Offline
                M Offline
                Malli_S
                wrote on last edited by
                #7

                It depends for which platform you are building.

                [Delegates]      [Virtual Desktop]      [Tray Me !]
                -Malli...! :rose:****

                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