devxlogo

List of keys in a .ini section

List of keys in a .ini section

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

[Section]Key1=xxxKey2=yyyKey3=mmmKey4=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 )
See also  5 Benefits of Using Time Tracking Software
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist