![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Exception has been thrown by the target of an invocation Hi, I get the error, "Exception has been thrown by the target of an invocation", at the last line of code. Any idea why this happens and how to get it fixed? Type mySFunction = Type.GetTypeFromProgID("S- PLUS.rsi.em"); object splusObject = Activator.CreateInstance(mySFunction); object[] oArgs = new object[] { 33, 11, 56, 80 }; // Get error, "Exception has been thrown by the target of an invocation" splusObject.GetType().InvokeMember("x", System.Reflection.BindingFlags.SetProperty, null, splusObject, oArgs); |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Exception has been thrown by the target of an invocation There is no way for us to know what is wrong if we do not know what the called function does. Can you link us to the API or control that you are using, or at least describe the expected behavior? In an essence, the error message means that the method you called raised an exception. If in managed code, it could mean that the exception occurred in the class contructor. Hope this helps, -- Stanimir Stoyanov http://stoyanoff.info "Curious" <fir5tsight@xxxxxx> wrote in message news:93e89e5b-ed3b-4641-8c3a-a2da1cb1f0a8@xxxxxx Quote: > Hi, > > I get the error, "Exception has been thrown by the target of an > invocation", at the last line of code. > > Any idea why this happens and how to get it fixed? > > Type mySFunction = Type.GetTypeFromProgID("S- > PLUS.rsi.em"); > > object splusObject = > Activator.CreateInstance(mySFunction); > > object[] oArgs = new object[] { 33, 11, 56, 80 }; > > // Get error, "Exception has been thrown by the target > of an invocation" > splusObject.GetType().InvokeMember("x", > System.Reflection.BindingFlags.SetProperty, null, splusObject, oArgs); |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Calling WriteError causes PipelineStoppedException to be thrown | PowerShell | |||
| Help. Getting System.Web.HttpUnhandledException' was thrown. | .NET General | |||
| Exception stack is corrupt when catching and storing the exception | .NET General | |||
| Vista Install Error: Exception Unknown Software Exception | Vista installation & setup | |||
| Function names and invocation | PowerShell | |||