VS2010 C# 使用DirectSound

一.说明

        vs2010 c#里面不能直接在引用.net组件里面找到directx的组件,所以要手动添加dll引用。

        安装完dxsdk后(目前最新dxsdk_jun10.exe)能在E:\Windows\Microsoft.NET\DirectXfor Managed Code\1.0.2902.0 下面找到相应dll。

        如果要使用directsound的话,需要添加

                Microsoft.DirectX.dll

                Microsoft.DirectX.DirectSound.dll

 

二.添加引用

1.当前打开的项目下,选择 References

     

2.在打开的“Add References”窗口中选中Browse选项卡,找到那两个dll文件并添加进来

     

3.添加完引用后可以用

        usingMicrosoft.DirectX;

        usingMicrosoft.DirectX.DirectSound;

  

来源:http://blog.csdn.net/woaixiaozhe/article/details/7861340

原文地址:https://www.cnblogs.com/luoshupeng/p/2890789.html