Using system;Using system. Collections. Generic;Using system. runtime. interopservices;Using system. text;
Namespace meidushav1.business{ Public class inimanager{
/* prototype * bool writeprivateprofilestring ( lpctstr lpappname, // It is a
After PHPMailer is used, do I need to change the php. ini file? I can use the tutorial on the Internet to send an email directly. I don't need to change the IIS or PHP. ini file. But here I will report an error:
Warning: mail (): Failed to connect
1 Project: cross-platform INI file read/write API (C ++ Version)
Version: 0.2.1
Authorization method: GNU GPL
Copyright ownership (c) 2007 midapex
This procedure is free software; you may release and/or modify this procedure in accordance with the
Python parsing ini file by configparserINI file is a frequently used configuration file in Windows, the main format is:[Section1]option1 : value1option2 : value2Python provides a simple module that ConfigParser can be used to parse files similar to
1, suitable for C + + projects, for Windows and Linux platform, rely on STL standard library.
2, for C + + read INI file, write INI file, and find the corresponding key value pairs of quick operation.
3, in the project needs this function, only need
Read the INI file;
private String GetPrivateProfileString (string applicationname, String keyname,string Default, String FileName)
{
string[] Iniitems = new String[0];
String Inilines;
String Iniline;
int I, J;
Try
{
Read the INI
"Python-ini" python read/write INI fileThe examples in this article describe how Python reads and writes INI files. Share to everyone for your reference. Specific as follows:For example, there is a file Update.ini, which contains these contents:
#include #includestring.h>/** Function Name: getinikeystring * Entry parameter: Title * Identification of a set of data in a profile * key * The identity of the value to be read in this set of data * filename * The file path to read * Return value:
; Configuration of HTTP
[http]
domain=www.mysite.com
port=8080
cgihome=/cgi-bin
; Configuration of DB
[database]
server = mysql
user = myname
password = toopendatabase
A configuration file consists of several section names, which are enclosed in [
function Private Declare function getprivateprofileint Lib "kernel32" Alias "Getprivateprofileinta" (ByVal Lpapplicationname as String, ByVal Lpkeyname as String, ByVal Ndefault as Long, ByVal lpFileName as String) as Long
Private Declare Function
Zhou zhidnw.exe is an EXE file provided by Samsung, and does not need to be installed.
However, in the process of use, he will generate a file named dnw. ini, which will cause the following phenomena:
1. ActiveSync remains gray. When you view the
INI file format:
; Comment[Node name]Key = Value...
// Read the value of a specific item in the INI FileChar * getinitkey (char * pfilename, char * playback ction, char * pkey){Static char retstr [1024];Int nflag = 0;Char tmpline [1024];File * pfile;
Although it is convenient to use the Tinifile class, I think it is easier to use the system API to perform operations. Each read/write operation only requires one row.
Code And does not need uses inifiles.
In this example:
Code
The test. ini file is as follows:
[Section1]Key1 = value1Key2 = value2
[Section2]Key1 = value1Key2 = value2 # comment
The usage is as follows:
Cinifile ini;If (! INI. Open ("test. ini "))Return;String strvalue = ini. Read ("Section1", "key1 ");
If your computer uses Chinese characters for my documents, such as "cloud walk" and "new users. When creating Android AVD, the following exception occurs:
Emulator: Error:No Search Paths Found In This AVD'S Configuration. Weird,AVD'SConfig.
In an automated test project, you may encounter some frequently used but rarely changing configuration information, which is described using Configparser to read configuration information config.iniThe information read (Config.ini) is as
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.