Ask Experts Questions for FREE Help !
Ask
    zerihun_m's Avatar
    zerihun_m Posts: 4, Reputation: 1
    New Member
     
    #1

    Oct 7, 2009, 11:35 PM
    Vb.net code to eject cd from drive
    Sir

    How to open or close cd drive using vb.net code .
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Oct 8, 2009, 06:05 AM
    Opening and closing the CD tray in .NET (C# Programming Tutorial) • Geekpedia

    Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

    Basically, you declare a function from WinMM.dll (Windows Multi-media library), as shown above, and call it. This will then open the door (if you have only one CD):

    mciSendString "Set CDAudio Door Open Wait", 0&, 0&, 0&

    This will close the door:

    mciSendString "Set CDAudio Door Closed Wait", 0&, 0&, 0&

    The article, above, shows how to open a drive if multiple drives are in the system. The code in the article is in C#, but the strings in the "mciSendString" calls are what you need and they don't vary from language to language.
    jeya_raman09's Avatar
    jeya_raman09 Posts: 1, Reputation: 1
    New Member
     
    #3

    Jan 7, 2011, 10:32 PM
    videocoferencing code for ASP.net with c#

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

After EJECT how to reconnect the USB drive without Manual intervention? [ 4 Answers ]

Hi, I want to know is it possible that once you have ejected the USB Drive and then reconnect it without removing and reinserting it. Will it be possible to do it instantly?:rolleyes: One more thing I want to know is that Suppose that your desktop system is a server. Will it be possible that...

DVD and CD woun't eject [ 1 Answers ]

My cd's where wheren't able to be ejectd from my computer. Once they where finally to eject the cd's woun't go in, it's like it's stuck or something what can I do?

CD/DVD won't eject [ 2 Answers ]

What is the problem when you can't the drive to open at all? My friend has an HP Pavilion XP963 and her cd/dvd rom just will not open. What can we do to repair this problem?

Ice maker won't eject [ 1 Answers ]

I have a freezer-mounted Whirlpool icemaker(Part #4317943). It was new 4 months ago and, for the past 4 months, has been working normally. Now, what seems to be happening is that it fills normally, but the ice is not being pushed out, Any help would be appreciated. Thank you Foxden


View more questions Search