BOOL WriteProfileString ( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue );
반환 값
성공 하는 경우 0이 아닌 그렇지 않으면 0。
매개 변수
lpszSection
항목을 포함 하는 섹션을 지정 하는 null로 끝나는 문자열을 가리킵니다. 섹션에서 존재 하지 않는 경우 생성 됩니다. 섹션 이름은 경우 독립; 모든 조합을 대문자 및 소문자 문자열 수 있습니다.
lpszEntry
값 기록 항목을 포함 하는 null로 끝나는 문자열을 가리킵니다. 만든 항목 지정된 섹션에서 존재 하지 않는 경우。
lpszValue
쓸 문자열을 가리킵니다. 이 매개 변수가 NULL이면 lpszEntry 매개 변수에 의해 지정 된 항목 삭제。
주의
지정 된 응용 프로그램의 레지스트리 섹션에 지정된 된 문자열을 작성 하려면이 멤버 함수를 호출 하거나.INI 파일。
항목이 다음과 같이 저장 됩니다.:
예제
nbsp;??CString strSection = "My 섹션";
? CString strStringItem = "My String 항목";
? CString strIntItem = "My Int 항목";
CWinApp * pApp = AfxGetApp();
pApp-> WriteProfileString (strSection, strStringItem, "test");
CString strValue;
? strValue = pApp-> GetProfileString (strSection, strStringItem);
? ASSERT (strValue = "테스트");
pApp-> WriteProfileInt (strSection, strIntItem, 1234);
? int nValue;
? nValue = pApp-> GetProfileInt (strSection, strIntItem, 0);
? ASSERT(nValue == 1234)
CWinApp 개요 |nbsp; 클래스 멤버 (ko) | 계층 구조 차트(&N)
참고 항목nbsp;CWinApp::GetProfileString, CWinApp::WriteProfileInt, :: WritePrivateProfileString, CWinApp::SetRegistryKey(&N)