ini file - function to get all key-value for a section
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Nov 10, 2022 10:50 am
by hua
What is the function to retrieve all
pair of keys and values under a specific section?
Is it this?
https://learn.microsoft.com/en-us/windo ... ilesectionTIA
Re: ini file - function to get all key-value for a section
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Nov 10, 2022 1:56 pm
by Enrico Maria Giordano
This returns all the keys of a section:
- Code: Select all Expand view
FUNCTION GETPVPROFSECTION( cSection, cIniFile )
LOCAL cKeys := STRTRAN( GETPVPROFSTRING( cSection, , "", cIniFile ), CHR( 0 ), CRLF )
LOCAL aKeys := {}
LOCAL i
FOR i = 1 TO MLCOUNT( cKeys )
AADD( aKeys, RTRIM( MEMOLINE( cKeys, , i ) ) )
NEXT
RETURN aKeys
Re: ini file - function to get all key-value for a section
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Nov 11, 2022 1:58 am
by hua
Thank you very much Enrico