Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading From An INI File
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00664506
Message ID:
00664980
Views:
21
>aaaahh! Thanks
>
>One other question; I'm looking at this page which is a Visual Basic API reference. There is
>a section where constants are defined. How do I convert these values for use in VFP?
>
>
>Const HKEY_CLASSES_ROOT = &H80000000
>Const HKEY_CURRENT_CONFIG = &H80000005
>Const HKEY_CURRENT_USER = &H80000001
>Const HKEY_DYN_DATA = &H80000006
>Const HKEY_LOCAL_MACHINE = &H80000002
>Const HKEY_PERFORMANCE_DATA = &H80000004
>Const HKEY_USERS = &H80000003

These are all negative numbers. You can find these values in the registry.h file that ships with VFP

>Const KEY_ALL_ACCESS = &HF003F
>Const KEY_CREATE_LINK = &H20
>Const KEY_CREATE_SUB_KEY = &H4
>Const KEY_ENUMERATE_SUB_KEYS = &H8
>Const KEY_EXECUTE = &H20019
>Const KEY_NOTIFY = &H10
>Const KEY_QUERY_VALUE = &H1
>Const KEY_READ = &H20019
>Const KEY_SET_VALUE = &H2
>Const KEY_WRITE = &H20006

Since these are positive values, simply replace the "&H" with "0x". For example, instead of

Const KEY_READ = &H20019

use

#DEFINE KEY_READ 0x20019


>


>Many thanks
George

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

Click here to load this message in the networking platform