ReactOS 0.4.16-dev-297-gc569aee
dem.h File Reference
#include <crt/dos.h>
#include "dos32krnl/dos.h"
Include dependency graph for dem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BOP_LOAD_DOS   0x2B
 
#define BOP_START_DOS   0x2C
 
#define BOP_DOS   0x50
 
#define BOP_CMD   0x54
 
#define BiosDisplayMessage(Format, ...)    PrintMessageAnsi(Dem_BiosCharPrint, (Format), ##__VA_ARGS__)
 
#define DosDisplayMessage(Format, ...)    PrintMessageAnsi(DosCharPrint, (Format), ##__VA_ARGS__)
 
#define FA_NORMAL   _A_NORMAL
 File attributes for demFileFindFirst().
 
#define FA_READONLY   _A_RDONLY
 
#define FA_HIDDEN   _A_HIDDEN
 
#define FA_SYSTEM   _A_SYSTEM
 
#define FA_VOLID   _A_VOLID
 
#define FA_LABEL   FA_VOLID
 
#define FA_DIRECTORY   _A_SUBDIR
 
#define FA_ARCHIVE   _A_ARCH
 
#define FA_DEVICE   0x0040
 
#define FA_VALID   (FA_ARCHIVE | FA_DIRECTORY | FA_SYSTEM | FA_HIDDEN | FA_READONLY | FA_NORMAL)
 
#define NT_TO_DOS_FA(Attrs)    ( ((Attrs) == FILE_ATTRIBUTE_NORMAL) ? FA_NORMAL : (LOBYTE(Attrs) & FA_VALID) )
 Convert Win32/NT file attributes to DOS format.
 

Functions

VOID Dem_BiosCharPrint (CHAR Character)
 
VOID DosCharPrint (CHAR Character)
 
BOOLEAN DosShutdown (BOOLEAN Immediate)
 
DWORD DosStartProcess32 (IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, IN LPCSTR Environment OPTIONAL, IN DWORD ReturnAddress OPTIONAL, IN BOOLEAN StartComSpec)
 
DWORD WINAPI demClientErrorEx (IN HANDLE FileHandle, IN CHAR Unknown, IN BOOL Flag)
 
DWORD WINAPI demFileDelete (IN LPCSTR FileName)
 
DWORD WINAPI demFileFindFirst (_Out_ PVOID pFindFileData, _In_ PCSTR FileName, _In_ WORD AttribMask)
 
DWORD WINAPI demFileFindNext (_Inout_ PVOID pFindFileData)
 
UCHAR WINAPI demGetPhysicalDriveType (IN UCHAR DriveNumber)
 
BOOL WINAPI demIsShortPathName (IN LPCSTR Path, IN BOOL Unknown)
 
DWORD WINAPI demSetCurrentDirectoryGetDrive (IN LPCSTR CurrentDirectory, OUT PUCHAR DriveNumber)
 

Macro Definition Documentation

◆ BiosDisplayMessage

#define BiosDisplayMessage (   Format,
  ... 
)     PrintMessageAnsi(Dem_BiosCharPrint, (Format), ##__VA_ARGS__)

Definition at line 34 of file dem.h.

◆ BOP_CMD

#define BOP_CMD   0x54

Definition at line 27 of file dem.h.

◆ BOP_DOS

#define BOP_DOS   0x50

Definition at line 26 of file dem.h.

◆ BOP_LOAD_DOS

#define BOP_LOAD_DOS   0x2B

Definition at line 24 of file dem.h.

◆ BOP_START_DOS

#define BOP_START_DOS   0x2C

Definition at line 25 of file dem.h.

◆ DosDisplayMessage

#define DosDisplayMessage (   Format,
  ... 
)     PrintMessageAnsi(DosCharPrint, (Format), ##__VA_ARGS__)

Definition at line 38 of file dem.h.

◆ FA_ARCHIVE

#define FA_ARCHIVE   _A_ARCH

Definition at line 76 of file dem.h.

◆ FA_DEVICE

#define FA_DEVICE   0x0040

Definition at line 77 of file dem.h.

◆ FA_DIRECTORY

#define FA_DIRECTORY   _A_SUBDIR

Definition at line 75 of file dem.h.

◆ FA_HIDDEN

#define FA_HIDDEN   _A_HIDDEN

Definition at line 71 of file dem.h.

◆ FA_LABEL

#define FA_LABEL   FA_VOLID

Definition at line 74 of file dem.h.

◆ FA_NORMAL

#define FA_NORMAL   _A_NORMAL

File attributes for demFileFindFirst().

Definition at line 69 of file dem.h.

◆ FA_READONLY

#define FA_READONLY   _A_RDONLY

Definition at line 70 of file dem.h.

◆ FA_SYSTEM

#define FA_SYSTEM   _A_SYSTEM

Definition at line 72 of file dem.h.

◆ FA_VALID

Definition at line 79 of file dem.h.

◆ FA_VOLID

#define FA_VOLID   _A_VOLID

Definition at line 73 of file dem.h.

◆ NT_TO_DOS_FA

#define NT_TO_DOS_FA (   Attrs)     ( ((Attrs) == FILE_ATTRIBUTE_NORMAL) ? FA_NORMAL : (LOBYTE(Attrs) & FA_VALID) )

Convert Win32/NT file attributes to DOS format.

Definition at line 82 of file dem.h.

Function Documentation

◆ Dem_BiosCharPrint()

VOID Dem_BiosCharPrint ( CHAR  Character)

Definition at line 57 of file dem.c.

58{
59 /* Save AX and BX */
60 USHORT AX = getAX();
61 USHORT BX = getBX();
62
63 /*
64 * Set the parameters:
65 * AL contains the character to print,
66 * BL contains the character attribute,
67 * BH contains the video page to use.
68 */
69 setAL(Character);
72
73 /* Call the BIOS INT 10h, AH=0Eh "Teletype Output" */
74 setAH(0x0E);
76
77 /* Restore AX and BX */
78 setBX(BX);
79 setAX(AX);
80}
CALLBACK16 DosContext
Definition: dos.c:40
#define AX
Definition: i386-dis.c:424
VOID Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber)
Definition: int32.c:151
unsigned short USHORT
Definition: pedump.c:61
BYTE VideoPage
Definition: bios.h:66
PBIOS_DATA_AREA Bda
Definition: bios.c:42
VOID WINAPI setBX(USHORT)
Definition: registers.c:177
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
VOID WINAPI setAL(UCHAR)
Definition: registers.c:149
VOID WINAPI setAH(UCHAR)
Definition: registers.c:135
VOID WINAPI setBL(UCHAR)
Definition: registers.c:205
USHORT WINAPI getAX(VOID)
Definition: registers.c:114
VOID WINAPI setBH(UCHAR)
Definition: registers.c:191
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
#define DEFAULT_ATTRIBUTE
Definition: vidbios.h:21
#define BIOS_VIDEO_INTERRUPT
Definition: vidbios.h:15

◆ demClientErrorEx()

DWORD WINAPI demClientErrorEx ( IN HANDLE  FileHandle,
IN CHAR  Unknown,
IN BOOL  Flag 
)

Definition at line 1392 of file dem.c.

1395{
1397 return GetLastError();
1398}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ demFileDelete()

DWORD WINAPI demFileDelete ( IN LPCSTR  FileName)

Definition at line 1402 of file dem.c.

1403{
1405
1406 return GetLastError();
1407}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define SetLastError(x)
Definition: compat.h:752
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24

Referenced by DosInt21h().

◆ demFileFindFirst()

DWORD WINAPI demFileFindFirst ( _Out_ PVOID  pFindFileData,
_In_ PCSTR  FileName,
_In_ WORD  AttribMask 
)

Definition at line 1515 of file dem.c.

1519{
1520 PDOS_FIND_FILE_BLOCK FindFileBlock = (PDOS_FIND_FILE_BLOCK)pFindFileData;
1521 HANDLE SearchHandle;
1522 WIN32_FIND_DATAA FindData;
1524
1525 /* Reset the private block fields */
1526 RtlZeroMemory(FindFileBlock, RTL_SIZEOF_THROUGH_FIELD(DOS_FIND_FILE_BLOCK, SearchHandle));
1527
1528 // TODO: Handle FA_VOLID for volume label.
1529 if (AttribMask & FA_VOLID)
1530 {
1531 DPRINT1("demFileFindFirst: Volume label attribute is UNIMPLEMENTED!\n");
1532 AttribMask &= ~FA_VOLID; // Remove it for the time being...
1533 }
1534
1535 /* Filter out the ignored attributes */
1536 AttribMask &= ~(FA_DEVICE | FA_ARCHIVE | FA_READONLY);
1537
1538 /* Start a search */
1539 SearchHandle = FindFirstFileA(FileName, &FindData);
1540 if (SearchHandle == INVALID_HANDLE_VALUE)
1541 return GetLastError();
1542
1543 /* Check the attributes and retry as long as we haven't found a matching file */
1544 while (!dempIsFileMatch(&FindData, AttribMask, &ShortName))
1545 {
1546 /* Continue searching. If we fail at some point,
1547 * stop the search and return an error. */
1548 if (!FindNextFileA(SearchHandle, &FindData))
1549 {
1550 FindClose(SearchHandle);
1551 return GetLastError();
1552 }
1553 }
1554
1555 /* Fill the block */
1556 FindFileBlock->DriveLetter = DosData->Sda.CurrentDrive + 'A';
1557 strncpy(FindFileBlock->Pattern, FileName, _countof(FindFileBlock->Pattern));
1558 FindFileBlock->AttribMask = AttribMask;
1559 FindFileBlock->SearchHandle = SearchHandle;
1560 FindFileBlock->Attributes = LOBYTE(FindData.dwFileAttributes);
1561 FileTimeToDosDateTime(&FindData.ftLastWriteTime,
1562 &FindFileBlock->FileDate,
1563 &FindFileBlock->FileTime);
1564 FindFileBlock->FileSize = FindData.nFileSizeHigh ? MAXDWORD
1565 : FindData.nFileSizeLow;
1566
1567 /* Copy the NULL-terminated short file name */
1568 RtlStringCchCopyA(FindFileBlock->FileName,
1569 _countof(FindFileBlock->FileName),
1570 ShortName);
1571
1572 return ERROR_SUCCESS;
1573}
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define DPRINT1
Definition: precomp.h:8
static BOOLEAN dempIsFileMatch(_Inout_ PWIN32_FIND_DATAA FindData, _In_ WORD AttribMask, _Out_ PCSTR *ShortName)
Helper for demFileFindFirst() and demFileFindNext(). Returns TRUE if a file matches the DOS attribute...
Definition: dem.c:1414
#define FA_VOLID
Definition: dem.h:73
#define FA_DEVICE
Definition: dem.h:77
#define FA_ARCHIVE
Definition: dem.h:76
#define FA_READONLY
Definition: dem.h:70
#define NULL
Definition: types.h:112
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
HANDLE WINAPI FindFirstFileA(IN LPCSTR lpFileName, OUT LPWIN32_FIND_DATAA lpFindFileData)
Definition: find.c:263
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileA(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAA lpFindFileData)
Definition: find.c:336
BOOL WINAPI FileTimeToDosDateTime(IN CONST FILETIME *lpFileTime, OUT LPWORD lpFatDate, OUT LPWORD lpFatTime)
Definition: time.c:37
PDOS_DATA DosData
Definition: dos.c:45
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
Definition: fatprocs.h:1307
#define LOBYTE(W)
Definition: jmemdos.c:487
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
Definition: ntbasedef.h:680
#define MAXDWORD
NTSTRSAFEAPI RtlStringCchCopyA(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:110
#define _countof(array)
Definition: sndvol32.h:70
DOS_SDA Sda
Definition: dos.h:256
HANDLE SearchHandle
Definition: dos.h:137
_Null_terminated_ CHAR FileName[13]
Definition: dos.h:144
UCHAR AttribMask
Definition: dos.h:135
CHAR DriveLetter
Definition: dos.h:133
UCHAR Attributes
Definition: dos.h:140
CHAR Pattern[11]
Definition: dos.h:134
DWORD FileSize
Definition: dos.h:143
BYTE CurrentDrive
Definition: dos.h:168
struct _DOS_FIND_FILE_BLOCK * PDOS_FIND_FILE_BLOCK
const char * PCSTR
Definition: typedefs.h:52
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by DosInt21h().

◆ demFileFindNext()

DWORD WINAPI demFileFindNext ( _Inout_ PVOID  pFindFileData)

Definition at line 1592 of file dem.c.

1594{
1595 PDOS_FIND_FILE_BLOCK FindFileBlock = (PDOS_FIND_FILE_BLOCK)pFindFileData;
1596 HANDLE SearchHandle = FindFileBlock->SearchHandle;
1597 WIN32_FIND_DATAA FindData;
1599
1600 do
1601 {
1602 /* Continue searching. If we fail at some point,
1603 * stop the search and return an error. */
1604 if (!FindNextFileA(SearchHandle, &FindData))
1605 {
1606 FindClose(SearchHandle);
1607
1608 /* Reset the private block fields */
1609 RtlZeroMemory(FindFileBlock, RTL_SIZEOF_THROUGH_FIELD(DOS_FIND_FILE_BLOCK, SearchHandle));
1610 return GetLastError();
1611 }
1612 }
1613 /* Check the attributes and retry as long as we haven't found a matching file */
1614 while (!dempIsFileMatch(&FindData, FindFileBlock->AttribMask, &ShortName));
1615
1616 /* Update the block */
1617 FindFileBlock->Attributes = LOBYTE(FindData.dwFileAttributes);
1618 FileTimeToDosDateTime(&FindData.ftLastWriteTime,
1619 &FindFileBlock->FileDate,
1620 &FindFileBlock->FileTime);
1621 FindFileBlock->FileSize = FindData.nFileSizeHigh ? MAXDWORD
1622 : FindData.nFileSizeLow;
1623
1624 /* Copy the NULL-terminated short file name */
1625 RtlStringCchCopyA(FindFileBlock->FileName,
1626 _countof(FindFileBlock->FileName),
1627 ShortName);
1628
1629 return ERROR_SUCCESS;
1630}

Referenced by DosInt21h().

◆ demGetPhysicalDriveType()

UCHAR WINAPI demGetPhysicalDriveType ( IN UCHAR  DriveNumber)

Definition at line 1634 of file dem.c.

1635{
1638}
#define DOSDEVICE_DRIVE_UNKNOWN
Definition: obtypes.h:163

◆ demIsShortPathName()

BOOL WINAPI demIsShortPathName ( IN LPCSTR  Path,
IN BOOL  Unknown 
)

Definition at line 1642 of file dem.c.

1644{
1646 return FALSE;
1647}
#define FALSE
Definition: types.h:117

◆ demSetCurrentDirectoryGetDrive()

DWORD WINAPI demSetCurrentDirectoryGetDrive ( IN LPCSTR  CurrentDirectory,
OUT PUCHAR  DriveNumber 
)

Definition at line 1651 of file dem.c.

1653{
1655 return ERROR_SUCCESS;
1656}

◆ DosCharPrint()

VOID DosCharPrint ( CHAR  Character)

Definition at line 82 of file dem.c.

83{
85}
VOID DosPrintCharacter(WORD FileHandle, CHAR Character)
Definition: bios.c:152
#define DOS_OUTPUT_HANDLE
Definition: dos.h:43

◆ DosShutdown()

BOOLEAN DosShutdown ( BOOLEAN  Immediate)

Definition at line 1331 of file dem.c.

1332{
1333 /*
1334 * Immediate = TRUE: Immediate shutdown;
1335 * FALSE: Delayed shutdown (notification).
1336 */
1337
1338#ifndef STANDALONE
1339 if (Immediate)
1340 {
1341 ExitVDM(FALSE, 0);
1342 return TRUE;
1343 }
1344 else
1345 {
1346// HACK!
1347extern HANDLE VdmTaskEvent; // see emulator.c
1348
1349 /*
1350 * Signal the root COMMAND.COM that it should terminate
1351 * when it checks for a new command.
1352 */
1354
1355 /* If the list is already empty, or just contains only one element, bail out */
1356 // FIXME: Question: if the list has only one element, is it ALWAYS RootCmd ??
1357 // FIXME: The following is hackish.
1361 ReentrancyCount == 0 &&
1363 {
1364 /* Nothing runs, so exit immediately */
1365 ExitVDM(FALSE, 0);
1366 return TRUE;
1367 }
1368
1369 return FALSE;
1370 }
1371#else
1372 UNREFERENCED_PARAMETER(Immediate);
1373 return TRUE;
1374#endif
1375}
#define WAIT_TIMEOUT
Definition: dderror.h:14
static LIST_ENTRY ComSpecInfoList
Definition: dem.c:196
static COMSPEC_INFO RootCmd
Definition: dem.c:192
static DWORD ReentrancyCount
Definition: dem.c:193
#define TRUE
Definition: types.h:120
VOID WINAPI ExitVDM(BOOL IsWow, ULONG iWowTask)
Definition: vdm.c:1392
HANDLE VdmTaskEvent
Definition: emulator.c:51
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
BOOLEAN Terminated
Definition: dem.c:189
LIST_ENTRY Entry
Definition: dem.c:186
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

Referenced by VdmShutdown().

◆ DosStartProcess32()

DWORD DosStartProcess32 ( IN LPCSTR  ExecutablePath,
IN LPCSTR  CommandLine,
IN LPCSTR Environment  OPTIONAL,
IN DWORD ReturnAddress  OPTIONAL,
IN BOOLEAN  StartComSpec 
)

Definition at line 916 of file dem.c.

921{
923 HANDLE CommandThread;
924 DOS_START_PROC32 DosStartProc32;
925#ifndef STANDALONE
928#endif
929
930 DosStartProc32.ExecutablePath = (LPSTR)ExecutablePath;
931 DosStartProc32.CommandLine = (LPSTR)CommandLine;
932 DosStartProc32.Environment = (LPSTR)Environment;
933
934#ifndef STANDALONE
935 DosStartProc32.ComSpecInfo =
936 RtlAllocateHeap(RtlGetProcessHeap(),
938 sizeof(*DosStartProc32.ComSpecInfo));
939 ASSERT(DosStartProc32.ComSpecInfo);
940
941 DosStartProc32.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
942 ASSERT(DosStartProc32.hEvent);
943#endif
944
945 /* Pause the VM and detach from the console */
948
949 /* Start the 32-bit process via another thread */
950 CommandThread = CreateThread(NULL, 0, &CommandThreadProc, &DosStartProc32, 0, NULL);
951 if (CommandThread == NULL)
952 {
953 DisplayMessage(L"FATAL: Failed to create the command processing thread: %d", GetLastError());
955 goto Quit;
956 }
957
958#ifndef STANDALONE
959 /* Close the thread handle */
960 CloseHandle(CommandThread);
961
962 /* Wait for the process to be ready to start */
963 WaitForSingleObject(DosStartProc32.hEvent, INFINITE);
964
965 /* Wait for any potential new DOS app started by the 32-bit process */
967
968Retry:
970 DPRINT1("Calling GetNextVDMCommand 32bit for possible new VDM task...\n");
972 DPRINT1("GetNextVDMCommand 32bit awaited, success = %s, last error = %d\n", Success ? "true" : "false", GetLastError());
973
974 /*
975 * Check whether we were awaited because the 32-bit process was stopped,
976 * or because it started a new DOS application.
977 */
978 if (CommandInfo.CmdLen != 0 || CommandInfo.AppLen != 0 || CommandInfo.PifLen != 0)
979 {
980 DPRINT1("GetNextVDMCommand 32bit, this is for a new VDM task - CmdLen = %d, AppLen = %d, PifLen = %d\n",
982
983 /* Repeat the request */
984 Repeat = TRUE;
985
986 /*
987 * Set 'Reentry' to TRUE or FALSE depending on whether we are going
988 * to reenter with a new COMMAND.COM. See the comment for:
989 * BOP_CMD 0x10 'Get start information'
990 * (dem.c!DosCmdInterpreterBop) for more details.
991 */
992 Reentry = StartComSpec;
993
994 /* If needed, start a new command interpreter to handle the possible incoming DOS commands */
995 if (StartComSpec)
996 {
997 //
998 // DosStartProcess32 was only called by DosCreateProcess, called from INT 21h,
999 // so the caller stack is already prepared for running a new DOS program
1000 // (Flags, CS and IP, and the extra interrupt number, are already pushed).
1001 //
1002 Result = DosStartComSpec(FALSE, Environment, ReturnAddress,
1003 &DosStartProc32.ComSpecInfo->ComSpecPsp);
1004 if (Result != ERROR_SUCCESS)
1005 {
1006 DosDisplayMessage("Failed to start a new Command Interpreter (Error: %u).\n", Result);
1007 goto Quit;
1008 }
1009 }
1010 else
1011 {
1012 /* Retrieve the PSP of the COMSPEC (current PSP set by DosLoadExecutable) */
1013 DosStartProc32.ComSpecInfo->ComSpecPsp = Sda->CurrentPsp;
1015 }
1016
1017 /* Insert the new entry in the list; it will be freed when needed by COMMAND.COM */
1018 InsertComSpecInfo(DosStartProc32.ComSpecInfo);
1019 }
1020 else
1021 {
1022 DPRINT1("GetNextVDMCommand 32bit, 32-bit app stopped\n");
1023
1024 /* Check whether this was our 32-bit app which was killed */
1025 if (!DosStartProc32.ComSpecInfo->Terminated)
1026 {
1027 DPRINT1("Not our 32-bit app, retrying...\n");
1028 goto Retry;
1029 }
1030
1031 Result = DosStartProc32.ComSpecInfo->dwExitCode;
1032
1033 /* Delete the entry */
1034 RtlFreeHeap(RtlGetProcessHeap(), 0, DosStartProc32.ComSpecInfo);
1035 }
1036#else
1037 /* Wait for the thread to finish */
1038 WaitForSingleObject(CommandThread, INFINITE);
1039 GetExitCodeThread(CommandThread, &Result);
1040
1041 /* Close the thread handle */
1042 CloseHandle(CommandThread);
1043
1044 DPRINT1("32-bit app stopped\n");
1045#endif
1046
1047Quit:
1048#ifndef STANDALONE
1049 CloseHandle(DosStartProc32.hEvent);
1050#endif
1051
1052 /* Attach to the console and resume the VM */
1055
1056 return Result;
1057}
INT __cdecl DisplayMessage(_In_opt_ HWND hWnd, _In_ UINT uType, _In_opt_ PCWSTR pszTitle, _In_opt_ PCWSTR pszFormatMessage,...)
Definition: reactos.c:211
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
Definition: classpnp.h:312
static DWORD WINAPI CommandThreadProc(LPVOID Parameter)
Definition: dem.c:828
static VOID DosProcessConsoleAttach(VOID)
Definition: dem.c:228
static BOOLEAN Repeat
Definition: dem.c:247
static VDM_COMMAND_INFO CommandInfo
Definition: dem.c:246
static BOOLEAN Reentry
Definition: dem.c:248
static VOID InsertComSpecInfo(PCOMSPEC_INFO ComSpecInfo)
Definition: dem.c:214
static DWORD DosStartComSpec(IN BOOLEAN Permanent, IN LPCSTR Environment OPTIONAL, IN DWORD ReturnAddress OPTIONAL, OUT PWORD ComSpecPsp OPTIONAL)
Definition: dem.c:772
static VOID DosProcessConsoleDetach(VOID)
Definition: dem.c:235
#define DosDisplayMessage(Format,...)
Definition: dem.h:38
#define CloseHandle
Definition: compat.h:739
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
Definition: thread.c:541
BOOL WINAPI GetNextVDMCommand(PVDM_COMMAND_INFO CommandData)
Definition: vdm.c:1420
PDOS_SDA Sda
Definition: dos.c:48
#define INFINITE
Definition: serial.h:102
VOID EmulatorResume(VOID)
Definition: emulator.c:495
VOID EmulatorPause(VOID)
Definition: emulator.c:487
@ Success
Definition: eventcreate.c:712
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ASSERT(a)
Definition: mode.c:44
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:47
#define L(x)
Definition: ntvdm.h:50
#define VDM_FLAG_DONT_WAIT
Definition: vdm.h:60
#define VDM_FLAG_NESTED_TASK
Definition: vdm.h:59
USHORT AppLen
Definition: vdm.h:91
USHORT CmdLen
Definition: vdm.h:90
USHORT PifLen
Definition: vdm.h:92
USHORT VDMState
Definition: vdm.h:94
DWORD dwExitCode
Definition: dem.c:187
WORD ComSpecPsp
Definition: dem.c:188
WORD CurrentPsp
Definition: dos.h:165
LPSTR CommandLine
Definition: dem.c:818
HANDLE hEvent
Definition: dem.c:822
PCOMSPEC_INFO ComSpecInfo
Definition: dem.c:821
LPSTR ExecutablePath
Definition: dem.c:817
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
char * LPSTR
Definition: xmlstorage.h:182

Referenced by CmdStartComSpec32(), CmdStartExternalCommand(), and DosCreateProcess().