1 /* $Id: error.cpp,v 1.3 2003/01/07 16:23:11 robd Exp $
5 * COPYRIGHT: See COPYING in the top level directory
6 * PROJECT: ReactOS OS/2 sub system
9 * CONTAINS: Error related CP-functions.
10 * PURPOSE: Kernelservices for OS/2 apps
11 * PROGRAMMER: Robert K. nonvolatil@yahoo.de
14 * 25-07-2002 Work to make it compile
18 #define INCL_DOSPROCESS
19 #define INCL_DOSERRORS
21 // we need the extra definitions of this file
23 #include <ddk/ntddbeep.h>
27 /*******************************************
28 DosBeep generates sound from the
32 Cycles per second (Hertz) in the range of 0x25 to
36 The length of the sound in milliseconds.
38 ulrc (APIRET) - returns
41 DosBeep returns one of the following values:
44 395 ERROR_INVALID_FREQUENCY
45 *******************************************/
46 APIRET STDCALL
DosBeep(ULONG freq
, ULONG dur
)
48 NT::BEEP_SET_PARAMETERS BeepSetParameters
;
50 NT::IO_STATUS_BLOCK ComplStatus
;
51 NT::UNICODE_STRING unistr
;
53 NT::OBJECT_ATTRIBUTES oa
= {sizeof oa
, 0, &unistr
, NT::OBJ_CASE_INSENSITIVE
, 0, 0};
55 // init String still bevore use.
56 NT::RtlInitUnicodeString( &unistr
, (NT::PWSTR
)L
"\\\\.\\Beep" );
58 if( freq
<0x25 || freq
>0x7FFF )
59 return ERROR_INVALID_FREQUENCY
; //395; //
62 BeepSetParameters
.Frequency
= freq
;
63 BeepSetParameters
.Duration
= dur
;
65 /* open the beep dirver */
66 stat
= NT::ZwOpenFile( &hBeep
,
67 FILE_READ_DATA
| FILE_WRITE_DATA
,
75 return ERROR_NOT_READY
;
79 NT::ZwDeviceIoControlFile(hBeep
, 0, // Event
82 &ComplStatus
, IOCTL_BEEP_SET
,
84 sizeof(NT::BEEP_SET_PARAMETERS
),
93 /******************************************
94 DosError disables or enables error
95 notification to end users.
98 Error and Exception pop-up flags.
100 The unused high-order bits are reserved, and must be zero. The following values can be specified
101 for this parameter. They can be combined using the "logical or" ( | ) operator.
103 FERR_DISABLEHARDERR (0x00000000)
104 Disable hard error pop-ups.
106 FERR_ENABLEHARDERR (0x00000001)
107 Enable hard error pop-ups.
109 FERR_ENABLEEXCEPTION (0x00000000)
110 Enable program exception and untrapped numeric-processor exception pop-ups.
112 FERR_DISABLEEXCEPTION (0x00000002)
113 Disable program exception and untrapped numeric-processor exception pop-ups.
115 ulrc (APIRET) - returns
118 DosError returns one of the following values:
121 87 ERROR_INVALID_PARAMETER
122 *******************************************/
123 APIRET
DosError( ULONG error
)
125 return ERROR_CALL_NOT_IMPLEMENTED
;
129 /*******************************************
130 DosMove moves a file object to another
131 location, and changes its name.
134 Address of the old path name of the file or
135 subdirectory to be moved.
138 Address of the new path name of the file or
141 ulrc (APIRET) - returns
144 DosMove returns the one of following values:
147 2 ERROR_FILE_NOT_FOUND
148 3 ERROR_PATH_NOT_FOUND
149 5 ERROR_ACCESS_DENIED
150 17 ERROR_NOT_SAME_DEVICE
151 26 ERROR_NOT_DOS_DISK
152 32 ERROR_SHARING_VIOLATION
153 36 ERROR_SHARING_BUFFER_EXCEEDED
154 87 ERROR_INVALID_PARAMETER
155 108 ERROR_DRIVE_LOCKED
156 206 ERROR_FILENAME_EXCED_RANGE
157 250 ERROR_CIRCULARITY_REQUESTED
158 251 ERROR_DIRECTORY_IN_CDS
159 *******************************************/
160 APIRET
DosMove(PSZ pszOld
, PSZ pszNew
)
162 return ERROR_CALL_NOT_IMPLEMENTED
;