Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Registry difference between win 9x and NT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00744211
Message ID:
00744363
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform