Access Violation Exception while trying to set value for a custom control (Textbox with auto suggestion list in .net windows forms)
Hi I'm trying to set value for a custom control. Control is a textbox in windows forms, but has the feature of auto suggestion list (Like Ajax auto complete extender). User can type for matching item or click on dropdown to select an item from the list.
Below are the error details.
---------------------------
Information
---------------------------
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OpenSpan.Interop.UtilitiesInterop.ExecuteSetForegroundWindow(IntPtr hWnd, Boolean& pResult)
at OpenSpan.Interop.SystemsInterop.SetForegroundWindow(IntPtr hwnd)
at OpenSpan.Adapters.Windows.WindowHelper.SetForegroundWindow(IntPtr hwnd)
at OpenSpan.Adapters.Windows.Window.SetForegroundWindow()
at OpenSpan.Adapters.Windows.Window.SendKeys(String keys, Boolean focus)
at OpenSpan.Adapters.Virtual.VirtualTargets.VirtualControl.SendKeys(String keys, Boolean focus)
at OpenSpan.Adapters.Controls.Control.SendKeys(String keys, Boolean focus)
---------------------------
OK
---------------------------
Finally it ends up showing error.
Hi I'm trying to set value for a custom control. Control is a textbox in windows forms, but has the feature of auto suggestion list (Like Ajax auto complete extender). User can type for matching item or click on dropdown to select an item from the list.
Below are the error details.
---------------------------
Information
---------------------------
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OpenSpan.Interop.UtilitiesInterop.ExecuteSetForegroundWindow(IntPtr hWnd, Boolean& pResult)
at OpenSpan.Interop.SystemsInterop.SetForegroundWindow(IntPtr hwnd)
at OpenSpan.Adapters.Windows.WindowHelper.SetForegroundWindow(IntPtr hwnd)
at OpenSpan.Adapters.Windows.Window.SetForegroundWindow()
at OpenSpan.Adapters.Windows.Window.SendKeys(String keys, Boolean focus)
at OpenSpan.Adapters.Virtual.VirtualTargets.VirtualControl.SendKeys(String keys, Boolean focus)
at OpenSpan.Adapters.Controls.Control.SendKeys(String keys, Boolean focus)
---------------------------
OK
---------------------------
Finally it ends up showing error.
System.ApplicationException: Unwind was called for AutomationId: Automator-8D59A605D9C2B7B LinkPartID: Automator-8D59A605D9C2B7B, but AutomationId: Automator-8D59A605D9C2B7B LinkPartID: 1193 tops the stack.
I'm using windows 7 OS.
Please suggest the root cause and resolution.