본문 바로가기

Code review24

[TCP/IP] hello world client 예제 ws2_32.lib 를 사용. - TCP/IP 소켓프로그래밍 (윤성우 저) 참조 /*================================================== Windows 기반의 "Hello World" 클라이언트 ==================================================*/ #include #include #include #include /*================================================== Error Message print ==================================================*/ void ErrorHandling(char *message) { fputs(message, st.. 2009. 5. 27.
[TCP/IP] hello world server 예제 ws2_32.lib 를 사용. - TCP/IP 소켓프로그래밍 (윤성우 저) 참조 /*================================================== Windows 기반의 "Hello World" 서버 ==================================================*/ #include #include #include #include /*================================================== Error Message print ==================================================*/ void ErrorHandling(char *message) { fputs(message, stder.. 2009. 5. 27.
[WinApi]self deleting executables 스스로 실행후 삭제되는 기능이 필요해서 여러가지를 찾아보다 발견한 코드. 한마디로 훌륭하다. 우선순위를 바꿔준다니.. 대단하십니다~ 출처 : http://www.codeguru.com/Cpp/W-P/win32/article.php/c4533 #include #include BOOL SelfDelete() { SHELLEXECUTEINFO sei; TCHAR szModule [MAX_PATH], szComspec[MAX_PATH], szParams[MAX_PATH]; // get file path names: if((GetModuleFileName(0,szModule,MAX_PATH)!=0) && (GetShortPathName(szModule,szModule,MAX_PATH)!=0) && (GetEnvi.. 2009. 5. 27.
[WinApi]Dialog base start 2 Dialog base application을 조금 변형.. #include #include // for use the "HANDLE_MSG" macro #include "resource.h" //*** Global variable define ***// HINSTANCE hInstance; HWND hMainWnd; //*** Function prototype define ***// LRESULT CALLBACK MainDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); VOID OnCommand (HWND hWnd, int id,HWND hwndCtl, UINT codeNotify); BOOL OnInitDialog(HWND hWnd, HWND .. 2009. 5. 27.
반응형