Операцион тизим ва қурилмалар билан ишлаш Компьютер имкониятлари тўғрисидаги тизимли маълумотлар


begin BeginDoc; Canvas.TextOut(5, 50, Text); EndDoc; end


Download 334 Kb.
bet16/18
Sana08.01.2023
Hajmi334 Kb.
#1084303
1   ...   10   11   12   13   14   15   16   17   18
Bog'liq
Система (таржима)

begin
BeginDoc;
Canvas.TextOut(5, 50, Text);
EndDoc;
end;
end;
CD дискни очиш ва ёпиш.

CD дискни очиш ва ёпиш учун қуйидаги функциялардан фойдаланиш мумкин.




Function OpenCD(Drive: Char): Boolean;
var
Res: MciError;
OpenParm: TMCI_Open_Parms;
Flags: DWord;
S: string;
DeviceID: Word;
Begin
Result := false;
S := Drive + ':';
Flags := mci_Open_Type or mci_Open_Element;
with OpenParm do
begin
dwCallback := 0;
lpstrDeviceType := 'CDAudio';
lpstrElementName := PChar(S);
end;
Res := mciSendCommand(0, mci_Open, Flags, Longint(@OpenParm));
if Res <> 0 then
exit;
DeviceID := OpenParm.wDeviceID;
try
Res := mciSendCommand(DeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0);
if Res = 0 then
exit;
Result := True;
finally
mciSendCommand(DeviceID, mci_Close, Flags, Longint(@OpenParm));
end;
End;
Function CloseCD(Drive: Char): Boolean;
var
Res: MciError;
OpenParm: TMCI_Open_Parms;
Flags: DWord;
S: string;
DeviceID: Word;
Begin
Result := false;
S := Drive + ':';
Flags := mci_Open_Type or mci_Open_Element;
with OpenParm do
begin
dwCallback := 0;
lpstrDeviceType := 'CDAudio';
lpstrElementName := PChar(S);
end;
Res := mciSendCommand(0, mci_Open, Flags, Longint(@OpenParm));
if Res <> 0 then
exit;
DeviceID := OpenParm.wDeviceID;
try
Res := mciSendCommand(DeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, 0);
if Res = 0 then
exit;
Result := True;
finally
mciSendCommand(DeviceID, mci_Close, Flags, Longint(@OpenParm));
end;
End;
Процессорлар тезлигини аниқлаш


const
ID_BIT = $200000; // EFLAGS ID bit



Download 334 Kb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   18




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling