| 
                         Hezký den, mám problém s metodou "RegistryKey.GetValueNames" ve Visual Basic .NET 2005 Express Problém je následující: Ukázkový kód: 
        Dim regCU As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
        Dim Key As String = "Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist"
        Dim regKey As Microsoft.Win32.RegistryKey = regCU.OpenSubKey(Key, True)
        Dim KeysList As String(), i As Integer, NameList As String()
        Dim regKeyTemp As Microsoft.Win32.RegistryKey
        KeysList = regKey.GetSubKeyNames()
        For i = 0 To KeysList.Length - 1
            regKeyTemp = regCU.OpenSubKey(Key & "\" & KeysList(i) & "\Count", True)
            NameList = regKeyTemp.GetValueNames()
        Next
Při průchodu cyklem nastane chyba s názvem: "Jsou k dispozici další data" právě na řádku s kódem: "NameList = regKeyTemp.GetValueNames()" Výpis chyby: 
System.IO.IOException was unhandled
  Message="Jsou k dispozici další data.
"
  Source="mscorlib"
  StackTrace:
       v Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
       v Microsoft.Win32.RegistryKey.GetValueNames()
       v TempForTest.Form1.Button1_Click(Object sender, EventArgs e) v D:\_VBNETApplicacions\TempForTest\TempForTest\Form1.vb:řádek 12
       v System.Windows.Forms.Control.OnClick(EventArgs e)
       v System.Windows.Forms.Button.OnClick(EventArgs e)
       v System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       v System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       v System.Windows.Forms.Control.WndProc(Message& m)
       v System.Windows.Forms.ButtonBase.WndProc(Message& m)
       v System.Windows.Forms.Button.WndProc(Message& m)
       v System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       v System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       v System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       v System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       v System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       v System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       v System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       v System.Windows.Forms.Application.Run(ApplicationContext context)
       v Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       v Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       v Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       v TempForTest.My.MyApplication.Main(String[] Args) v 17d14f5c-a337-4978-8281-53493378c1071.vb:řádek 81
       v System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       v System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       v Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       v System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       v System.Threading.ThreadHelper.ThreadStart()
Jak se tohoto problému zbavit? Lze i jinak ve VB získat uvedené názvy hodnot? 
                        
                     |