SEHException was unhandled External component has thrown an exception
-
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?
-
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?
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 { ... } }
-
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 { ... } }
-
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
did you try to add the global exception catch and dump its message
-
did you try to add the global exception catch and dump its message
thanks but i got the solution. i download the updated INPOUT32.dll from http://www.logix4u.com and it worked
-
thanks but i got the solution. i download the updated INPOUT32.dll from http://www.logix4u.com and it worked
pls provide the same DLL to me...
-
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?
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/