Jump to content

Cd Sürücüsü Açıp Kapatma?


by_mehmet_emin

Recommended Posts

Sorum basit CD Sürücüsü'nü çıkartmak ve takmak içinhangi kod gerekli.

CD sürücüsünün açılması gereken kodu biliyorum;

DrivesTB = Drive.Enumerate();

for nIndex, DrvLetter in DrivesTB do

if Drive.GetType(DrvLetter) == 5 then

Drive.Eject(DrvLetter);

error = Application.GetLastError();

if (error ~= 0) then Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);

end

end

Ama kapatılması için gerekli kod nedir?

Link to comment
Share on other sites

Autoit plugini kullanıyosan "AutoIt.CDTray(DrvLetter, AUTOIT_CD_CLOSE);" ile de cd sürücüsünü kapatabilirsin.Eğer autoit plugini yoksa

http://www.tnctr.com/index.php?showtopic=136533[/CODE]

burdan temin edebilirsin..

Link to comment
Share on other sites

Açmak için;

DLL.CallFunction("winmm.dll", "mciSendStringA", "\"Set CDAudio Door Open\",0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);[/CODE]

Kapatmak için;

[CODE]DLL.CallFunction("winmm.dll", "mciSendStringA", "\"Set CDAudio Door Closed\",0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);[/CODE]

plugin veya dll kullanmana gerek yok ..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...