Open/Close the optical drive

Source: Internet
Author: User

/// <summary>        ///The mcisendstring function sends a command string to an MCI device.        The device, the command is sent to was specified in the command string. /// </summary>        /// <param name= "Lpszcommand" >Pointer to a null-terminated string, specifies an MCI command string. For a list, see Multimedia Command Strings.</param>        /// <param name= "lpszreturnstring" >Pointer to a buffer that receives return information. If no return information is needed, this parameter can be NULL.</param>        /// <param name= "Cchreturn" >Size, in characters, for the return buffer specified by the lpszreturnstring parameter.</param>        /// <param name= "Hwndcallback" >Handle to a callback window if the "Notify" flag is specified in the command string.</param>        /// <returns>Returns Zero if successful or an error otherwise. The Low-order word of the returned DWORD value contains the error return value. If the error is device-specific, the High-order word of the return value is the driver identifier; Otherwise, the High-order word is zero. For a list of possible error values, see Mcierr Return values.</returns>[DllImport ("Winmm.dll", EntryPoint ="mcisendstring")]         Public Static extern intmciSendString (stringLpszcommand,stringLpszreturnstring,UINTCchreturn, IntPtr hwndcallback); mciSendString ("Set cdaudio door open Wait","",0, This. Handle);//OpenmciSendString ("Set cdaudio door Closed wait","",0, This. Handle);//Close

Open/Close the optical drive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.