вот мой код,но тут одна ошибка:
| Код | #include <windows.h> #include <tchar.h> #include <string> #include <iostream> class CMFStartApp : public CWinApp { public: virtual BOOL InitInstance(); void FileSystemInfo(); };
CMFStartApp MFStartApp;
BOOL CMFStartApp::InitInstance() {
FileSystemInfo();
return FALSE; }
void CMFStartApp::FileSystemInfo() {
CString VolumeNameBuffer;
DWORD nVolumeNameSize = 100;
DWORD VolumeSerialNumber;
DWORD MaximumComponentLength;
DWORD FileSystemFlags;
CString FileSystemNameBuffer;
DWORD nFileSystemNameSize = 100;
GetVolumeInformation( NULL, VolumeNameBuffer.GetBuffer(nVolumeNameSize), nVolumeNameSize, &VolumeSerialNumber, &MaximumComponentLength, &FileSystemFlags, FileSystemNameBuffer.GetBuffer(nFileSystemNameSize), nFileSystemNameSize );
VolumeNameBuffer.ReleaseBuffer(); FileSystemNameBuffer.ReleaseBuffer();
try {
CStdioFile file("fsystem.dat", CFile::modeCreate | CFile::modeWrite | CFile::typeText);
CString strTmpOut;
strTmpOut.GetBuffer(512);
strTmpOut.Format("Метка тома: %s \n", VolumeNameBuffer); file.WriteString(strTmpOut);
strTmpOut.Format("Серийный номер: %X \n", VolumeSerialNumber);
file.WriteString(strTmpOut);
strTmpOut.Format("Тип файловой системы: %s \n", FileSystemNameBuffer);
file.WriteString(strTmpOut); strTmpOut.Format("Максимальная длина имени файла: %d \n", MaximumComponentLength);
file.WriteString(strTmpOut);
strTmpOut = "Свойства файловой системы \n";
if(FileSystemFlags & FS_CASE_IS_PRESERVED) strTmpOut += " FS_CASE_IS_PRESERVED\n";
if(FileSystemFlags & FS_CASE_SENSITIVE) strTmpOut += " FS_CASE_SENSITIVE\n"; if(FileSystemFlags & FS_UNICODE_STORED_ON_DISK) strTmpOut += " FS_UNICODE_STORED_ON_DISK\n"; if(FileSystemFlags & FS_PERSISTENT_ACLS) strTmpOut += " FS_PERSISTENT_ACLS\n"; if(FileSystemFlags & FS_FILE_COMPRESSION) strTmpOut += " FS_FILE_COMPRESSION\n";
if(FileSystemFlags & FS_VOL_IS_COMPRESSED) strTmpOut += " FS_VOL_IS_COMPRESSED\n";
file.WriteString(strTmpOut);
file.Close();
MessageBox(NULL, "File fsystem.dat", "Message", MB_OK); }
catch(...) {
MessageBox(NULL, "File I/O Error", "Error", MB_OK); }
return; }
|
Добавлено через 4 минуты и 9 секунд c:\documents and settings\дашустрик\рабочий стол\систематичное программирование\4\4.cpp(138) : fatal error C1010: unexpected end of file while looking for precompiled header directive Error executing cl.exe. |