国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
winmm.dll 函數(shù)詳細(xì)引用方法(C#)

 

[csharp] view plain copy
  1. //發(fā)送一個游戲桿消息到指定的窗口  
  2. [DllImport("winmm.dll")]  
  3. public static extern int joySetCapture(IntPtr hWnd, int uJoyID, int uPeriod, bool fChanged);  
  4.   
  5. //查詢指定的游戲桿設(shè)備的位置和活動性  
  6. [DllImport("winmm.dll")]  
  7. public static extern int joyGetPos(int uJoyID, ref JOYINFO pji);  
  8.   
  9. //查詢一個游戲桿設(shè)備的位置和它的按扭狀態(tài)  
  10. [DllImport("winmm.dll")]  
  11. public static extern int joyGetPosEx(int uJoyID, ref JOYINFOEX pji);   
  12.   
  13.     //檢取描述指定媒介控制接口錯誤代碼的字符串  
  14. [DllImport("winmm.dll")]  
  15.  public  static extern Int32 mciGetErrorString(Int32 errorCode, StringBuilder errorText, Int32 errorTextSize);  
  16.   
  17. //向指定的媒介控制接口設(shè)備發(fā)送一個字符串  
  18. [DllImport("winmm.dll")]  
  19. public static extern Int32 mciSendString(string command,string  buffer, int bufferSize, IntPtr hwndCallback);  
  20.   
  21. //將指定的MIDI輸入設(shè)備連接到輸出設(shè)備  
  22. [DllImport("winmm.dll")]  
  23. public static extern UInt32 midiConnect(IntPtr hMidi, IntPtr hmo, IntPtr pReserved);  
  24.   
  25. //斷開MIDI輸入設(shè)備和輸出設(shè)備的連接  
  26. [DllImport("winmm.dll")]  
  27. public static extern UInt32 midiDisconnect(IntPtr hMidi, IntPtr hmo, IntPtr pReserved);  
  28.   
  29. //關(guān)閉指定的音樂儀器數(shù)字接口的輸入設(shè)備  
  30. [DllImport("winmm.dll", SetLastError = true)]  
  31. public static extern uint midiInClose(IntPtr hMidiIn);  
  32.   
  33. //查詢指定的音樂儀器數(shù)字接口的輸入設(shè)備,以確定其性能  
  34. [DllImport("winmm.dll", SetLastError = true)]  
  35. public static extern MMRESULT midiInGetDevCaps(UIntPtr uDeviceID, ref MIDIINCAPS caps, uint cbMidiInCaps);  
  36.   
  37. //查詢指定的音樂儀器數(shù)字接口的輸入設(shè)備,以確定其性能  
  38. [DllImport("winmm.dll", SetLastError = true)]  
  39. public static extern uint midiInGetNumDevs();  
  40.   
  41. //打開指定的音樂儀器數(shù)字接口的輸入設(shè)備  
  42. [DllImport("winmm.dll", SetLastError=true)]  
  43. public static extern uint midiInOpen(IntPtr hMidiIn);  
  44.   
  45.   
  46. //在給定的MIDI輸入設(shè)備上輸入,并將所有掛起的輸入緩沖區(qū)標(biāo)記為已執(zhí)行的  
  47.  [DllImport("winmm.dll", SetLastError = true)]  
  48.  public static extern uint midiInReset(IntPtr hMidiIn);  
  49.   
  50.  //啟動在指定的音樂儀器數(shù)字接口的輸入設(shè)備上的輸入  
  51. [DllImport("winmm.dll", SetLastError = true)]  
  52.  public static extern uint midiInStart(IntPtr hMidiIn);  
  53.   
  54.   
  55. //關(guān)閉指定的音樂儀器數(shù)字接口的輸出設(shè)備  
  56. [DllImport("winmm.dll")]  
  57. public static extern uint midiOutClose(IntPtr hMidiOut);  
  58.   
  59. //查詢指定的音樂儀器數(shù)字接口的輸出設(shè)備,以確定其性能  
  60. [DllImport("winmm.dll", SetLastError = true)]  
  61. public static extern MMRESULT midiOutGetDevCaps(UIntPtr uDeviceID, ref MIDIOUTCAPS lpMidiOutCaps, uint cbMidiOutCaps);  
  62.   
  63. //檢取有關(guān)MIDI輸出設(shè)備指定采取的文本說明  
  64. [DllImport("winmm.dll")]  
  65. public static extern uint midiOutGetErrorText(uint mmrError, StringBuilder pszText, uint cchText);  
  66.   
  67. //檢取系統(tǒng)中存在的MIDI輸出設(shè)備的數(shù)量  
  68. [DllImport("winmm.dll", SetLastError = true)]  
  69. public static extern uint midiOutGetNumDevs();  
  70.   
  71. //打開指定的MIDI輸出設(shè)備進(jìn)行回放  
  72. [DllImport("winmm.dll")]  
  73. public static extern uint midiOutOpen(out IntPtr lphMidiOut, uint uDeviceID, IntPtr dwCallback, IntPtr dwInstance, uint dwFlags);  
  74.   
  75. //向指定的MIDI輸出設(shè)備發(fā)送一條短MIDI消息  
  76. [DllImport("winmm.dll")]  
  77. public static extern uint midiOutShortMsg(IntPtr hMidiOut, uint dwMsg);  
  78.   
  79. //關(guān)閉一個打開的MIDI流  
  80. [DllImport("winmm.dll")]  
  81. public extern static Int32 midiStreamClose(IntPtr hMidiStream);  
  82.   
  83.   
  84. //為輸出,打開一個MIDI流  
  85. [DllImport("winmm.dll")]  
  86. public extern static Int32 midiStreamOpen(ref IntPtr hMidiStream, ref Int32 puDeviceID, Int32 cMidi, IntPtr dwCallback, IntPtr dwInstance, Int32 fdwOpen);  
  87.   
  88. //暫停一個MIDI流的播放  
  89. [DllImport("winmm.dll")]  
  90. public static extern Int32 midiStreamPause(IntPtr hMidiStream);  
  91.   
  92.   
  93. //關(guān)掉指定MIDI輸出設(shè)備的所有MIDI通道  
  94. [DllImport("winmm.dll")]  
  95. public static extern Int32 midiStreamStop(IntPtr hMidiStream);  
  96.   
  97. //關(guān)閉指定的混頻器  
  98. [DllImport("winmm.dll")]  
  99. public static extern Int32 mixerClose(IntPtr hmx);  
  100.   
  101. //檢取和一個聲頻指線路相關(guān)的單一控件的細(xì)節(jié)  
  102. [DllImport("winmm.dll")]  
  103. public static extern Int32 mixerGetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, UInt32 fdwDetailsmixer);  
  104.   
  105. //查詢指定的混頻器以確定其性能  
  106. [DllImport("winmm.dll",  SetLastError = true)]  
  107. public static extern uint MixerGetDevCaps(int mixerId, ref MixerCaps mixerCaps, int mixerCapsSize);  
  108.   
  109.   
  110. //獲取指定混頻器的標(biāo)識符  
  111. [DllImport("winmm.dll", SetLastError=true)]  
  112. public static extern MMRESULT mixerGetID(int hmxobj, uint puMxId, MixerFlags fdwId);  
  113.   
  114. //檢取和一個聲頻線路相關(guān)的一個或多個控件  
  115. [DllImport("winmm.dll")]  
  116. public static extern Int32 mixerGetLineControls(IntPtr hmxobj, ref MIXERLINECONTROLS pmxlc, UInt32 fdwControls);  
  117.   
  118. //檢取混頻器有關(guān)特有線路的信息  
  119. [DllImport("winmm.dll")]  
  120. public static extern Int32 mixerGetLineInfo(IntPtr hmxobj, ref MixerLine pmxl, UInt32 fdwInfo);  
  121.   
  122. //返回系統(tǒng)中存在的混頻器的數(shù)量  
  123. [DllImport("winmm.dll", SetLastError = true)]  
  124. public static extern uint mixerGetNumDevs();  
  125.   
  126. //打開指定的混頻器,在應(yīng)用程序關(guān)閉該句柄前保證該設(shè)備不被移走  
  127. [DllImport("winmm.dll")]  
  128. public static extern Int32 mixerOpen(ref IntPtr phmx, uint pMxId,IntPtr dwCallback, IntPtr dwInstance, UInt32 fdwOpen);  
  129.   
  130. //設(shè)置和一個聲頻指線路相關(guān)的單一控件的細(xì)節(jié)  
  131. [DllImport("winmm.dll")]  
  132. public static extern Int32 mixerSetControlDetails(IntPtr hmxobj, ref MIXERCONTROLDETAILS pmxcd, UInt32 fdwDetails);  
  133.   
  134. //播放一個波形聲音  
  135. [DllImport("winmm.dll", SetLastError = true)]  
  136. public static extern bool PlaySound(string pszSound, UIntPtr hmod, uint fdwSound);  
  137.   
  138. [DllImport("winmm.dll", SetLastError = true)]  
  139. public static extern bool PlaySound(byte[] pszSound, IntPtr hmod, SoundFlags fdwSound);  
  140.   
  141.   
  142. //設(shè)置應(yīng)用程序或驅(qū)動程序使用的最小定時器分辨率  
  143. [DllImport("winmm.dll", SetLastError = true)]  
  144. public static extern uint timeBeginPeriod(uint uMilliseconds);  
  145.   
  146. //清除應(yīng)用程序或驅(qū)動程序使用的最小定時器分辨率  
  147. [DllImport("winmm.dll", SetLastError = true)]  
  148. public static extern uint timeEndPeriod(uint uMilliseconds);  
  149.   
  150. //查詢定時器設(shè)備以確定其性能  
  151. [DllImport("winmm.dll", SetLastError = true)]  
  152. public static extern UInt32 timeGetDevCaps(ref TimeCaps timeCaps,UInt32 sizeTimeCaps);  
  153.   
  154. //檢取從WINDOWS開始已逝去的毫秒數(shù)  
  155. [DllImport("winmm.dll", SetLastError = true)]  
  156. public static extern UInt32 timeGetSystemTime(ref MmTime mmTime, UInt32 sizeMmTime);  
  157.   
  158. //檢取從WINDOWS開始已逝去的毫秒數(shù),此函數(shù)比上一條函數(shù)開銷小  
  159. [DllImport("winmm.dll", SetLastError = true)]  
  160. public static extern uint timeGetTime();  
  161.   
  162. //毀掉指定的定時器回調(diào)事件  
  163. [DllImport("winmm.dll", SetLastError = true)]  
  164. public static extern UInt32 timeKillEvent(UInt32 timerEventId);  
  165.   
  166. //設(shè)置一個定時器回調(diào)事件  
  167. [DllImport("winmm.dll", SetLastError = true)]  
  168. public static extern UInt32 timeSetEvent(UInt32 msDelay, UInt32 msResolution,TimerEventHandler handler, ref UInt32 userCtx, UInt32 eventType);  
  169.   
  170.   
  171. //關(guān)閉指定的波形輸入設(shè)置  
  172. [DllImport("winmm.dll", SetLastError = true)]  
  173. static extern uint waveInClose(IntPtr hwi);  
  174.   
  175. // 返回系統(tǒng)中存在的波形輸入設(shè)備的數(shù)量  
  176. [DllImport("winmm.dll", SetLastError = true)]  
  177. public static extern uint waveInGetNumDevs();  
  178.   
  179. //為錄音而打開一個波形輸入設(shè)備  
  180. [DllImport("winmm.dll")]  
  181. public static extern uint waveInOpen(ref IntPtr hWaveIn, uint deviceId, ref WaveFormate wfx, IntPtr dwCallBack, uint dwInstance, uint dwFlags);  
  182.   
  183. //為波形輸入準(zhǔn)備一個輸入緩沖區(qū)  
  184. [DllImport("winmm.dll", SetLastError = true)]  
  185. public static extern MMRESULT waveInPrepareHeader(IntPtr hwi, ref WaveHDR pwh, uint cbwh);  
  186.   
  187. //停止給定的波形輸入設(shè)備的輸入,且將當(dāng)前位置清零  
  188. [DllImport("winmm.dll", SetLastError = true)]  
  189. public static extern uint waveInReset(IntPtr hwi);  
  190.   
  191. //  //啟動在指定的波形輸入設(shè)備的輸入  
  192. [DllImport("winmm.dll", SetLastError = true)]  
  193. public static extern uint waveInStart(IntPtr hwi);  
  194.   
  195. [DllImport("winmm.dll", SetLastError = true)]  
  196. public static extern int waveInAddBuffer(int hWaveIn,ref WaveHDR lpWaveInHdr,int uSize);  
  197.   
  198.   
  199.   
  200. // 查詢一個指定的波形輸入設(shè)備以確定其性能  
  201. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  202. public static extern uint waveInGetDevCaps(IntPtr hwo, ref WAVEINCAPS pwoc, uint cbwoc);  
  203.   
  204. ////清除由waveInPrepareHeader函數(shù)實現(xiàn)的準(zhǔn)備  
  205. [DllImport("winmm.dll", SetLastError = true)]  
  206. public static extern MMRESULT waveInUnprepareHeader(IntPtr hwi, ref WaveHDR pwh, uint cbwh);  
  207.   
  208. //關(guān)閉指定的波形輸出設(shè)備  
  209. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  210. public static extern uint waveOutClose(IntPtr hwo);  
  211.   
  212. // 查詢一個指定的波形輸出設(shè)備以確定其性能  
  213. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  214. public static extern uint waveOutGetDevCaps(IntPtr hwo, ref WAVEOUTCAPS pwoc, uint cbwoc);  
  215.   
  216.   
  217.   
  218.   
  219. //檢取由指定的錯誤代碼標(biāo)識的文本說明  
  220. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  221. public static extern uint waveOutGetErrorText(uint mmrError, StringBuilder pszText, uint cchText);  
  222.   
  223. //檢取系統(tǒng)中存在的波形輸出設(shè)備的數(shù)量  
  224. [DllImport("winmm.dll", SetLastError = true)]  
  225. public static extern uint waveOutGetNumDevs();  
  226.   
  227. //查詢一個波形輸出設(shè)備當(dāng)前播放的速度  
  228. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  229.  public static extern uint waveOutGetPlaybackRate(IntPtr hwo, uint dwRate);  
  230.   
  231. // 查詢指定波形輸出設(shè)備的當(dāng)前音量設(shè)置  
  232. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  233.  public static extern uint waveOutGetVolume(IntPtr hwo, uint dwVolume);  
  234.   
  235. //為播放打開一個波形輸出設(shè)備  
  236. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  237. public static extern uint waveOutOpen(ref IntPtr hWaveOut, IntPtr uDeviceID, ref WaveFormate lpFormat, IntPtr dwCallback, IntPtr dwInstance, uint dwFlags);  
  238.   
  239. //暫停指定波形輸出設(shè)備上的播放  
  240. [DllImport("winmm.dll")]  
  241. public static extern uint waveOutPause(IntPtr hwo);  
  242.   
  243.   
  244. //為播放準(zhǔn)備一個波形緩沖區(qū)  
  245. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  246. public static extern uint waveOutPrepareHeader(IntPtr hWaveOut, ref WaveHDR lpWaveOutHdr, int uSize);  
  247.   
  248.   
  249.  //停止給定的波形輸出設(shè)備的輸出,且將當(dāng)前位置清零  
  250. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  251. public static extern uint waveOutReset(IntPtr hwo);  
  252.   
  253. //設(shè)置指定波形輸出設(shè)備的速度  
  254. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  255. public static extern uint waveOutSetPlaybackRate(IntPtr hwo, uint dwRate);  
  256.   
  257. //設(shè)置指定的波形輸出設(shè)備的音量  
  258. [DllImport("winmm.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]  
  259. public static extern int waveOutSetVolume(int uDeviceID, int dwVolume);  
  260.   
  261. //清除由waveOutPrepareHeader函數(shù)實現(xiàn)的準(zhǔn)備  
  262. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  263. public static extern uint waveOutUnprepareHeader(IntPtr hwo, ref WaveHDR pwh, uint cbwh);  
  264.   
  265. //向指定的波形輸出設(shè)備發(fā)送一個數(shù)據(jù)塊  
  266. [DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)]  
  267. public static extern uint waveOutWrite(IntPtr hwo, ref WaveHDR pwh, uint cbwh);  

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
c#類,封裝了鍵盤,和鼠標(biāo)模擬,和內(nèi)存讀取(申精)(頁 1) - 網(wǎng)絡(luò)安全 - ZDNet...
C#獲取進(jìn)程的主窗口句柄
驅(qū)動程序安裝類(C#)
C# 實現(xiàn)對硬件的控制
共享內(nèi)存操作類(C#源碼)
Winio64在64位系統(tǒng)中初始化失敗問題
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服