Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Feb 2, 1998

List of keys in a .ini section

Question:
Is there a Windows function or some quick way get a list of the keys in an .ini file, such as:

[Section]
Key1=xxx
Key2=yyy
Key3=mmm
Key4=ppp

I want this: 'Key1', 'Key2', 'Key3', 'Key4'

Answer:
There is a PFC service which is designed to do exactly this. The service you should look for is called pfc_n_cst_inifile and the function you need to call is of_getkeys. You pass the function the name of the ini file, the section you want the list of keys for and an unbound array of strings (passed by reference). The function will fillout the array for you.

lnc_ini.of_GetKeys( 'win.ini', 'drivers', ls_Keys )
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date