Code review24 [C]time functions time_t ltime; struct tm *today; _tzset();// time zone 환경변수 세팅 time(<ime);// 1970년 1월 1일 부터경과한 초(Sec) 가져옴 today = localtime(<ime);// tm structure type 사용 printf("%s\n", ctime(<ime)); // tm structure struct tm { int tm_sec; /* seconds after the minute - [0,59] */ int tm_min; /* minutes after the hour - [0,59] */ int tm_hour; /* hours since midnight - [0,23] */ int tm_mday; /* day of the mont.. 2009. 5. 27. [WinApi]Dialog base start 간단한 Dialog base application start~ 01: #include "windows.h" 02: #include "resource.h" 03: 04: BOOL CALLBACK DlgProc (HWND, UINT, WPARAM, LPARAM) ; 05: 06: int APIENTRY WinMain(HINSTANCE hInstance, 07: HINSTANCE hPrevInstance, 08: LPSTR lpCmdLine, 09: int nCmdShow) 10: { 11: DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG), NULL, (DLGPROC)DlgProc); 12: return 0; 13: } 14: 15: 16: BOOL CALLBACK Dl.. 2009. 5. 27. [WinApi]GetLogicalDrives() GetLogicalDrives()는, 시스템에 A: C: 드라이브 만이 존재한다고 하면 0000 0000 0000 0000 0000 0000 0000 0101 = 5(10진수) 형태로 DWORD return 해줌. 이를 이용해서, 시스템에 인식되어있는 Logical Drive 들의 Bitmask형태의 데이터 통해서 drive들의 개수를 리턴하는 함수 01: /*============================================================ 02: FUNCTION 03: UINT Count_Drives(void) 04: DESCRIPTION 05: 현재 시스템에 인식되어 있는 Logical Drive의 개수를 return 06: RETURNS 07: number of logic.. 2009. 5. 27. [C]Fucntion comment Fucntion Descript /*============================================================ FUNCTION isTrue DESCRIPTION This function is determine that true or not Example: if(isTrue() == FALSE) { EXIT CODES TO HERE. } GO TO NEXT STEP. RETURNS returns TRUE(1), otherwise returns FALSE(0). SIDE EFFECTS None ============================================================*/ 2009. 5. 27. 이전 1 2 3 4 5 6 다음 반응형