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:
00744371
Views:
10
Great. May be you can add it to your site as well? This was the first place, I checked, BTW, but it was not there, so I searched MSDN.

>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform