1
Vote

unhandled InvalidOperationException: STAThread

description

I tried to crack a /CLI compiled MFC application that contains some WPF controls. And I get this exception:
 
An unhandled exception occured.
 
AppDomain: DefaultDomain
Process ID: 1644
Process Name: MyMFCApplication
Main Window Title: Main Dialog
Machine Name: .
IsTerminating: True
 
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.InvalidOperationException: Beim aufrufenden Thread muss es sich um einen STA-Thread handeln, da dies für viele Komponenten der Benutzeroberfläche erforderlich ist.
 
bei System.Windows.Input.InputManager..ctor()
bei System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
bei System.Windows.Input.InputManager.get_Current()
bei System.Windows.Input.KeyboardNavigation..ctor()
bei System.Windows.FrameworkElement.FrameworkServices..ctor()
bei System.Windows.FrameworkElement.EnsureFrameworkServices()
bei System.Windows.FrameworkElement..ctor()
bei System.Windows.Controls.Control..ctor()
bei System.Windows.Window..ctor()
bei CrackNET.InjectedViewer.View.Shell.InjectedWindow..ctor()
bei CrackNET.InjectedViewer.EntryPoint.InjectedMain()
--- Ende der internen Ausnahmestapelüberwachung ---
 
bei System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
bei System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei MessageHookProc(Int32 nCode, UInt32 wparam, Int32 lparam)
at XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
at XXXXXXXXXXXXX.CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  
at <Module>.MessageHookProc(Int32 nCode, UInt32 wparam, Int32 lparam)

comments