标题:winmm.dll文件的加载??
只看楼主
andygao818
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-12-19
 问题点数:0 回复次数:3 
winmm.dll文件的加载??

[DllImport("winmm.dll", EntryPoint = "mciSendStringA")]
public static extern long mciSendString(String Command, long ReturnString, long ReturnLength, long Callback);
private void btnLoad_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
if (openFileDialog1.FileName != "")
{
lblFileName.Text = openFileDialog1.FileName;
mciSendString("close all",0,0,0);
mciSendString("open" + lblFileName.Text + "alias song", 0, 0, 0);
}
}

private void btnPlay_Click(object sender, EventArgs e)
{
mciSendString("play song", 0, 0, 0);
}

private void btnStop_Click(object sender, EventArgs e)
{
mciSendString("stop song", 0, 0, 0);
}错误 3 找不到类型或命名空间名称“DllImport”(是否缺少 using 指令或程序集引用?) E:\C#例子\cs_LoadPlay\cs_LoadPlay\Form1.cs 17 10 cs_LoadPlay
各位大狭帮帮忙!!!!!!!!多谢!!!!!!!!!111

搜索更多相关主题的帖子: 加载 winmm dll 文件 
2007-01-04 00:18
andygao818
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-12-19
得分:0 

没有人知道的吗?

2007-01-04 23:23
Soil
Rank: 1
等 级:新手上路
帖 子:206
专家分:0
注 册:2006-2-18
得分:0 
using System.Runtime.InteropServices

2007-01-05 10:07
andygao818
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-12-19
得分:0 

多谢!!!

2007-01-06 23:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-114059-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.474388 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved