George:
I passed it both with and without an @ preceding my variable.
code changes follow:
DECLARE Integer RegSetValueEx IN Win32API ;
Integer hKey, String lpszValueName, Integer dwReserved,;
Integer fdwType, Integer lpbData, Integer cbData
PROCEDURE SetKeyValue
* This routine sets a key value
* Note: this routine only handles data strings (REG_SZ)
LPARAMETER cValueName,cValue
LOCAL nValueSize,nErrCode
*!* DO CASE
*!* CASE TYPE("THIS.nCurrentKey")#'N' OR THIS.nCurrentKey = 0
*!* RETURN ERROR_BADKEY
*!* CASE TYPE("m.cValueName") #"C" OR TYPE("m.cValue")#"C"
*!* RETURN ERROR_BADPARM
*!* CASE EMPTY(m.cValueName) OR EMPTY(m.cValue)
*!* RETURN ERROR_BADPARM
*!* ENDCASE
* Make sure we null terminate this guy
*!* cValue = m.cValue+CHR(0)
*!* nValueSize = LEN(m.cValue)
m.nValueSize = 1
set step on
* Set the key value here
*!* m.nErrCode = RegSetValueEx(THIS.nCurrentKey,m.cValueName,0,;
*!* REG_DWORD,m.cValue,m.nValueSize)
*!* m.nErrCode = RegSetValueEx(THIS.nCurrentKey,m.cValueName,0,;
*!* REG_DWORD,@m.cValue,m.nValueSize)
m.nErrCode = RegSetValueEx(THIS.nCurrentKey,m.cValueName,0,;
REG_DWORD,0x1,1)
set step on
* Check for error
IF m.nErrCode # ERROR_SUCCESS
RETURN m.nErrCode
ENDIF
RETURN ERROR_SUCCESS
ENDPROC
Any ideas?
Mike