Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registry difference between win 9x and NT
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00744211
Message ID:
00744363
Views:
8
A sample code with the SQLGetPrivateProfileString:

DECLARE INTEGER SQLGetPrivateProfileString IN odbccp32;
STRING lpszSection, STRING lpszEntry, STRING lpszDefault,;
STRING @RetBuffer, INTEGER cbRetBuffer, STRING lpszFilename

LOCAL cBuffer, nLen, ii
cBuffer = Repli(Chr(0), 4096)

nLen = SQLGetPrivateProfileString('ODBC Data Sources', Null, '',;
@cBuffer, Len(cBuffer), "ODBC.INI")

cBuffer = Chr(0)+LEFT(cBuffer, nLen)
ii=1
DO WHILE .T.
nPos1 = AT(Chr(0),cBuffer,ii)
nPos2 = AT(Chr(0),cBuffer,ii+1)
IF MIN(nPos1, nPos2) = 0
EXIT
ENDIF
? SUBSTR(cBuffer, nPos1, nPos2-nPos1)
ii = ii + 1
ENDDO
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform