Вниз
Скачать: CL | DM;

Как прочитать метку диска   Найти похожие ветки 

← →
Pontic   (2002-11-26 15:59) [0]

Подскажите как прочитать метку компакт-диска для того чтобы в случае его отсутствия можно было бы выдать сообщение типа "вставьте диск ... в дисковод". Спасибо


← →
Song ©   (2002-11-26 16:00) [1]

GetVolumeInformation()


← →
Pontic   (2002-11-26 16:14) [2]

А какой файл подключать???


← →
mrcat ©   (2002-11-26 16:16) [3]

какой файл?


← →
Pontic   (2002-11-26 16:18) [4]

.h или .hpp ??? как он называется и можно примерчик если нетрудно


← →
mrcat ©   (2002-11-26 16:19) [5]

The GetVolumeInformation function returns information about a file system and volume whose root directory is specified.

BOOL GetVolumeInformation(

LPCTSTR lpRootPathName, // address of root directory of the file system
LPTSTR lpVolumeNameBuffer, // address of name of the volume
DWORD nVolumeNameSize, // length of lpVolumeNameBuffer
LPDWORD lpVolumeSerialNumber, // address of volume serial number
LPDWORD lpMaximumComponentLength, // address of system"s maximum filename length
LPDWORD lpFileSystemFlags, // address of file system flags
LPTSTR lpFileSystemNameBuffer, // address of name of file system
DWORD nFileSystemNameSize // length of lpFileSystemNameBuffer
);

о каком файле речь?!


← →
Pontic   (2002-11-26 16:21) [6]

да это я читал, правда ничего не понял (((
к чему присваивать результат функции?? мона примерчик


← →
mrcat ©   (2002-11-26 16:53) [7]

function VolumeID(DriveChar: Char): string;
var
OldErrorMode: Integer;
NotUsed, VolFlags: DWORD;
Buf: array [0..MAX_PATH] of Char;
begin
OldErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS);
try
Buf[0] := #$00;
if GetVolumeInformation(PChar(DriveChar + ":\"), Buf, DWORD(sizeof(Buf)),
nil, NotUsed, VolFlags, nil, 0) then
SetString(Result, Buf, StrLen(Buf))
else Result := "";
if DriveChar < "a" then
Result := AnsiUpperCaseFileName(Result)
else
Result := AnsiLowerCaseFileName(Result);
Result := Format("[%s]",[Result]);
finally
SetErrorMode(OldErrorMode);
end;
end;


← →
Johnmen ©   (2002-11-26 17:24) [8]

А почему бы не посмотреть на старую, как Паскаль,
FindFirst, FindNext с аттрибутом faVolumeID ?



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.014 c
1-14596
aterm
2002-11-27 14:55
2002.12.05
Help!


6-14702
DenKop
2002-09-29 04:28
2002.12.05
CGI


6-14704
Itap
2002-10-08 11:11
2002.12.05
Отправка файла по почте


1-14591
События
2002-11-27 13:33
2002.12.05
Если два различных Sender a вызывают одно событие


6-14717
ch
2002-10-08 11:23
2002.12.05
Помогите незнающему




   Наверх