Jump to content
Sign in to follow this  

Argument out of Range Error

Recommended Posts


Hi all,

I'm working with a listview on an external window that was not created by the AutoIt. I was able to get the values from it and store the values into an array. My problem now is that when I try to put the values in the array to the listview control, I encounter this error, can anyone help me on this? Thanks.

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.ArgumentOutOfRangeException: InvalidArgument=Value of '0' is not valid for 'index'.

Parameter name: index

at System.Windows.Forms.ListView.ListViewItemCollection.get_Item(Int32 index)

at System.Windows.Forms.ListView.SelectedListViewItemCollection.get_Item(Int32 index)

at ResourceUpdatingManager.MainForm.ComputersList_SelectedIndexChanged(Object sender, EventArgs e)

at System.Windows.Forms.ListView.onselectedIndexChanged(EventArgs e)

at System.Windows.Forms.ListView.WmReflectNotify(Message& m)

at System.Windows.Forms.ListView.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************


Assembly Version:

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll



Assembly Version:

Win32 Version:

CodeBase: file:///C:/Program%20Files/Common%20Files/Aelita%20Shared/Migration%20Tools/Resource%20Updating/QsResourceUpdatingManager.exe



Assembly Version:

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/



Assembly Version:

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/



Assembly Version:

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/



Assembly Version:

Win32 Version:

CodeBase: file:///C:/Program%20Files/Common%20Files/Aelita%20Shared/Migration%20Tools/Resource%20Updating/Interop.ResourceUpdatingEngineLib.DLL


************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging


For example:


<system.windows.forms jitDebugging="true" />


When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.