• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 12 رای - 3.33 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: بار و بسته كردن در CD Rom
حالت موضوعی
#1
این قطعه کد cd rom را باز و بسته مي كند
کد:
using System.Runtime.InteropServices;

using System.Text;

...

public static void Main( )

{

   int result = mciSendString

      ("set cdaudio door open", null, 0, IntPtr.Zero);

   result =

      mciSendString ("set cdaudio door closed",

      null, 0, IntPtr.Zero);

}

                                  

[DllImport("winmm.dll", EntryPoint="mciSendStringA", CharSet=CharSet.Ansi)]

protected static extern int mciSendString

   (string mciCommand,

   StringBuilder returnValue,

   int returnLength, IntPtr callback);
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  چك كردن خطاي Overflow Ghoghnus 0 2,439 10-31-2011، 02:35 PM
آخرین ارسال: Ghoghnus
  فرمم با دستور close بسته نمیشه یاسر 1 5,732 07-24-2011، 12:55 PM
آخرین ارسال: Ghoghnus

پرش به انجمن:


Browsing: 1 مهمان