Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RegEnumValue from WinApi32 function call
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00562037
Message ID:
00562044
Vues:
25
>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)
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform