[API]
RegSetValueExA
RegSetValueExW

[CODE]
Public Sub RegSetValueEx_String(ByVal HKEY As Long, ByVal lpValueName As String, ByVal lpString As String)
  Dim xLong1 As Long
  
  xLong1 = Len(lpString) + 1&
  If IsUnicode Then
    Call RegSetValueExW(HKEY, StrPtr(lpValueName), 0&, 1&, ByVal StrPtr(lpString), xLong1 * 2&)
    Else
    Call RegSetValueExA(HKEY, lpValueName, 0&, 1&, ByVal lpString, xLong1)
    End If
  End Sub
