Information générale
Catégorie:
Fonctions Windows API
>>>>Hello, all
>>>> I'm testing a program to make sure it works in Win 2000 and NT. while testing i stumbled onto a problem with the RegEnumValue function call. This call is supposed to access the registry and pull the exe command of another program. The second program will not be installed the same on all PC's. I keep getting an error code of 87. I've found some info on this but the info only CRASHED the program. the call and code are as follows:
>>>>
>>>>
>>>>Declare Integer RegEnumValue IN WIN32API;
>>>> Integer hKey, Integer iValue, String @Valname, Integer @Vallength, ;
>>>> Integer @lpdwReserved, Integer @lpdwType, String @lpbData, Integer @lpcbData
>>>>
>>>>
>>>>retval = RegEnumValue(hKey, xindex, @valuename, @valuelen, @lpdwReserved, @dataType, @indata, @datalen)
>>>>
>>>>
>>>>What needs to be different in order to get this to work for Win NT/2k ?
>>>
>>>The declaration is correct, but you should be passing zero for the reserved parameter since it must be null. For example,
>>>
>>>retval = RegEnumValue(hKey, xindex, @valuename, @valuelen, 0, @dataType, @indata, @datalen)
>>
>>Thanks for the INFO, however 0 is being passed and i'm still getting error code 87!! I have evan tried using JUST 0 but i get the same error code. any other suggestions?
>
>It's hard to make other suggestions without seeing what the actual parameters are. Could you post them?
hKey = 0
retval = RegOpenKey(HKEY_CLASSES_ROOT, "Minitab.mpj\shell\open\command", @hKey)
valuename = Space(255)
valuelen = 255
STORE 0 TO lpdwReserved,dataType, xindex
Store Space(255) to indata
datalen = Len(indata)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement