Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reads & Writes to Win95 Registry
Message
From
29/01/1999 16:12:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Reads & Writes to Win95 Registry
Miscellaneous
Thread ID:
00182021
Message ID:
00182021
Views:
41
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
Next
Reply
Map
View

Click here to load this message in the networking platform