User Tools

Site Tools


20071030_visual_c_programming_備忘

1. 用 CreateFile() 檢查檔案是否存在

			hFile = CreateFile(wszTestPath,
								 GENERIC_READ,
								 FILE_SHARE_READ,
								 NULL,
								 OpenFlag,
								 FILE_ATTRIBUTE_NORMAL,
								 NULL);
			if (hFile == NULL)	// the boot image does not exist.
				continue;
			else{
				CloseHandle(hFile);
				hFile = NULL;
			}
20071030_visual_c_programming_備忘.txt · Last modified: 2007/10/30 10:38 (external edit)