winapi_ui_automation/um/
playsoundapi.rs

1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms.
6//! ApiSet Contract for api-ms-win-mm-playsound-l1-1-0
7use shared::minwindef::{BOOL, DWORD, HMODULE, UINT};
8use um::winnt::{LPCSTR, LPCWSTR};
9extern "system" {
10    pub fn sndPlaySoundA(
11        pszSound: LPCSTR,
12        fuSound: UINT,
13    ) -> BOOL;
14    pub fn sndPlaySoundW(
15        pszSound: LPCWSTR,
16        fuSound: UINT,
17    ) -> BOOL;
18}
19pub const SND_SYNC: DWORD = 0x0000;
20pub const SND_ASYNC: DWORD = 0x0001;
21pub const SND_NODEFAULT: DWORD = 0x0002;
22pub const SND_MEMORY: DWORD = 0x0004;
23pub const SND_LOOP: DWORD = 0x0008;
24pub const SND_NOSTOP: DWORD = 0x0010;
25pub const SND_NOWAIT: DWORD = 0x00002000;
26pub const SND_ALIAS: DWORD = 0x00010000;
27pub const SND_ALIAS_ID: DWORD = 0x00110000;
28pub const SND_FILENAME: DWORD = 0x00020000;
29pub const SND_RESOURCE: DWORD = 0x00040004;
30pub const SND_PURGE: DWORD = 0x0040;
31pub const SND_APPLICATION: DWORD = 0x0080;
32pub const SND_SENTRY: DWORD = 0x00080000;
33pub const SND_RING: DWORD = 0x00100000;
34pub const SND_SYSTEM: DWORD = 0x00200000;
35extern "system" {
36    pub fn PlaySoundA(
37        pszSound: LPCSTR,
38        hmod: HMODULE,
39        fdwSound: DWORD,
40    ) -> BOOL;
41    pub fn PlaySoundW(
42        pszSound: LPCWSTR,
43        hmod: HMODULE,
44        fdwSound: DWORD,
45    ) -> BOOL;
46}