Форум: "WinAPI";
Текущий архив: 2006.05.28;
Скачать: [xml.tar.bz2];
ВнизЕсть ли в CD-ROM диск? Найти похожие ветки
← →
GoshaT (2006-03-01 12:18) [0]Как узнать есть ли в CD-ROM диск?
← →
clickmaker © (2006-03-01 12:27) [1]OldMode := SetErrorMode(SEM_FAILCRITICALERRORS);
bCoffeeHolderNotEmpty := SetCurrentDirectory("F:\");
SetErrorMode(OldMode);
← →
tesseract © (2006-03-02 10:22) [2]см.
GetlogicalDrives.
GetDriveType
> OldMode := SetErrorMode(SEM_FAILCRITICALERRORS);bCoffeeHolderNotEmpty
> := SetCurrentDirectory("F:\");SetErrorMode(OldMode);
Кончайте уже.
← →
begin...end © (2006-03-02 12:10) [3]> tesseract © (02.03.06 10:22) [2]
Кончать следует как раз Вам. Причём чем скорее, тем лучше.
← →
Fay © (2006-03-02 15:19) [4]2 tesseract © (02.03.06 10:22) [2]
> GetlogicalDrives.
И что это даст?
← →
Nick Denry © (2006-03-02 15:28) [5]Еще можно через MCI
unit mci;
interface
uses Windows,Messages{,MMSystem};
type
TMPDeviceTypes = (dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT,
dtDigitalVideo, dtMMMovie, dtOther, dtOverlay,
dtScanner, dtSequencer, dtVCR, dtVideodisc, dtWaveAudio);
MCIERROR = DWORD;
MCIDEVICEID = UINT; { MCI device ID type }
{$EXTERNALSYM mciSendCommand}
function mciSendCommand(mciId: MCIDEVICEID; uMessage: UINT;
dwParam1, dwParam2: DWORD): MCIERROR; stdcall;
{ parameter block for MCI_OPEN command message }
type
PMCI_Open_ParmsA = ^TMCI_Open_ParmsA;
PMCI_Open_ParmsW = ^TMCI_Open_ParmsW;
PMCI_Open_Parms = PMCI_Open_ParmsA;
{$EXTERNALSYM tagMCI_OPEN_PARMSA}
tagMCI_OPEN_PARMSA = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PAnsiChar;
lpstrElementName: PAnsiChar;
lpstrAlias: PAnsiChar;
end;
{$EXTERNALSYM tagMCI_OPEN_PARMSW}
tagMCI_OPEN_PARMSW = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PWideChar;
lpstrElementName: PWideChar;
lpstrAlias: PWideChar;
end;
{$EXTERNALSYM tagMCI_OPEN_PARMS}
tagMCI_OPEN_PARMS = tagMCI_OPEN_PARMSA;
TMCI_Open_ParmsA = tagMCI_OPEN_PARMSA;
TMCI_Open_ParmsW = tagMCI_OPEN_PARMSW;
TMCI_Open_Parms = TMCI_Open_ParmsA;
{$EXTERNALSYM MCI_OPEN_PARMSA}
MCI_OPEN_PARMSA = tagMCI_OPEN_PARMSA;
{$EXTERNALSYM MCI_OPEN_PARMSW}
MCI_OPEN_PARMSW = tagMCI_OPEN_PARMSW;
{$EXTERNALSYM MCI_OPEN_PARMS}
MCI_OPEN_PARMS = MCI_OPEN_PARMSA;
{ parameter block for MCI_STATUS command message }
type
PMCI_Status_Parms = ^TMCI_Status_Parms;
{$EXTERNALSYM tagMCI_STATUS_PARMS}
tagMCI_STATUS_PARMS = record
dwCallback: DWORD;
dwReturn: DWORD;
dwItem: DWORD;
dwTrack: DWORD;
end;
TMCI_Status_Parms = tagMCI_STATUS_PARMS;
{$EXTERNALSYM MCI_STATUS_PARMS}
MCI_STATUS_PARMS = tagMCI_STATUS_PARMS;
const
MCIERR_NONE_ERROR = 0;
cddbOK = 0;
cddbDriveInUse = -1;
cddbUnableToOpen = -2;
cddbMSFFormatUnavailable = -3;
cddbNoDiscInDrive = -4;
cddbNoTracks = -5;
cddbUnableToGetTracks = -6;
DeviceName: array[TMPDeviceTypes] of PChar =
("", "AVIVideo", "CDAudio", "DAT",
"DigitalVideo", "MMMovie", "Other",
"Overlay", "Scanner", "Sequencer",
"VCR", "Videodisc", "WaveAudio");
{ MCI error return values }
const
{$EXTERNALSYM MCIERR_BASE}
MCIERR_BASE = 256;
{$EXTERNALSYM MCIERR_INVALID_DEVICE_ID}
MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1;
{$EXTERNALSYM MCIERR_UNRECOGNIZED_KEYWORD}
MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3;
← →
Nick Denry © (2006-03-02 15:28) [6]
{$EXTERNALSYM MCIERR_UNRECOGNIZED_COMMAND}
MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5;
{$EXTERNALSYM MCIERR_HARDWARE}
MCIERR_HARDWARE = MCIERR_BASE + 6;
{$EXTERNALSYM MCIERR_INVALID_DEVICE_NAME}
MCIERR_INVALID_DEVICE_NAME = MCIERR_BASE + 7;
{$EXTERNALSYM MCIERR_OUT_OF_MEMORY}
MCIERR_OUT_OF_MEMORY = MCIERR_BASE + 8;
{$EXTERNALSYM MCIERR_DEVICE_OPEN}
MCIERR_DEVICE_OPEN = MCIERR_BASE + 9;
{$EXTERNALSYM MCIERR_CANNOT_LOAD_DRIVER}
MCIERR_CANNOT_LOAD_DRIVER = MCIERR_BASE + 10;
{$EXTERNALSYM MCIERR_MISSING_COMMAND_STRING}
MCIERR_MISSING_COMMAND_STRING = MCIERR_BASE + 11;
{$EXTERNALSYM MCIERR_PARAM_OVERFLOW}
MCIERR_PARAM_OVERFLOW = MCIERR_BASE + 12;
{$EXTERNALSYM MCIERR_MISSING_STRING_ARGUMENT}
MCIERR_MISSING_STRING_ARGUMENT = MCIERR_BASE + 13;
{$EXTERNALSYM MCIERR_BAD_INTEGER}
MCIERR_BAD_INTEGER = MCIERR_BASE + 14;
{$EXTERNALSYM MCIERR_PARSER_INTERNAL}
MCIERR_PARSER_INTERNAL = MCIERR_BASE + 15;
{$EXTERNALSYM MCIERR_DRIVER_INTERNAL}
MCIERR_DRIVER_INTERNAL = MCIERR_BASE + 16;
{$EXTERNALSYM MCIERR_MISSING_PARAMETER}
MCIERR_MISSING_PARAMETER = MCIERR_BASE + 17;
{$EXTERNALSYM MCIERR_UNSUPPORTED_FUNCTION}
MCIERR_UNSUPPORTED_FUNCTION = MCIERR_BASE + 18;
{$EXTERNALSYM MCIERR_FILE_NOT_FOUND}
MCIERR_FILE_NOT_FOUND = MCIERR_BASE + 19;
{$EXTERNALSYM MCIERR_DEVICE_NOT_READY}
MCIERR_DEVICE_NOT_READY = MCIERR_BASE + 20;
{$EXTERNALSYM MCIERR_INTERNAL}
MCIERR_INTERNAL = MCIERR_BASE + 21;
{$EXTERNALSYM MCIERR_DRIVER}
MCIERR_DRIVER = MCIERR_BASE + 22;
{$EXTERNALSYM MCIERR_CANNOT_USE_ALL}
MCIERR_CANNOT_USE_ALL = MCIERR_BASE + 23;
{$EXTERNALSYM MCIERR_MULTIPLE}
MCIERR_MULTIPLE = MCIERR_BASE + 24;
{$EXTERNALSYM MCIERR_EXTENSION_NOT_FOUND}
MCIERR_EXTENSION_NOT_FOUND = MCIERR_BASE + 25;
{$EXTERNALSYM MCIERR_OUTOFRANGE}
MCIERR_OUTOFRANGE = MCIERR_BASE + 26;
{$EXTERNALSYM MCIERR_FLAGS_NOT_COMPATIBLE}
MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28;
{$EXTERNALSYM MCIERR_FILE_NOT_SAVED}
MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30;
{$EXTERNALSYM MCIERR_DEVICE_TYPE_REQUIRED}
MCIERR_DEVICE_TYPE_REQUIRED = MCIERR_BASE + 31;
{$EXTERNALSYM MCIERR_DEVICE_LOCKED}
MCIERR_DEVICE_LOCKED = MCIERR_BASE + 32;
{$EXTERNALSYM MCIERR_DUPLICATE_ALIAS}
MCIERR_DUPLICATE_ALIAS = MCIERR_BASE + 33;
{$EXTERNALSYM MCIERR_BAD_CONSTANT}
MCIERR_BAD_CONSTANT = MCIERR_BASE + 34;
{$EXTERNALSYM MCIERR_MUST_USE_SHAREABLE}
MCIERR_MUST_USE_SHAREABLE = MCIERR_BASE + 35;
{$EXTERNALSYM MCIERR_MISSING_DEVICE_NAME}
MCIERR_MISSING_DEVICE_NAME = MCIERR_BASE + 36;
{$EXTERNALSYM MCIERR_BAD_TIME_FORMAT}
MCIERR_BAD_TIME_FORMAT = MCIERR_BASE + 37;
{$EXTERNALSYM MCIERR_NO_CLOSING_QUOTE}
MCIERR_NO_CLOSING_QUOTE = MCIERR_BASE + 38;
{$EXTERNALSYM MCIERR_DUPLICATE_FLAGS}
MCIERR_DUPLICATE_FLAGS = MCIERR_BASE + 39;
{$EXTERNALSYM MCIERR_INVALID_FILE}
MCIERR_INVALID_FILE = MCIERR_BASE + 40;
{$EXTERNALSYM MCIERR_NULL_PARAMETER_BLOCK}
MCIERR_NULL_PARAMETER_BLOCK = MCIERR_BASE + 41;
{$EXTERNALSYM MCIERR_UNNAMED_RESOURCE}
MCIERR_UNNAMED_RESOURCE = MCIERR_BASE + 42;
{$EXTERNALSYM MCIERR_NEW_REQUIRES_ALIAS}
MCIERR_NEW_REQUIRES_ALIAS = MCIERR_BASE + 43;
{$EXTERNALSYM MCIERR_NOTIFY_ON_AUTO_OPEN}
MCIERR_NOTIFY_ON_AUTO_OPEN = MCIERR_BASE + 44;
{$EXTERNALSYM MCIERR_NO_ELEMENT_ALLOWED}
MCIERR_NO_ELEMENT_ALLOWED = MCIERR_BASE + 45;
{$EXTERNALSYM MCIERR_NONAPPLICABLE_FUNCTION}
MCIERR_NONAPPLICABLE_FUNCTION = MCIERR_BASE + 46;
{$EXTERNALSYM MCIERR_ILLEGAL_FOR_AUTO_OPEN}
MCIERR_ILLEGAL_FOR_AUTO_OPEN = MCIERR_BASE + 47;
{$EXTERNALSYM MCIERR_FILENAME_REQUIRED}
MCIERR_FILENAME_REQUIRED = MCIERR_BASE + 48;
{$EXTERNALSYM MCIERR_EXTRA_CHARACTERS}
MCIERR_EXTRA_CHARACTERS = MCIERR_BASE + 49;
{$EXTERNALSYM MCIERR_DEVICE_NOT_INSTALLED}
MCIERR_DEVICE_NOT_INSTALLED = MCIERR_BASE + 50;
{$EXTERNALSYM MCIERR_GET_CD}
MCIERR_GET_CD = MCIERR_BASE + 51;
{$EXTERNALSYM MCIERR_SET_CD}
MCIERR_SET_CD = MCIERR_BASE + 52;
{$EXTERNALSYM MCIERR_SET_DRIVE}
MCIERR_SET_DRIVE = MCIERR_BASE + 53;
{$EXTERNALSYM MCIERR_DEVICE_LENGTH}
MCIERR_DEVICE_LENGTH = MCIERR_BASE + 54;
{$EXTERNALSYM MCIERR_DEVICE_ORD_LENGTH}
MCIERR_DEVICE_ORD_LENGTH = MCIERR_BASE + 55;
{$EXTERNALSYM MCIERR_NO_INTEGER}
MCIERR_NO_INTEGER = MCIERR_BASE + 56;
const
{$EXTERNALSYM MCIERR_WAVE_OUTPUTSINUSE}
MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64;
{$EXTERNALSYM MCIERR_WAVE_SETOUTPUTINUSE}
MCIERR_WAVE_SETOUTPUTINUSE = MCIERR_BASE + 65;
{$EXTERNALSYM MCIERR_WAVE_INPUTSINUSE}
MCIERR_WAVE_INPUTSINUSE = MCIERR_BASE + 66;
{$EXTERNALSYM MCIERR_WAVE_SETINPUTINUSE}
MCIERR_WAVE_SETINPUTINUSE = MCIERR_BASE + 67;
{$EXTERNALSYM MCIERR_WAVE_OUTPUTUNSPECIFIED}
MCIERR_WAVE_OUTPUTUNSPECIFIED = MCIERR_BASE + 68;
{$EXTERNALSYM MCIERR_WAVE_INPUTUNSPECIFIED}
MCIERR_WAVE_INPUTUNSPECIFIED = MCIERR_BASE + 69;
{$EXTERNALSYM MCIERR_WAVE_OUTPUTSUNSUITABLE}
MCIERR_WAVE_OUTPUTSUNSUITABLE = MCIERR_BASE + 70;
{$EXTERNALSYM MCIERR_WAVE_SETOUTPUTUNSUITABLE}
MCIERR_WAVE_SETOUTPUTUNSUITABLE = MCIERR_BASE + 71;
{$EXTERNALSYM MCIERR_WAVE_INPUTSUNSUITABLE}
MCIERR_WAVE_INPUTSUNSUITABLE = MCIERR_BASE + 72;
{$EXTERNALSYM MCIERR_WAVE_SETINPUTUNSUITABLE}
MCIERR_WAVE_SETINPUTUNSUITABLE = MCIERR_BASE + 73;
{$EXTERNALSYM MCIERR_SEQ_DIV_INCOMPATIBLE}
MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80;
{$EXTERNALSYM MCIERR_SEQ_PORT_INUSE}
MCIERR_SEQ_PORT_INUSE = MCIERR_BASE + 81;
{$EXTERNALSYM MCIERR_SEQ_PORT_NONEXISTENT}
MCIERR_SEQ_PORT_NONEXISTENT = MCIERR_BASE + 82;
{$EXTERNALSYM MCIERR_SEQ_PORT_MAPNODEVICE}
MCIERR_SEQ_PORT_MAPNODEVICE = MCIERR_BASE + 83;
{$EXTERNALSYM MCIERR_SEQ_PORT_MISCERROR}
MCIERR_SEQ_PORT_MISCERROR = MCIERR_BASE + 84;
{$EXTERNALSYM MCIERR_SEQ_TIMER}
MCIERR_SEQ_TIMER = MCIERR_BASE + 85;
{$EXTERNALSYM MCIERR_SEQ_PORTUNSPECIFIED}
MCIERR_SEQ_PORTUNSPECIFIED = MCIERR_BASE + 86;
{$EXTERNALSYM MCIERR_SEQ_NOMIDIPRESENT}
MCIERR_SEQ_NOMIDIPRESENT = MCIERR_BASE + 87;
← →
Nick Denry © (2006-03-02 15:29) [7]
{$EXTERNALSYM MCIERR_NO_WINDOW}
MCIERR_NO_WINDOW = MCIERR_BASE + 90;
{$EXTERNALSYM MCIERR_CREATEWINDOW}
MCIERR_CREATEWINDOW = MCIERR_BASE + 91;
{$EXTERNALSYM MCIERR_FILE_READ}
MCIERR_FILE_READ = MCIERR_BASE + 92;
{$EXTERNALSYM MCIERR_FILE_WRITE}
MCIERR_FILE_WRITE = MCIERR_BASE + 93;
{$EXTERNALSYM MCIERR_NO_IDENTITY}
MCIERR_NO_IDENTITY = MCIERR_BASE + 94;
{ all custom device driver errors must be >= this value }
const
{$EXTERNALSYM MCIERR_CUSTOM_DRIVER_BASE}
MCIERR_CUSTOM_DRIVER_BASE = mcierr_Base + 256;
const
{$EXTERNALSYM MCI_STRING_OFFSET}
MCI_STRING_OFFSET = 512;
{$EXTERNALSYM MCI_DEVTYPE_CD_AUDIO}
MCI_DEVTYPE_CD_AUDIO = MCI_STRING_OFFSET + 4;
{$EXTERNALSYM MCI_OPEN}
MCI_OPEN = $0803;
{$EXTERNALSYM MCI_OPEN_TYPE}
MCI_OPEN_TYPE = $00002000;
{$EXTERNALSYM MCI_WAIT}
MCI_WAIT = $00000002;
{$EXTERNALSYM MCI_STATUS_MEDIA_PRESENT}
MCI_STATUS_MEDIA_PRESENT = $00000005;
{$EXTERNALSYM MCI_STATUS}
MCI_STATUS = $0814;
{$EXTERNALSYM MCI_STATUS_ITEM}
MCI_STATUS_ITEM = $00000100;
{$EXTERNALSYM MCI_CLOSE}
MCI_CLOSE = $0804;
function CheckCD(MPDeviceType: TMPDeviceTypes; var Error: mciError): Integer;
function GetErrorMgs(Error: Integer): PChar;
function mciSendCommand; external "Winmm.dll" name "mciSendCommandA";
implementation
function GetErrorMgs(Error: Integer): PChar;
begin
case Error of
MCIERR_NONE_ERROR : Result := "MCIERR_NONE_ERROR";
MCIERR_INVALID_DEVICE_ID : Result := "MCIERR_INVALID_DEVICE_ID";
MCIERR_UNRECOGNIZED_KEYWORD : Result := "MCIERR_UNRECOGNIZED_KEYWORD";
MCIERR_UNRECOGNIZED_COMMAND : Result := "MCIERR_UNRECOGNIZED_COMMAND";
MCIERR_HARDWARE : Result := "MCIERR_HARDWARE";
MCIERR_INVALID_DEVICE_NAME : Result := "MCIERR_INVALID_DEVICE_NAME";
MCIERR_OUT_OF_MEMORY : Result := "MCIERR_OUT_OF_MEMORY";
MCIERR_DEVICE_OPEN : Result := "MCIERR_DEVICE_OPEN";
MCIERR_CANNOT_LOAD_DRIVER : Result := "MCIERR_CANNOT_LOAD_DRIVER";
MCIERR_MISSING_COMMAND_STRING : Result := "MCIERR_MISSING_COMMAND_STRING";
MCIERR_PARAM_OVERFLOW : Result := "MCIERR_PARAM_OVERFLOW";
MCIERR_MISSING_STRING_ARGUMENT : Result := "MCIERR_MISSING_STRING_ARGUMENT";
MCIERR_BAD_INTEGER : Result := "MCIERR_BAD_INTEGER";
MCIERR_PARSER_INTERNAL : Result := "MCIERR_PARSER_INTERNAL";
MCIERR_DRIVER_INTERNAL : Result := "MCIERR_DRIVER_INTERNAL";
MCIERR_MISSING_PARAMETER : Result := "MCIERR_MISSING_PARAMETER";
MCIERR_UNSUPPORTED_FUNCTION : Result := "MCIERR_UNSUPPORTED_FUNCTION";
MCIERR_FILE_NOT_FOUND : Result := "MCIERR_FILE_NOT_FOUND";
MCIERR_DEVICE_NOT_READY : Result := "MCIERR_DEVICE_NOT_READY";
MCIERR_INTERNAL : Result := "MCIERR_INTERNAL";
MCIERR_DRIVER : Result := "MCIERR_DRIVER";
MCIERR_CANNOT_USE_ALL : Result := "MCIERR_CANNOT_USE_ALL";
MCIERR_MULTIPLE : Result := "MCIERR_MULTIPLE";
MCIERR_EXTENSION_NOT_FOUND : Result := "MCIERR_EXTENSION_NOT_FOUND";
MCIERR_OUTOFRANGE : Result := "MCIERR_OUTOFRANGE";
MCIERR_FLAGS_NOT_COMPATIBLE : Result := "MCIERR_FLAGS_NOT_COMPATIBLE";
MCIERR_FILE_NOT_SAVED : Result := "MCIERR_FILE_NOT_SAVED";
MCIERR_DEVICE_TYPE_REQUIRED : Result := "MCIERR_DEVICE_TYPE_REQUIRED";
MCIERR_DEVICE_LOCKED : Result := "MCIERR_DEVICE_LOCKED";
MCIERR_DUPLICATE_ALIAS : Result := "MCIERR_DUPLICATE_ALIAS";
MCIERR_BAD_CONSTANT : Result := "MCIERR_BAD_CONSTANT";
MCIERR_MUST_USE_SHAREABLE : Result := "MCIERR_MUST_USE_SHAREABLE";
MCIERR_MISSING_DEVICE_NAME : Result := "MCIERR_MISSING_DEVICE_NAME";
MCIERR_BAD_TIME_FORMAT : Result := "MCIERR_BAD_TIME_FORMAT";
MCIERR_NO_CLOSING_QUOTE : Result := "MCIERR_NO_CLOSING_QUOTE";
MCIERR_DUPLICATE_FLAGS : Result := "MCIERR_DUPLICATE_FLAGS";
MCIERR_INVALID_FILE : Result := "MCIERR_INVALID_FILE";
MCIERR_NULL_PARAMETER_BLOCK : Result := "MCIERR_NULL_PARAMETER_BLOCK";
MCIERR_UNNAMED_RESOURCE : Result := "MCIERR_UNNAMED_RESOURCE";
MCIERR_NEW_REQUIRES_ALIAS : Result := "MCIERR_NEW_REQUIRES_ALIAS";
MCIERR_NOTIFY_ON_AUTO_OPEN : Result := "MCIERR_NOTIFY_ON_AUTO_OPEN";
MCIERR_NO_ELEMENT_ALLOWED : Result := "MCIERR_NO_ELEMENT_ALLOWED";
MCIERR_NONAPPLICABLE_FUNCTION : Result := "MCIERR_NONAPPLICABLE_FUNCTION";
MCIERR_ILLEGAL_FOR_AUTO_OPEN : Result := "MCIERR_ILLEGAL_FOR_AUTO_OPEN";
MCIERR_FILENAME_REQUIRED : Result := "MCIERR_FILENAME_REQUIRED";
MCIERR_EXTRA_CHARACTERS : Result := "MCIERR_EXTRA_CHARACTERS";
MCIERR_DEVICE_NOT_INSTALLED : Result := "MCIERR_DEVICE_NOT_INSTALLED";
MCIERR_GET_CD : Result := "MCIERR_GET_CD";
MCIERR_SET_CD : Result := "MCIERR_SET_CD";
MCIERR_SET_DRIVE : Result := "MCIERR_SET_DRIVE";
MCIERR_DEVICE_LENGTH : Result := "MCIERR_DEVICE_LENGTH";
MCIERR_DEVICE_ORD_LENGTH : Result := "MCIERR_DEVICE_ORD_LENGTH";
MCIERR_NO_INTEGER : Result := "MCIERR_NO_INTEGER";
MCIERR_WAVE_OUTPUTSINUSE : Result := "MCIERR_WAVE_OUTPUTSINUSE";
MCIERR_WAVE_SETOUTPUTINUSE : Result := "MCIERR_WAVE_SETOUTPUTINUSE";
MCIERR_WAVE_INPUTSINUSE : Result := "MCIERR_WAVE_INPUTSINUSE";
MCIERR_WAVE_SETINPUTINUSE : Result := "MCIERR_WAVE_SETINPUTINUSE";
MCIERR_WAVE_OUTPUTUNSPECIFIED : Result := "MCIERR_WAVE_OUTPUTUNSPECIFIED";
MCIERR_WAVE_INPUTUNSPECIFIED : Result := "MCIERR_WAVE_INPUTUNSPECIFIED";
MCIERR_WAVE_OUTPUTSUNSUITABLE : Result := "MCIERR_WAVE_OUTPUTSUNSUITABLE";
MCIERR_WAVE_SETOUTPUTUNSUITABLE : Result := "MCIERR_WAVE_SETOUTPUTUNSUITABLE";
MCIERR_WAVE_INPUTSUNSUITABLE : Result := "MCIERR_WAVE_INPUTSUNSUITABLE";
MCIERR_WAVE_SETINPUTUNSUITABLE : Result := "MCIERR_WAVE_SETINPUTUNSUITABLE";
MCIERR_SEQ_DIV_INCOMPATIBLE : Result := "MCIERR_SEQ_DIV_INCOMPATIBLE";
MCIERR_SEQ_PORT_INUSE : Result := "MCIERR_SEQ_PORT_INUSE";
MCIERR_SEQ_PORT_NONEXISTENT : Result := "MCIERR_SEQ_PORT_NONEXISTENT";
MCIERR_SEQ_PORT_MAPNODEVICE : Result := "MCIERR_SEQ_PORT_MAPNODEVICE";
MCIERR_SEQ_PORT_MISCERROR : Result := "MCIERR_SEQ_PORT_MISCERROR";
MCIERR_SEQ_TIMER : Result := "MCIERR_SEQ_TIMER";
MCIERR_SEQ_PORTUNSPECIFIED : Result := "MCIERR_SEQ_PORTUNSPECIFIED";
MCIERR_SEQ_NOMIDIPRESENT : Result := "MCIERR_SEQ_NOMIDIPRESENT";
MCIERR_NO_WINDOW : Result := "MCIERR_NO_WINDOW";
MCIERR_CREATEWINDOW : Result := "MCIERR_CREATEWINDOW";
MCIERR_FILE_READ : Result := "MCIERR_FILE_READ";
MCIERR_FILE_WRITE : Result := "MCIERR_FILE_WRITE";
MCIERR_NO_IDENTITY : Result := "MCIERR_NO_IDENTITY";
else Result := "UNKNOWN CUSTOM ERROR";
end;
end;
← →
Nick Denry © (2006-03-02 15:30) [8]
function CheckCD(MPDeviceType: TMPDeviceTypes; var Error: mciError): Integer;
var
MCIOpen :TMCI_OPEN_PARMS;
MCIStatus :TMCI_STATUS_PARMS;
DevID :Integer;
begin
//MCIOpen.lpstrDeviceType := pChar(MCI_DEVTYPE_CD_AUDIO + DiskNum shl 16);
//MCIOpen.lpstrElementName := "";
MCIOpen.lpstrDeviceType := DeviceName[MPDeviceType];
Error := mciSendCommand(MCI_DEVTYPE_CD_AUDIO,
MCI_OPEN, MCI_WAIT + MCI_OPEN_TYPE{ + MCI_OPEN_TYPE_ID},
Integer(@MCIOpen));
DevID := MCIOpen.wDeviceID;
if (Error = 0) then
try
MCIStatus.dwItem := MCI_STATUS_MEDIA_PRESENT;
Error := mciSendCommand(DevID, MCI_STATUS, MCI_WAIT + MCI_STATUS_ITEM, Integer(@MCIStatus));
if (Error = 0) and (MCIStatus.dwReturn <> 0) then Result := cddbOK
else Result := cddbNoDiscInDrive;
finally
mciSendCommand(DevID, MCI_CLOSE, MCI_WAIT, 0);
end
else
if (Error = MCIERR_MUST_USE_SHAREABLE) then Result := cddbDriveInUse
else Result := cddbUnableToOpen;
end;
end.
← →
eeee (2006-03-08 19:33) [9]if GetVolumeInformation(...) then ...
← →
AlexeyT © (2006-03-09 08:37) [10]
> clickmaker © (01.03.06 12:27) [1]
> OldMode := SetErrorMode(SEM_FAILCRITICALERRORS);
> bCoffeeHolderNotEmpty := SetCurrentDirectory("F:\");
А SetErrorMode тут зачем? А то в справке что-то про это ничего нету.
← →
Fay © (2006-03-09 10:37) [11]> А то в справке что-то про это ничего нету.
В какой справке? По калькулятору?
← →
AlexeyT © (2006-03-09 20:28) [12]
> В какой справке?
В справке win32.hlp по функции SetCurrentDirectory.
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2006.05.28;
Скачать: [xml.tar.bz2];
Память: 0.53 MB
Время: 0.011 c