Copy wininet to branch
[reactos.git] / reactos / subsys / system / cmd / beep.c
1 /*
2 * BEEP.C - beep internal command.
3 *
4 *
5 * History:
6 *
7 * 16 Jul 1998 (Hans B Pufal)
8 * started.
9 *
10 * 16 Jul 1998 (John P Price)
11 * Separated commands into individual files.
12 *
13 * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>)
14 * added config.h include
15 *
16 * 14-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
17 * Added help text ("beep /?").
18 * Unicode ready!
19 *
20 * 20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
21 * Redirection ready!
22 *
23 * 02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
24 * Remove all hardcode string to En.rc
25 */
26
27 #include "precomp.h"
28 #include "resource.h"
29
30 #ifdef INCLUDE_CMD_BEEP
31
32
33 INT cmd_beep (LPTSTR cmd, LPTSTR param)
34 {
35 WCHAR szMsg[RC_STRING_MAX_SIZE];
36
37 if (_tcsncmp (param, _T("/?"), 2) == 0)
38 {
39 LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
40 ConOutPuts (_T((LPTSTR)szMsg));
41 return 0;
42 }
43
44 #if 0
45 /* check if run in batch mode */
46 if (bc == NULL)
47 return 1;
48 #endif
49 #ifdef __REACTOS__
50 Beep (440, 50);
51 #else
52 MessageBeep (-1);
53 #endif
54
55 return 0;
56 }
57 #endif