4 * Copyright 2006 Jan Zerebecki
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/test.h"
28 const char command_open
[] = "open new type waveaudio alias mysound";
29 const char command_close_my
[] = "close mysound notify";
30 const char command_close_all
[] = "close all notify";
33 err
= mciSendString(command_open
, NULL
, 0, NULL
);
34 ok(!err
,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_open
, err
);
36 err
= mciSendString(command_close_my
, NULL
, 0, NULL
);
37 ok(!err
,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_close_my
, err
);
39 ok(PeekMessageW( &msg
, (HWND
)-1, 0, 0, PM_REMOVE
), "PeekMessage should succeed\n");
40 ok(msg
.hwnd
== NULL
, "got %p instead of NULL\n", msg
.hwnd
);
41 ok(msg
.message
== MM_MCINOTIFY
, "got %04x instead of MM_MCINOTIFY\n", msg
.message
);
42 ok(msg
.wParam
== MCI_NOTIFY_SUCCESSFUL
, "got %08lx instead of MCI_NOTIFY_SUCCESSFUL\n", msg
.wParam
);
44 err
= mciSendString(command_close_all
, NULL
, 0, NULL
);
45 todo_wine
ok(!err
,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_close_all
, err
);
47 err
= mciSendCommand(MCI_ALL_DEVICE_ID
, MCI_CLOSE
, MCI_NOTIFY
, 0);
48 todo_wine
ok(err
== MCIERR_INVALID_DEVICE_ID
,
49 "mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, NULL) returned %d instead of %d\n",
50 err
, MCIERR_INVALID_DEVICE_ID
);