Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RegEnumValue from WinApi32 function call
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00562037
Message ID:
00562108
Views:
19
>>>>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform