Click here to Skip to main content
13,512,023 members
Click here to Skip to main content
Add your own
alternative version


9 bookmarked
Posted 9 Jul 2012

JumpTo RegEdit

, 9 Jul 2012
Rate this:
Please Sign up or sign in to vote.
This is an alternative for "JumpTo RegEdit"


This is just an alternate (VB.Net) version of "JumpTo RegEdit" located here:

This version is updated to VS 2008 and then Converted to VB.NET using the online code converter from here


I have been looking for a way to add the Reg Jump in VB.NET for several of my programs so I converted the C# code to VB.NET.

Using the code

The complete test project is in the download zip file.

There have been very few changes to the code from the original article besides the conversion to VB.Net.

Some of the lines converted from C# converterd to DirectCast and had a type conversion error so I changed them CType and it works fine.

C# code:

return Marshal.PtrToStringUni((IntPtr)(lpLocalBuffer.ToInt32() + Marshal.SizeOf(typeof(Interop.TVITEM))));

VB.NET code:

Change this in the converted code:

'Return Marshal.PtrToStringUni(DirectCast(lpLocalBuffer.ToInt32() + Marshal.SizeOf(GetType(Interop.TVITEM)), IntPtr))

To this:

Return Marshal.PtrToStringUni(CType(lpLocalBuffer.ToInt32() + Marshal.SizeOf(GetType(Interop.TVITEM)), IntPtr))

That was just one of a few lines that needed to be converted to CType.

When run under Windows Vista with UAC enabled it throws this error.

System.InvalidOperationException was unhandled
  Message="WaitForInputIdle failed.  This could be because the process does not have a graphical interface."

But when run as Admin it does not throw the error.

I added, ="requireAdministrator"

To get around the error in case a person forgets to "Run as Administrator"

Points of Interest

This conversion helped me learn more on using hte API functions and jumping to the Registry at a given point.

I hope it helps others.


Initial conversion 8 July 2012


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

CEO PC's Xcetra
United States United States
My first experience with computers was when my mom gave a Timex Sinclair 1000 to me for Christmas some time in the late 70's (I still have it)There I learned to copy code from magazines to save to cassette tapes for playing games.

Since then I have dabbled in:
Basic,Qbasic,ruby,python,Java Script, HTML, CSS, C#, C++, Perl, and a few other I can't think of off hand.
Now I Mainly work with VB Script and VB.Net
I Prefer to build programs that make use of the GUI so I don't have to remember all of the syntax for console apps. I realy don't care much for HTML because of the way you build and then run to see if it looks right. Also the new WPF is to much like HTML so I steer clear of it for now.
Most of what I build is for getting information from a system to use in system repair.I make heavy use of the WMI classes. Why reinvent something.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180417.1 | Last Updated 9 Jul 2012
Article Copyright 2012 by ledtech3
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid