In the code below the regsetvalueex call results in an access viol error. Any guesses on the problem will be appreciated?
use dfwin
implicit none
integer hKey , hNewOrOld, pathLen
integer(LONG) retval
character(100) path
retVal=RegCreateKeyEx(HKEY_CURRENT_USER, &
'Environment'C, 0,'REG_SZ'C, &
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, &
NULL, loc(hKey), &
loc(hNewOrOld))
path='c:\hh'
pathLen=len_trim(path)+1
path(pathLen:pathLen)=char(0)
retVal=RegSetValueEx(hKey, 'HedgeHog'C, 0, &
REG_SZ, loc(path), loc(pathLen))
retVal=RegCloseKey(hKey)
Simple RegSetValue question
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.




