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#
  4. SEHException was unhandled External component has thrown an exception

SEHException was unhandled External component has thrown an exception

Scheduled Pinned Locked Moved C#
question
7 Posts 4 Posters 0 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.
  • X Offline
    X Offline
    Xelalem
    wrote on last edited by
    #1

    i was tring to write some data to the parallel port using inpout32.dll but i keep getting this exception SEHException was unhandled: External component has thrown an exception this is the code i used class PortAccess       {          [DllImport("inpout32.dll", EntryPoint = "Out32")]          public static extern void Output(int adress, int value);       } public void OUT() { PortAccess.Output(888, 1); } am i doing something wrong or wat?

    M D 2 Replies Last reply
    0
    • X Xelalem

      i was tring to write some data to the parallel port using inpout32.dll but i keep getting this exception SEHException was unhandled: External component has thrown an exception this is the code i used class PortAccess       {          [DllImport("inpout32.dll", EntryPoint = "Out32")]          public static extern void Output(int adress, int value);       } public void OUT() { PortAccess.Output(888, 1); } am i doing something wrong or wat?

      M Offline
      M Offline
      Migounette
      wrote on last edited by
      #2

      It may be several problems, but it appears to be an issue with the access of the library or the port. Which OS are you running ? More over add this to your main app in order to get the information, please update us. [STAThread] static void Main(string[] cmdLine) { try { Application.ThreadException += ApplicationThreadException; Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); ... } catch (Exception exception) { ... } finally { ... } }

      X 1 Reply Last reply
      0
      • M Migounette

        It may be several problems, but it appears to be an issue with the access of the library or the port. Which OS are you running ? More over add this to your main app in order to get the information, please update us. [STAThread] static void Main(string[] cmdLine) { try { Application.ThreadException += ApplicationThreadException; Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); ... } catch (Exception exception) { ... } finally { ... } }

        X Offline
        X Offline
        Xelalem
        wrote on last edited by
        #3

        tnx 4 ur reply.. I am using WindowsXp SP2. and i posted only   some part of the code, it is a windows form application on visiual studio 2008. i called the PortAccess.output function on a button click event. every thing works fine until i click the button

        M 1 Reply Last reply
        0
        • X Xelalem

          tnx 4 ur reply.. I am using WindowsXp SP2. and i posted only   some part of the code, it is a windows form application on visiual studio 2008. i called the PortAccess.output function on a button click event. every thing works fine until i click the button

          M Offline
          M Offline
          Migounette
          wrote on last edited by
          #4

          did you try to add the global exception catch and dump its message

          X 1 Reply Last reply
          0
          • M Migounette

            did you try to add the global exception catch and dump its message

            X Offline
            X Offline
            Xelalem
            wrote on last edited by
            #5

            thanks but i got the solution. i download the updated   INPOUT32.dll from http://www.logix4u.com and it worked

            G 1 Reply Last reply
            0
            • X Xelalem

              thanks but i got the solution. i download the updated   INPOUT32.dll from http://www.logix4u.com and it worked

              G Offline
              G Offline
              gsuspradeep
              wrote on last edited by
              #6

              pls provide the same DLL to me...

              1 Reply Last reply
              0
              • X Xelalem

                i was tring to write some data to the parallel port using inpout32.dll but i keep getting this exception SEHException was unhandled: External component has thrown an exception this is the code i used class PortAccess       {          [DllImport("inpout32.dll", EntryPoint = "Out32")]          public static extern void Output(int adress, int value);       } public void OUT() { PortAccess.Output(888, 1); } am i doing something wrong or wat?

                D Offline
                D Offline
                DavidKoganti
                wrote on last edited by
                #7

                THE SEHException is really nasty to debug. Because it comes from the COM. I was able to resolve this nasty bug only by uninstalling .NET 3.5 SP1 and reinstalling again. Because I use windows 7 I had to do this from my windows add/remove components section. Others suggestions like reseting IIS failed. VJ Koganti http://www.PrintersRose.com/

                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