how to "as any" for RegQueryValueEx WinAPI call?

  • Thread starter Thread starter cgchris99
  • Start date Start date
C

cgchris99

Guest
I am trying to use RegQueryValueEx API call. I have the example that works in VB6.

My example has it defined as follows...
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long

Notice lpData as Any, VB.Net does not allow this. So, how do I make this work?

Thanks for any help
 
Either change Any to the type you actually want, or, use the fully-featured .NET registry classes under the Microsoft.Win32 namespace. :)
 

Similar threads

Back
Top