티스토리 뷰
출처 : http://blog.naver.com/bmk5133?Redirect=Log&logNo=80041790445
using System.Runtime.InteropServices;
using Microsoft.Win32;
// ---- ini 파일 의 읽고 쓰기를 위한 API 함수 선언 ----
[DllImport("kernel32.dll")]
private static extern int GetPrivateProfileString( // ini Read 함수
String section,
String key,
String def,
StringBuilder retVal,
int size,
String filePath);
[DllImport("kernel32.dll")]
private static extern long WritePrivateProfileString( // ini Write 함수
String section,
String key,
String val,
String filePath);
/// ini파일에 쓰기
public void G_IniWriteValue(String Section, String Key, String Value, string avsPath)
{
WritePrivateProfileString(Section, Key, Value, avsPath);
}
/// ini파일에서 읽어 오기
public String G_IniReadValue(String Section, String Key, string avsPath)
{
StringBuilder temp = new StringBuilder(2000);
int i = GetPrivateProfileString(Section, Key, "", temp, 2000, avsPath);
return temp.ToString();
}
'Application > C#' 카테고리의 다른 글
컨트롤 드래그 (0) | 2010.10.31 |
---|---|
C# 메세지 처리 (0) | 2010.07.16 |
C# Frequently Asked Questions for C++ programmers (0) | 2008.03.18 |
C# 관리되는, 되지 않는 리소스 사용에 대한 문제점과 해결방법 (0) | 2008.02.20 |
시간 간격 구하기 (1) | 2008.01.28 |
- Total
- Today
- Yesterday
- 짤방 및 아이콘
- Military
- humor
- medical
- Embedded System
- Linux
- network
- Mabinogi
- Information Processor
- Web Programming
- win32
- wallpaper
- 나비효과
- Assembly
- console
- Battle
- Network Inspector
- 프리랜서로 살아남는 법
- cartoon
- 야마꼬툰
- WDB
- Tech News
- diary
- BadCode
- Reverse Engineering
- 막장로그
- C#
- USB Lecture
- Life News
- 3D Engine
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |