[API]
RegOpenKeyExA
RegOpenKeyExW
Public RegCloseKey

[CODE]
Public Function RegOpenKeyEx(ByVal HKEY As Long, ByVal lpSubKey As String, ByVal samDesired As Long, ByRef phkResult As Long) As Boolean
  If IsUnicode Then
    RegOpenKeyEx = (RegOpenKeyExW(HKEY, StrPtr(lpSubKey), 0&, samDesired, phkResult) = 0&)
    Else
    RegOpenKeyEx = (RegOpenKeyExA(HKEY, lpSubKey, 0&, 0&, phkResult) = 0&)
    End If
  End Function
