How does one go about taking ownership of a registry key using VB.NET 2008 *IF* one has only TakeOwnership privilege?

The problem is exactly as specified in MS KB Article ID: 111546 at:
http://support.microsoft.com/kb/111546/EN-US/

...except that I would like to know how to do it in VB.NET 2008

Any help would be much appreciated. Thanks!