svn path=/trunk/; revision=7934
This commit is contained in:
Robert Kopferl 2004-01-31 01:29:11 +00:00
parent 9ac2b2c62c
commit dbd10a8033
6 changed files with 93 additions and 65 deletions

View file

@ -1,4 +1,4 @@
/* $Id: devices.cpp,v 1.4 2003/01/07 16:23:11 robd Exp $
/* $Id: devices.cpp,v 1.5 2004/01/31 01:29:11 robertk Exp $
*/
/*
*
@ -55,7 +55,7 @@
165 ERROR_MONITORS_NOT_SUPPORTED
*/
APIRET STDCALL Dos32DevIOCtl(HFILE hDevice, ULONG category, ULONG function,
APIRET STDCALL DosDevIOCtl(HFILE hDevice, ULONG category, ULONG function,
PVOID pParams,ULONG cbParmLenMax,PULONG pcbParmLen,
PVOID pData,ULONG cbDataLenMax,PULONG pcbDataLen)
{

View file

@ -1,4 +1,4 @@
/* $Id: ioctl_async.cpp,v 1.1 2002/09/04 22:19:47 robertk Exp $
/* $Id: ioctl_async.cpp,v 1.2 2004/01/31 01:29:11 robertk Exp $
*/
/*
*
@ -20,8 +20,10 @@
function implies that it is only called, if the
cathegory was 0x01.
All other parameters are the same as DosIoCtl.
FIXME: implement me
*/
void EvaluateAsyncIoCtl( HFILE hDevice, ULONG function,
APIRET EvaluateAsyncIoCtl( HFILE hDevice, ULONG function,
PVOID pParams, ULONG cbParmLenMax, PULONG pcbParmLen,
PVOID pData, ULONG cbDataLenMax, PULONG pcbDataLen)
{
@ -36,60 +38,55 @@ void EvaluateAsyncIoCtl( HFILE hDevice, ULONG function,
break;
case 0x42: // Set Line Characteristics (stop, parity, data bits)
return ERROR_INVALID_PARAMETER; // example
break;
case 0x43: // Extended Set Bit Rate .
break;
case 0x44: // Transmit Byte Immediate .
break;
case 0x45: // Set Break OFF .
break;
case 0x46: // Set Modem Control Signals .
break;
case 0x47: // Behave as if XOFF Received (stop transmit) .
break;
case 0x48: // Behave as if XON Received (start transmit) .
break;
case 0x49: // Reserved .
break;
case 0x53: // Set Device Control Block (DCB) Parameters .
break;
case 0x54: // Set Enhanced Mode Parameters .
break;
case 0x61: // Query Current Bit Rate .
break;
case 0x62: // Query Line Characteristics .
break;
case 0x63: // Extended Query Bit Rate .
break;
case 0x64: // Query COM Status .
break;
case 0x65: // Query Transmit Data Status .
break;
case 0x66: // Query Modem Control Output Signals .
break;
case 0x67: // Query Current Modem Input Signals .
break;
case 0x68: // Query Number of Characters in Receive Queue .
break;
case 0x69: // Query Number of Characters in Transmit Queue .
break;
case 0x72: // Query COM Event Information .
break;
case 0x73: // Query Device Control Block (DCB) Parameters .
break;
case 0x74: // Query Enhanced Mode Parameters .
break;
default:
return ERROR_INVALID_FUNCTION;
break;
/**
pppp
|----------+--------------------------------------------------|
| 43h |Extended Set Bit Rate |
|----------+--------------------------------------------------|
| 44h |Transmit Byte Immediate |
|----------+--------------------------------------------------|
| 45h |Set Break OFF |
|----------+--------------------------------------------------|
| 46h |Set Modem Control Signals |
|----------+--------------------------------------------------|
| 47h |Behave as if XOFF Received (stop transmit) |
|----------+--------------------------------------------------|
| 48h |Behave as if XON Received (start transmit) |
|----------+--------------------------------------------------|
| 49h |Reserved |
|----------+--------------------------------------------------|
| 4Bh |Set Break ON |
|----------+--------------------------------------------------|
| 53h |Set Device Control Block (DCB) Parameters |
|----------+--------------------------------------------------|
| 54h |Set Enhanced Mode Parameters |
|----------+--------------------------------------------------|
| 61h |Query Current Bit Rate |
|----------+--------------------------------------------------|
| 62h |Query Line Characteristics |
|----------+--------------------------------------------------|
| 63h |Extended Query Bit Rate |
|----------+--------------------------------------------------|
| 64h |Query COM Status |
|----------+--------------------------------------------------|
| 65h |Query Transmit Data Status |
|----------+--------------------------------------------------|
| 66h |Query Modem Control Output Signals |
|----------+--------------------------------------------------|
| 67h |Query Current Modem Input Signals |
|----------+--------------------------------------------------|
| 68h |Query Number of Characters in Receive Queue |
|----------+--------------------------------------------------|
| 69h |Query Number of Characters in Transmit Queue |
|----------+--------------------------------------------------|
| 6Dh |Query COM Error |
|----------+--------------------------------------------------|
| 72h |Query COM Event Information |
|----------+--------------------------------------------------|
| 73h |Query Device Control Block (DCB) Parameters |
|----------+--------------------------------------------------|
| 74h |Query Enhanced Mode Parameters |
+-------------------------------------------------------------+
pppp */
}
return ERROR_INVALID_FUNCTION;
}
@ -97,4 +94,4 @@ pppp */
/* EOF */
/* EOF */

View file

@ -1,4 +1,4 @@
; $Id: doscalls.def,v 1.5 2003/01/07 16:23:11 robd Exp $
; $Id: doscalls.def,v 1.6 2004/01/31 01:29:11 robertk Exp $
;
; Def for doscalls.dll - part of the OS/2-sub system
; for ReactOS. Provides Access to OS/2 kernel services.
@ -10,6 +10,17 @@ DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services
EXPORTS
; FIXME: fill in all exports
<<<<<<< doscalls.def
DosSleep
DosClose
DosOpen
DosRead
DosWrite
DosDevIOCtl
DosBeep
DosExit
DosCreateThread
=======
DosSleep
Dos32Close
Dos32Open
@ -19,5 +30,6 @@ Dos32Write
DosBeep
DosExit
DosCreateThread
>>>>>>> 1.5
; EOF

View file

@ -1,4 +1,4 @@
; $Id: doscalls.edf,v 1.3 2003/01/07 16:23:11 robd Exp $
; $Id: doscalls.edf,v 1.4 2004/01/31 01:29:11 robertk Exp $
;
; Def for doscalls.dll - part of the OS/2-sub system
; for ReactOS. Provides Access to OS/2 kernel services.
@ -10,6 +10,17 @@ DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services
EXPORTS
; FIXME: fill in all exports
<<<<<<< doscalls.edf
DosSleep=DosSleep
DosClose=DosClose
DosOpen=DosOpen
DosRead=DosRead
DosWrite=DosWrite
DosDevIOCtl=DosDevIOCtl
DosBeep=DosBeep
DosExit=DosExit
DosCreateThread=DosCreateThread
=======
DosSleep=DosSleep@4 @229
Dos32Close=Dos32Close@4 @257
Dos32Open=Dos32Open@32 @273
@ -19,5 +30,6 @@ Dos32Write=Dos32Write@16 @282
DosBeep=DosBeep@8 @286
DosExit=DosExit@8 @234
DosCreateThread=DosCreateThread@20 @311
>>>>>>> 1.3
; EOF

View file

@ -1,4 +1,4 @@
/* $Id: openclose.cpp,v 1.4 2003/01/07 16:23:11 robd Exp $
/* $Id: openclose.cpp,v 1.5 2004/01/31 01:29:11 robertk Exp $
*/
/*
*
@ -20,7 +20,12 @@
#include "ros2.h"
<<<<<<< openclose.cpp
APIRET STDCALL DosOpen(PSZ pszFileName, PHFILE pHf,
=======
APIRET STDCALL Dos32Open(PSZ pszFileName, PHFILE pHf,
>>>>>>> 1.4
PULONG pulAction, ULONG cbFile,
ULONG ulAttribute, ULONG fsOpenFlags,
ULONG fsOpenMode, PVOID reserved ) //ULONGPEAOP2 peaop2)
@ -123,7 +128,7 @@ IN ULONG EaLength
/* close a Handle. seems finished */
APIRET STDCALL Dos32Close(HFILE hFile)
APIRET STDCALL DosClose(HFILE hFile)
{
NT::NTSTATUS nErrCode;
nErrCode = NT::ZwClose( (NT::HANDLE)hFile );
@ -143,7 +148,7 @@ APIRET STDCALL Dos32Close(HFILE hFile)
APIRET STDCALL Dos32Read(HFILE hFile, PVOID pBuffer,
APIRET STDCALL DosRead(HFILE hFile, PVOID pBuffer,
ULONG cbRead, PULONG pcbActual)
{
NT::NTSTATUS nErrCode;
@ -166,7 +171,7 @@ APIRET STDCALL Dos32Read(HFILE hFile, PVOID pBuffer,
}
/* Generic write to a stream given by hFile */
APIRET STDCALL Dos32Write(HFILE hFile, PVOID pBuffer,
APIRET STDCALL DosWrite(HFILE hFile, PVOID pBuffer,
ULONG cbWrite, PULONG pcbActual)
{
NT::NTSTATUS nErrCode;

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.6 2003/01/07 16:23:11 robd Exp $
# $Id: makefile,v 1.7 2004/01/31 01:29:11 robertk Exp $
PATH_TO_TOP = ../../../reactos
@ -10,7 +10,7 @@ TARGET_TYPE = dynlink
TARGET_NAME = doscalls
TARGET_BASE = 0x60000000
TARGET_BASE = 0x68E00000
TARGET_CPPFLAGS =\
-Wall \
@ -21,6 +21,8 @@ TARGET_CPPFLAGS =\
# -nostdinc \
# -nostdlib \
TARGET_ENTRY = _DllMain@12
TARGET_LFLAGS = -nostartfiles
TARGET_LIBS = doscalls.a