By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

Implementing SDKs.

P: n/a
I am writing a program which opens or closes CD tray. I know I can do that
using one of the functions in the Multimedio SDK (forgot the eact name) but
I have no idea how to call it from C# code.
Also, any info on how to use DirectX would be greatly appreciated.

- Huitzilopochtli
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Tom,

You can PInvoke to call Win32 APIs from C# code.
The MSDN documentation contains a good description of PInvoke.

You can use the WinMM APIs mciSendCommand to open and close
the CD tray.
Please take a look at the MCI_SET command message
with the MCI_SET_DOOR_CLOSED and MCI_SET_DOOR_OPEN
command flags.

Regards,
Aravind C
"Tomo Ferega" <to*********@zg.htnet.hr> wrote in message news:bo*********@ls219.htnet.hr...
I am writing a program which opens or closes CD tray. I know I can do that
using one of the functions in the Multimedio SDK (forgot the eact name) but
I have no idea how to call it from C# code.
Also, any info on how to use DirectX would be greatly appreciated.

- Huitzilopochtli

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.