visual c++ - Reading a key and getting the section from .ini file in c++/MFC -


i have .ini file sections like:

[hai1] value1 = 1 value2 = 2  [hai2] value1 = 3 value2 = 4 

now, need search particular key "value1 = 3" , have corresponding section belongs, in case "hai2".to use getprivateprofilestring need section first. in case need particular section based on key value.any thoughts on how this?

browse sections. section names via getprivateprofilesectionnames.

char lpszreturnbuffer[4096]; dword nsize;      nsize = sizeof(lpszreturnbuffer);  dword dwret = getprivateprofilesectionnames(lpszreturnbuffer, nsize, lpszfilename);  while (strlen(lpszreturnbuffer)>0)  {     trace(lpszreturnbuffer);     searchformykeyvalueinsection(lpszreturnbuffer);     lpszreturnbuffer+= strlen(lpszreturnbuffer)+1; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -