1. 程式人生 > >windows下ini配置現金盤平臺出租的讀寫

windows下ini配置現金盤平臺出租的讀寫

cti val name 緩沖區 大小 完整 inter api 平臺出租

對ini文件進行寫操作用到函數
現金盤平臺出租(企 娥:217 1793 408)
BOOL
WINAPI
WritePrivateProfileStringA(
in_opt LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName,
in_opt LPCSTR lpString,
__in_opt LPCSTR lpFileName
);

其中lpAppName為分節名字,lpKeyName為鍵的名字,lpString為對應鍵的字符串的值,lpFileName為完整的文件名,這個文件可以存在,也可以不存在,不存在則會創建,如果存在則會覆蓋原來的內容

另外還有其他的函數

// 寫入結構體

BOOL WritePrivateProfileStruct(
LPCTSTR lpszSection, // pointer to section name
LPCTSTR lpszKey, // pointer to key name
LPVOID lpStruct, // 要寫入的數據緩沖區
UINT uSizeStruct, // 緩沖區的大小
LPCTSTR szFile // pointer to initialization filename
);

// 寫入整個鍵值,lpString 為“key=value”的格式
BOOL WritePrivateProfileSection(

LPCTSTR lpAppName, // pointer to string with section name 
LPCTSTR lpString, // 寫入的字符串
LPCTSTR lpFileName  // pointer to string with filename 

);

windows下ini配置現金盤平臺出租的讀寫