Home > Software engineering >  Configuration file format is to be written?
Configuration file format is to be written?

Time:01-08

 : : WritePrivateProfileString (L "ITEMCOUNT", "the COUNT," L sIndex, PathName). 
//the ITEMCOUNT here, the COUNT is dynamically generated, or in the open file, manually typing?

CodePudding user response:

Try to know, write a line of code, and this function is not recommended to use the document clearly say to compatible 16-bit programs advise you the new code of configuration information directly to the registry

In CYourApp: : InitInstance () to add
//configuration information to the registry 
SetRegistryKey (L "company name");

//which connect to the server
If (GetProfileString (L "Client," L "DBHost"). The IsEmpty ())
{
WriteProfileString (L "Client," L "DBHost," L "127.0.0.1");
}


This automatically creates

CodePudding user response:

Or the configuration file for the time being, because I now is in the process of imitating others
  • Related