Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Registry
Message
 
To
11/06/2001 09:11:17
Ashish Patel
Hindustan Petroleum
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00517717
Message ID:
00517957
Views:
17
DECLARE Integer RegOpenKey IN Win32API Integer nHKey, String @cSubKey, Integer @nResult
DECLARE Integer RegQueryValueEx IN Win32API Integer nHKey, String lpszValueName, Integer dwReserved, Integer @lpdwType, String @lpbData, Integer @lpcbData
DECLARE Integer RegCloseKey IN Win32API Integer nHKey

#DEFINE HKEY_CLASSES_ROOT           -2147483648  && BITSET(0,31)
#DEFINE HKEY_CURRENT_USER           -2147483647  && BITSET(0,31)+1
#DEFINE HKEY_LOCAL_MACHINE          -2147483646  && BITSET(0,31)+2
#DEFINE HKEY_USERS                  -2147483645  && BITSET(0,31)+3
#DEFINE ERROR_SUCCESS				0	&& OK

lnKey = 0
lcSubKey = <Key Name Here>
lnErrCode = RegOpenKey(HKEY_CURRENT_USER,@m.lcSubKey,@m.lnKey)
IF m.lnErrCode = ERROR_SUCCESS
  lcValueName = <Value Name Here>
  lnValueType = 0
  lcValue = SPACE(255)
  lnValueSize = LEN(m.lcValue)
  lnErrCode = RegQueryValueEx(m.lnKey,m.lcValueName,0,@m.lnValueType,@m.lcValue,@m.lnValueSize)
  IF m.lnErrCode = ERROR_SUCCESS
    Registry Entry = LEFT(m.lcValue,m.lnValueSize - 1)
  ENDIF
ENDIF
>How can I access registry of Windows 95/98 through my foxpro program ?
>
>Thanx in advance.
>
>Ashish Patel
Brien R. Givens

Brampwood Systems
Previous
Reply
Map
View

Click here to load this message in the networking platform