본문 바로가기

Total

WebDAV What is WebDAV? WebDAV is Web-based Distributed Authoring and Versioning, an extension to the HTTP protocol to allow for remotely managing content on a webserver. Though the HTTP protocol does define GET, PUT, and DELETE methods, these are not sufficient for proper remote authoring (for instance, HTTP provides no method for creating a remote directory). These extensions are general enough to use.. 더보기
(초간단) 파일 쓰기 (연속쓰기) FILE *f; errno_t err; _tfopen_s(&f, _T("d:\\FileName.txt"), _T("a+")); fseek(f, NULL,SEEK_CUR); err = fwprintf(f, title_RAW + _T("\n")); fclose(f); * File debuging 할때 사용하세요. 간단 TEXT 파일을 만들때 편리합니다. (주의: exception 처리 없음.) 더보기
search folder or read folder // Get a list of files CFileFind finder; BOOL finding = finder.FindFile (myDirectory + CString ("\\*.") + extension); //iterate the results while (finding) { finding = finder.FindNextFile(); //get file path CString path = finder.GetFilePath()); //get file title CString title = finder.GetFileTitle() } //dont forget to close finder.Close (); 더보기
WinInet API WinInet API WinInet(The Microsoft Win32 Internet functions) 클래스는 Win32반의 WinInet API들을 캡슐화하고 있는 클래스의 모임을 말하며 클라이언트 쪽에서 인터넷의 표준 프로토콜인 HTTP, Gopher, FTP 등을 지원하기 위한 클래스이다. MFC에서 제공하는 WinInet 관련 클래스들은 네트워크상에서 발생하는 여러 가지 복잡한 처리 작업을 내부적으로 수행하고 상당히 안정적인 코드를 제공한다. 이러한 프로토콜을 사용한 전송을 쉽게 할 수 있도록 운영체제 확장의 일부로 wininet.dll을 제공한다. MFC 응용 프로그램에서 wininet.dll은 CInternetSession 개체에 의해 표현된다. CInternetSession은 작업자가 .. 더보기
프로세스 검색 코드 PROCESSENTRY32 pe32; BOOL bCheck= FALSE; HANDLE hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); if ( !hSnapshot ) { // check } CString strSearchProcessName = _T("검색 프로세스 명"); pe32.dwSize = sizeof(pe32); for ( bCheck= Process32First( hSnapshot, &pe32 ); bCheck; bCheck= Process32Next( hSnapshot, &pe32 ) ) { if(strSearchProcessName.CompareNoCase(pe32.szExeFile) == 0) { // 검색 완료. } } 더보기
변환 : CString -> LPTSTR LPTSTR lptStr; CString strTmp = _T("Test"); lptStr= strTmp.GetBuffer(strTmp.GetLength() + 1); result : lptStr 더보기
C4100 Compiler Warning (level 4) C4100 Error Message'identifier' : unreferenced formal parameter The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. C4100 can also be issued when code calls a destructor on a otherwise unreferenced parameter of primitive type. This is a limitation of the Visual C++ compiler. The following sample generates C4100: //.. 더보기
C4995 1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(49) : warning C4995: 'gets': name was marked as #pragma deprecated 1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : warning C4995: 'sprintf': name was marked as #pragma deprecated 1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(56) : warning C4995: 'vsprintf': name was marked.. 더보기
C4706 Visual C++ 개념: C/C++ 프로그램 빌드 컴파일러 경고(수준 4) C4706 업데이트: 2007년 11월 오류 메시지조건식 내에 할당이 있습니다. assignment within conditional expression 조건식의 테스트 값이 할당의 결과입니다. 테스트 식을 포함하여 적합하게 다른 식에 사용할 수 있는 값이 할당의 왼쪽에 있습니다. 다음 샘플에서는 C4706 경고가 발생하는 경우를 보여 줍니다. // C4706a.cpp // compile with: /W4 int main() { int a = 0, b = 0; if ( a = b ) // C4706 { } } 테스트 조건에 괄호를 두 개 사용해도 경고가 발생합니다. // C4706b.cpp // compile with: /W4 .. 더보기
C4706 Visual C++ 개념: C/C++ 프로그램 빌드 컴파일러 경고(수준 4) C4706 업데이트: 2007년 11월 오류 메시지조건식 내에 할당이 있습니다. assignment within conditional expression 조건식의 테스트 값이 할당의 결과입니다. 테스트 식을 포함하여 적합하게 다른 식에 사용할 수 있는 값이 할당의 왼쪽에 있습니다. 다음 샘플에서는 C4706 경고가 발생하는 경우를 보여 줍니다. 코드 복사 // C4706a.cpp // compile with: /W4 int main() { int a = 0, b = 0; if ( a = b ) // C4706 { } } 테스트 조건에 괄호를 두 개 사용해도 경고가 발생합니다. 코드 복사 // C4706b.cpp // compil.. 더보기