content: '******************************************************
  'Registry Helper Functions
  '******************************************************
  Function RegRead(key, section=invalid, default=invalid)
      ' Reading from the registry is somewhat expensive, especially for keys that
      ' may be read repeatedly in a loop. We don't have that many keys anyway, keep
      ' a cache of our keys in memory.
  
      if section = invalid then section = "Default"
      cacheKey = key + section
      if m.RegistryCache.DoesExist(cacheKey) then return m.RegistryCache[cacheKey]
  
      value = default
      sec = CreateObject("roRegistrySection", section)
      if sec.Exists(key) then value = sec.Read(key)
  
      if value <> invalid then
          m.RegistryCache[cacheKey] = value
      end if
  
      return value
  End Function
  
  Function RegWrite(key, val, section=invalid)
      if section = invalid then section = "Default"
      sec = CreateObject("roRegistrySection", section)
      sec.Write(key, val)
      m.RegistryCache[key + section] = val
      sec.Flush() 'commit it
  End Function
  
  Function RegDelete(key, section=invalid)
      if section = invalid then section = "Default"
      sec = CreateObject("roRegistrySection", section)
      sec.Delete(key)
      m.RegistryCache.Delete(key + section)
      sec.Flush()
  End Function
  