Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPW 2.6 and the registry
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00437111
Message ID:
00437553
Views:
13
>>>>* cough * Um, Mike, I don't think that he specifically asked about setting the default printer. He asked about reading/writing registry keys.
>>>
>>>Um, yeah, but the article shows how to use GetProfileString(), which could accomplish what he's looking for. I'll admit the article isn't going to give cut-and-paste code, but I don't want to just give him the fish. :-)
>>
>>OIC. While I've got you "on the hook" < wg >, would this stuff work with Win2K as well? Especially the setting the default printer part.
>
>My guess is that anything that maps directly to an entry in WIN.INI or SYSTEM.INI that lives in the registry will be accessible through the ProfileString Win16 APIs, but that's pure speculation; I've never tried it under Win2K. I know that the SYSTEM.INI mappings for ME do translate to real registry entries; I can make changes through GetPrivateProfileString() and WritePrivateProfileString(), and SYSEDIT does display limited WIN.INI and SYSTEM.INI files under Win2K, and the DOS Environment variables are under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Environment and are command line or API-adjustable as always. But this is guesswork; I have no FPW to support.

The following in the Platform SDK: Registry for GetProfileString() is what caught my eye:

"Windows NT/2000: Calls to profile functions may be mapped to the registry instead of to the initialization files. This mapping occurs when the initialization file and section are specified in the registry under the following keys:

HKEY_LOCAL_MACHINE\Software\Microsoft\
Windows NT\CurrentVersion\IniFileMapping"

I was hoping that someone might know off the top their head whether or not the windows/device section mapped to that. Frankly, it's not worth my time to setup Win2K to test. I did find out that FPW can't access the registry (via RegFN/CallFN), so I'm guessing myself that it does. Just wanted some confirmation if possible.

Thanks,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform