C#中调用系统API打开和关闭光驱
来源:互联网 发布:启动和关闭mysql 编辑:程序博客网 时间:2024/05/01 19:57
using System;
using System.Text;
using System.Runtime.InteropServices;
class CloseCD
{
//API声明
[DllImport( "winmm.dll", EntryPoint="mciSendStringA", CharSet=CharSet.Ansi )]
protected static extern int mciSendString( string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, IntPtr hwndCallback );
public static void Main()
{
int ret = mciSendString( "set cdaudio door open", null, 0, IntPtr.Zero );//打开光区
Console.ReadLine();
ret = mciSendString( "set cdaudio door closed", null, 0, IntPtr.Zero );//关闭光区
}
}
- C#中调用系统API打开和关闭光驱
- C# 打开关闭光驱
- 用C#打开关闭光驱
- 打开和关闭光驱(十五)
- c#打开关闭CD/DVD光驱代码
- 用VB6.0打开和关闭光驱
- 编程控制光驱打开和关闭
- Delphi实现打开和关闭光驱
- VBS 打开关闭光驱
- 系统中打开GPS和关闭GPS
- VC中使用mci指令控制光驱(打开/关闭)
- C#打开光驱
- 打开、关闭光驱的方法
- C++打开或关闭光驱
- C#调用系统API
- 在Windows下使用C#和C++打开光驱
- C#中调用API
- C#中调用API
- Acegi + Spring + Hibernate + Struts 2搭建基于角色的权限控制系统
- 在C#中调用系统API使窗体下拥有阴影效果
- 小规模数据库WEB应用程序模型的想法(1)
- 让XP有个LINUX样
- 菜鸟求助啊!~~请各位会java的大哥大姐来帮帮小弟!
- C#中调用系统API打开和关闭光驱
- 我的新生活
- 中国也可以带号转网了,一年以后吧。
- 数据结构-算法: 插入排序(希尔排序法)
- 超级玛丽制作揭秘5魔法攻击 类MYANIMAGIC
- 这段时间在hp安腾上面折腾了websphere+cics,慢慢写出来和大家分享
- .net xml操作基类
- Math的 floor,round和ceil的总结
- 大端(Big Endian)与小端(Little Endian)详解