2014-01-26 18:25:59 +00:00
/*
* COPYRIGHT : GPL - See COPYING in the top level directory
* PROJECT : ReactOS Virtual DOS Machine
2015-09-18 17:01:49 +00:00
* FILE : subsystems / mvdm / ntvdm / dos / dem . h
2014-01-26 18:25:59 +00:00
* PURPOSE : DOS 32 - bit Emulation Support Library -
* This library is used by the built - in NTVDM DOS32 and by
* the NT 16 - bit DOS in Windows ( via BOPs ) . It also exposes
* exported functions that can be used by VDDs .
* PROGRAMMERS : Aleksandar Andrejevic < theflash AT sdf DOT lonestar DOT org >
* Hermes Belusca - Maito ( hermes . belusca @ sfr . fr )
*/
# ifndef _DEM_H_
# define _DEM_H_
2015-10-04 11:49:28 +00:00
/* INCLUDES *******************************************************************/
# include "dos32krnl/dos.h"
2015-04-21 22:48:28 +00:00
/* DEFINES ********************************************************************/
/* BOP Identifiers */
# define BOP_LOAD_DOS 0x2B // DOS Loading and Initializing BOP. In parameter (following bytes) we take a NULL-terminated string indicating the name of the DOS kernel file.
# define BOP_START_DOS 0x2C // DOS Starting BOP. In parameter (following bytes) we take a NULL-terminated string indicating the name of the DOS kernel file.
# define BOP_DOS 0x50 // DOS System BOP (for NTIO.SYS and NTDOS.SYS)
# define BOP_CMD 0x54 // DOS Command Interpreter BOP (for COMMAND.COM)
2015-05-07 01:23:33 +00:00
/* VARIABLES ******************************************************************/
2014-01-26 18:25:59 +00:00
/* FUNCTIONS ******************************************************************/
2017-12-23 23:04:15 +00:00
VOID Dem_BiosCharPrint ( CHAR Character ) ;
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
# define BiosDisplayMessage(Format, ...) \
2017-12-23 23:04:15 +00:00
PrintMessageAnsi ( Dem_BiosCharPrint , ( Format ) , # # __VA_ARGS__ )
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
2015-10-01 00:09:24 +00:00
VOID DosCharPrint ( CHAR Character ) ;
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
# define DosDisplayMessage(Format, ...) \
2015-10-01 00:09:24 +00:00
PrintMessageAnsi ( DosCharPrint , ( Format ) , # # __VA_ARGS__ )
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
BOOLEAN DosShutdown ( BOOLEAN Immediate ) ;
DWORD DosStartProcess32 ( IN LPCSTR ExecutablePath ,
IN LPCSTR CommandLine ,
IN LPCSTR Environment OPTIONAL ,
IN DWORD ReturnAddress OPTIONAL ,
IN BOOLEAN StartComSpec ) ;
2014-01-26 18:25:59 +00:00
DWORD
WINAPI
demClientErrorEx
(
IN HANDLE FileHandle ,
IN CHAR Unknown ,
IN BOOL Flag
) ;
DWORD
WINAPI
demFileDelete
(
IN LPCSTR FileName
) ;
DWORD
WINAPI
demFileFindFirst
(
OUT PVOID lpFindFileData ,
IN LPCSTR FileName ,
IN WORD AttribMask
) ;
DWORD
WINAPI
demFileFindNext
(
OUT PVOID lpFindFileData
) ;
UCHAR
WINAPI
demGetPhysicalDriveType
(
IN UCHAR DriveNumber
) ;
BOOL
WINAPI
demIsShortPathName
(
IN LPCSTR Path ,
IN BOOL Unknown
) ;
DWORD
WINAPI
demSetCurrentDirectoryGetDrive
(
IN LPCSTR CurrentDirectory ,
OUT PUCHAR DriveNumber
) ;
2015-10-04 11:49:28 +00:00
# endif // _DEM_H_
/* EOF */