1 int _tmain(int argc, _TCHAR* argv[]) 2 { 3 HANDLE handle; 4 wchar_t szFile[64] = L"kingdom_0,你好"; 5 unsigned long lWritten, lRead; 6 handle=CreateFile(L"D:\\Example.txt", FILE_ALL_ACCESS, FILE_SHARE_READ|FILE_SHARE_WRITE, 7 NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL,NULL); 8 FILETIME CreationTime,LastAccessTime,LastWriteTime; 9 BOOL result=GetFileTime(handle,&CreationTime,&LastAccessTime,&LastWriteTime);10 DWORD fileType=GetFileType(handle);11 LPDWORD lpFileSizeHigh=0;12 LARGE_INTEGER lpFileSize;13 BOOL flag=GetFileSizeEx(handle,&lpFileSize);14 DWORD dwFileSize=GetFileSize(handle,lpFileSizeHigh);15 lpFileSizeHigh=0;16 DWORD dwUnpressedFileSize=GetCompressedFileSize(L"E:\\icon.rar",lpFileSizeHigh);17 int err = GetLastError();18 if (handle == INVALID_HANDLE_VALUE)19 {20 wcout<<"Error Create File!" << endl;21 //break;22 }23 else24 {25 wcout<<"Open File Success!"<