Thomas-Clark / netprofiles

Automatically exported from code.google.com/p/netprofiles
0 stars 0 forks source link

FileNotFoundException #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open for the first time
2. I got a File Not Found Exception!
3. I click continue and everithing is blank
4. I tried to click "reload interfaces" and i get the same error

What version of the product are you using? On what operating system?
1.2.6 on Vista SP1

Please provide any additional information below.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: 
   at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo)
   at
System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext
()
   at Net_Profiles.Globals.GetInterfaceName(String ThisInterface)
   at Net_Profiles.Globals.PopulateNetworkCardArray()
   at
Net_Profiles.MainForm.ReloadNetworkInterfacesToolStripMenuItemClick(Object
sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.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 **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
    CodeBase:
file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Net Profiles
    Assembly Version: 1.0.3421.15076
    Win32 Version: 1.0.3421.15076
    CodeBase: file:///C:/Program%20Files/Net%20Profiles/Net%20Profiles.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d5
0a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e
089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/Sy
stem.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c5619
34e089/System.Runtime.Remoting.dll
----------------------------------------
MessageBoxHook
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/Net%20Profiles/MessageBoxHook.DLL
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.3053
    Win32 Version: 8.00.50727.3053
    CodeBase:
file:///C:/Windows/WinSxS/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.3053
_none_d08d7bba442a9b36/msvcm80.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System
.Xml.dll
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a
/System.Management.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
enabled.

For example:

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

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.

Original issue reported on code.google.com by miguelmc...@gmail.com on 15 May 2009 at 9:36

GoogleCodeExporter commented 9 years ago
I download the source and while debuging with VS 2008

Public Function GetInterfaceName(ThisInterface As String) As String
        Try
            Dim searcher As New ManagementObjectSearcher( _
                "root\CIMV2", _
                "SELECT * FROM Win32_NetworkAdapter WHERE MACAddress = '" &
ThisInterface.Replace("-",":") & "'") 
'
            For Each queryObj As ManagementObject in searcher.Get()
                Application.DoEvents
                Return queryObj("NetConnectionID")  <<<<<----- This is where FileNotFound fires
off :P
            Next
        Catch err As ManagementException
            Return ""
        End Try
    End Function

Original comment by miguelmc...@gmail.com on 15 May 2009 at 9:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
"SELECT * FROM Win32_NetworkAdapter ....

Win32_NetworkAdapterConfiguration maybe?

Original comment by miguelmc...@gmail.com on 15 May 2009 at 10:54