Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reads & Writes to Win95 Registry
Message
De
29/01/1999 16:12:01
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Reads & Writes to Win95 Registry
Divers
Thread ID:
00182021
Message ID:
00182021
Vues:
40
Greetings All,

I need to be able to select a list of printers from the registry, let the user select a new default printer, and write the value back to the registry. I have found a foundation class (registry.prg) that shipped with VFP 6.0, but I am having a difficult time getting it to work.

My associate here uses Powerbuilder and he was able to get it to work in PB, so I am trying to follow his code so I can use VFP.

Below is my first step.
The "HKEY_CURRENT" phrase is the path in the registry of the printers.

regfile = HOME(2)+"classes\registry.prg"
oReg = NewObject("FoxReg",m.regfile)

dimension aFoxOptions[1,2]

cVal = oReg.GetKeyValue; ("HKEY_CURRENT_CONFIG\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS",@aFoxOptions)

Can anyone point me in the right direction?

Thanks in advance.

Scott
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform