Abaixo tem uma rotina que você pode gravar com o nome de Registry.prg e usá-la, mas tem alguns ajustes a serem feitos nela para o seu caso.
Tem um exemplo abaixo como usar, mas o mesmo só permite usar String, que é o mesmo problema que você tem no o Registry.VCX, mas vou marcar os locais que você deve observar e fazer o ajuste que você precisa, OK?
Ao chamar este PRG você vai passar o caminho todo para o registro, mas se você observar as áreas que vou deixar em vermelho verás que dá para melhorar isso.
Estou sem tempo para melhorar esta rotina, porque eu quero fazer algo melhorado nela, mas nela tem o caminho que você precisa... Abraços.
* Program: REGISTRY.PRG
* Created: 10/19/2004
* Developer: Greg Reichert
* Copyright: public domain 2004 GLR software
*------------------------------------------------------------
* Description: Read and write to registry in Name / Value pair method.
* Parameters: tKey, req, d="", Registry key.
* tValue, opt, d="", value to write to key.
* Return: Value from key.
* Syntax:
* Set Value:
* Registry( "HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualFoxPro\MyKey", "myValue" )
*
* Get Value:
* lcValue = Registry( "HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualFoxPro\MyKey" )
*------------------------------------------------------------
* Id Date By Description
* 1 08/27/2002 Greg Reichert Initial Creation
*
*------------------------------------------------------------
LPARAMETERS tKey, tValue
LOCAL lcTemp
lcTemp = _Registry("GET", tKey)
IF EMPTY(lcTemp)
_Registry("SET", tKey, TRANSFORM(tValue))
lcTemp = _Registry("GET", tKey)
ENDIF
RETURN lcTemp
*------------------------------------------------------------
* Description: Get / Set Registry
* Parameters: <para>, <req/opt>, D=<def>, <desc>
* Return:
* Use:
*------------------------------------------------------------
* Id Date By Description
* 1 04/12/2002 Greg Reichert Initial Creation
*
*------------------------------------------------------------
PROCEDURE _Registry
LPARAMETERS tAction, tKey, tValue
* Registry roots
HKEY_CLASSES_ROOT = -2147483648 && BITSET(0,31)
HKEY_CURRENT_USER = -2147483647 && BITSET(0,31)+1
HKEY_LOCAL_MACHINE = -2147483646 && BITSET(0,31)+2
HKEY_USERS = -2147483645 && BITSET(0,31)+3
#DEFINE REG_SZ 1 && Data string
#DEFINE REG_BINARY 3 && Binary data in any form.
#DEFINE REG_DWORD 4 && A 32-bit number.
DECLARE Integer RegCreateKey IN Win32API ;
Integer nHKey, String @cSubKey, Integer @nResult
DECLARE INTEGER RegOpenKey IN Win32API ;
INTEGER nHKey, STRING @cSubKey, INTEGER @nResult
DECLARE INTEGER RegCloseKey IN Win32API ;
INTEGER nHKey
DECLARE INTEGER RegQueryValueEx IN Win32API ;
INTEGER nHKey, STRING lpszValueName, INTEGER dwReserved,;
INTEGER @lpdwType, STRING @lpbData, INTEGER @lpcbData
DECLARE Integer RegSetValueEx IN Win32API ;
Integer hKey, String lpszValueName, Integer dwReserved,;
Integer fdwType, String lpbData, Integer cbData
*--------------------------------------------
* parse cKey
*--------------------------------------------
LOCAL hKey, cKey, cData
hKey = LEFT( tkey, AT("\", tKey)-1)
tKey = SUBSTR( tKey, AT("\",tKey)+1)
cKey = LEFT( tKey, RAT("\",tKey)-1)
tKey = SUBSTR( tKey, RAT("\",tKey)+1)
cData = tKey
LOCAL nCurrentKey,nErrCode
nCurrentKey = 0
nErrCode = RegOpenKey(&hKey,cKey,@nCurrentKey)
IF nErrCode>0
nErrCode = RegCreateKey(&hKey,cKey,@nCurrentKey)
ENDIF
LOCAL lpdwReserved,lpdwType,lpbData,lpcbData,nErrCode
STORE 0 TO lpdwReserved,lpdwType
STORE SPACE(256) TO lpbData
STORE LEN(m.lpbData) TO m.lpcbData
DO case
CASE UPPER(ALLTRIM(tAction))="GET"
m.nErrCode=RegQueryValueEx(nCurrentKey,cData, m.lpdwReserved,@lpdwType,@lpbData,@lpcbData)
m.cKeyValue = LEFT(m.lpbData,m.lpcbData-1)
CASE UPPER(ALLTRIM(tAction))="SET"
* Make sure we null terminate this guy
lpcbData = TRANSFORM(m.tValue)+CHR(0)
nValueSize = LEN(m.lpcbData)
* Set the key value here
m.nErrCode = RegSetValueEx(nCurrentKey,m.cData,0,;
REG_SZ,m.lpcbData ,m.nValueSize)
cKeyValue = m.nErrCode=0
ENDCASE
=RegCloseKey(nCurrentKey)
#IF VERSION(5)>=700
CLEAR DLLS RegCreateKey
CLEAR DLLS RegOpenKey
CLEAR DLLS RegCloseKey
CLEAR DLLS RegQueryValueEx
CLEAR DLLS RegSetValueEx
#ENDIF
RETURN cKeyValue