Advertisement
4_2005-2006 Windows API Call/ Explanation #151351

API call for Playing a sound

This API call is used to play a .wav file. Hope you enjoy the code. Peace!

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
To use this API paste the following code into a module:
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Then to call the API type:
Variable = sndPlaySound (Location, 1)
So for example to play a .wav file located at C:\Sounds\sound.wav type:
Variable = sndPlaySound ("C:\Sounds\sound.wav, 1)

Thats it!


원본 댓글 (3)
Wayback Machine에서 복구됨