ReactOS  0.4.14-dev-376-gaedba84
dem.h File Reference
#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__)
 

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 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)
 

Macro Definition Documentation

◆ BiosDisplayMessage

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

Definition at line 33 of file dem.h.

◆ BOP_CMD

#define BOP_CMD   0x54

Definition at line 26 of file dem.h.

◆ BOP_DOS

#define BOP_DOS   0x50

Definition at line 25 of file dem.h.

◆ BOP_LOAD_DOS

#define BOP_LOAD_DOS   0x2B

Definition at line 23 of file dem.h.

◆ BOP_START_DOS

#define BOP_START_DOS   0x2C

Definition at line 24 of file dem.h.

◆ DosDisplayMessage

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

Definition at line 37 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 }
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
BYTE VideoPage
Definition: bios.h:66
VOID WINAPI setBL(UCHAR)
Definition: registers.c:205
VOID WINAPI setAH(UCHAR)
Definition: registers.c:135
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
VOID Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber)
Definition: int32.c:151
VOID WINAPI setAL(UCHAR)
Definition: registers.c:149
PBIOS_DATA_AREA Bda
Definition: bios.c:42
#define AX
Definition: i386-dis.c:415
#define DEFAULT_ATTRIBUTE
Definition: vidbios.h:21
#define BIOS_VIDEO_INTERRUPT
Definition: vidbios.h:15
CALLBACK16 DosContext
Definition: dos.c:40
USHORT WINAPI getAX(VOID)
Definition: registers.c:114
VOID WINAPI setBX(USHORT)
Definition: registers.c:177
VOID WINAPI setBH(UCHAR)
Definition: registers.c:191
unsigned short USHORT
Definition: pedump.c:61

◆ demClientErrorEx()

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

Definition at line 1392 of file dem.c.

1395 {
1396  UNIMPLEMENTED;
1397  return GetLastError();
1398 }
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define UNIMPLEMENTED
Definition: debug.h:114

◆ 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
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
#define SetLastError(x)
Definition: compat.h:417

Referenced by DosInt21h().

◆ demFileFindFirst()

DWORD WINAPI demFileFindFirst ( OUT PVOID  lpFindFileData,
IN LPCSTR  FileName,
IN WORD  AttribMask 
)

Definition at line 1411 of file dem.c.

1414 {
1415  BOOLEAN Success = TRUE;
1416  WIN32_FIND_DATAA FindData;
1417  HANDLE SearchHandle;
1418  PDOS_FIND_FILE_BLOCK FindFileBlock = (PDOS_FIND_FILE_BLOCK)lpFindFileData;
1419 
1420  /* Start a search */
1421  SearchHandle = FindFirstFileA(FileName, &FindData);
1422  if (SearchHandle == INVALID_HANDLE_VALUE) return GetLastError();
1423 
1424  do
1425  {
1426  /* Check the attributes and retry as long as we haven't found a matching file */
1427  if (!((FindData.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN |
1430  & ~AttribMask))
1431  {
1432  break;
1433  }
1434  }
1435  while ((Success = FindNextFileA(SearchHandle, &FindData)));
1436 
1437  /* If we failed at some point, close the search and return an error */
1438  if (!Success)
1439  {
1440  FindClose(SearchHandle);
1441  return GetLastError();
1442  }
1443 
1444  /* Fill the block */
1445  FindFileBlock->DriveLetter = DosData->Sda.CurrentDrive + 'A';
1446  FindFileBlock->AttribMask = AttribMask;
1447  FindFileBlock->SearchHandle = SearchHandle;
1448  FindFileBlock->Attributes = LOBYTE(FindData.dwFileAttributes);
1449  FileTimeToDosDateTime(&FindData.ftLastWriteTime,
1450  &FindFileBlock->FileDate,
1451  &FindFileBlock->FileTime);
1452  FindFileBlock->FileSize = FindData.nFileSizeHigh ? 0xFFFFFFFF
1453  : FindData.nFileSizeLow;
1454  /* Build a short path name */
1455  if (*FindData.cAlternateFileName)
1456  strncpy(FindFileBlock->FileName, FindData.cAlternateFileName, sizeof(FindFileBlock->FileName));
1457  else
1458  GetShortPathNameA(FindData.cFileName, FindFileBlock->FileName, sizeof(FindFileBlock->FileName));
1459 
1460  return ERROR_SUCCESS;
1461 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOBYTE(W)
Definition: jmemdos.c:487
HANDLE SearchHandle
Definition: dos.h:128
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI FindNextFileA(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAA lpFindFileData)
Definition: find.c:336
DOS_SDA Sda
Definition: dos.h:247
PDOS_DATA DosData
Definition: dos.c:45
UCHAR Attributes
Definition: dos.h:131
BYTE CurrentDrive
Definition: dos.h:159
unsigned char BOOLEAN
DWORD FileSize
Definition: dos.h:134
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
struct _DOS_FIND_FILE_BLOCK * PDOS_FIND_FILE_BLOCK
UCHAR AttribMask
Definition: dos.h:126
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
Definition: path.c:1751
BOOL WINAPI FileTimeToDosDateTime(IN CONST FILETIME *lpFileTime, OUT LPWORD lpFatDate, OUT LPWORD lpFatTime)
Definition: time.c:37
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
CHAR FileName[13]
Definition: dos.h:135
HANDLE WINAPI FindFirstFileA(IN LPCSTR lpFileName, OUT LPWIN32_FIND_DATAA lpFindFileData)
Definition: find.c:263
CHAR DriveLetter
Definition: dos.h:124
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by DosInt21h().

◆ demFileFindNext()

DWORD WINAPI demFileFindNext ( OUT PVOID  lpFindFileData)

Definition at line 1465 of file dem.c.

1466 {
1467  WIN32_FIND_DATAA FindData;
1468  PDOS_FIND_FILE_BLOCK FindFileBlock = (PDOS_FIND_FILE_BLOCK)lpFindFileData;
1469 
1470  do
1471  {
1472  /* Continue searching as long as we haven't found a matching file */
1473 
1474  /* If we failed at some point, close the search and return an error */
1475  if (!FindNextFileA(FindFileBlock->SearchHandle, &FindData))
1476  {
1477  FindClose(FindFileBlock->SearchHandle);
1478  return GetLastError();
1479  }
1480  }
1481  while ((FindData.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN |
1484  & ~FindFileBlock->AttribMask);
1485 
1486  /* Update the block */
1487  FindFileBlock->Attributes = LOBYTE(FindData.dwFileAttributes);
1488  FileTimeToDosDateTime(&FindData.ftLastWriteTime,
1489  &FindFileBlock->FileDate,
1490  &FindFileBlock->FileTime);
1491  FindFileBlock->FileSize = FindData.nFileSizeHigh ? 0xFFFFFFFF
1492  : FindData.nFileSizeLow;
1493  /* Build a short path name */
1494  if (*FindData.cAlternateFileName)
1495  strncpy(FindFileBlock->FileName, FindData.cAlternateFileName, sizeof(FindFileBlock->FileName));
1496  else
1497  GetShortPathNameA(FindData.cFileName, FindFileBlock->FileName, sizeof(FindFileBlock->FileName));
1498 
1499  return ERROR_SUCCESS;
1500 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOBYTE(W)
Definition: jmemdos.c:487
HANDLE SearchHandle
Definition: dos.h:128
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI FindNextFileA(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAA lpFindFileData)
Definition: find.c:336
UCHAR Attributes
Definition: dos.h:131
DWORD FileSize
Definition: dos.h:134
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
struct _DOS_FIND_FILE_BLOCK * PDOS_FIND_FILE_BLOCK
UCHAR AttribMask
Definition: dos.h:126
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
Definition: path.c:1751
BOOL WINAPI FileTimeToDosDateTime(IN CONST FILETIME *lpFileTime, OUT LPWORD lpFatDate, OUT LPWORD lpFatTime)
Definition: time.c:37
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
CHAR FileName[13]
Definition: dos.h:135
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by DosInt21h().

◆ demGetPhysicalDriveType()

UCHAR WINAPI demGetPhysicalDriveType ( IN UCHAR  DriveNumber)

Definition at line 1504 of file dem.c.

1505 {
1506  UNIMPLEMENTED;
1507  return DOSDEVICE_DRIVE_UNKNOWN;
1508 }
#define DOSDEVICE_DRIVE_UNKNOWN
Definition: obtypes.h:163
#define UNIMPLEMENTED
Definition: debug.h:114

◆ demIsShortPathName()

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

Definition at line 1512 of file dem.c.

1514 {
1515  UNIMPLEMENTED;
1516  return FALSE;
1517 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ demSetCurrentDirectoryGetDrive()

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

Definition at line 1521 of file dem.c.

1523 {
1524  UNIMPLEMENTED;
1525  return ERROR_SUCCESS;
1526 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define UNIMPLEMENTED
Definition: debug.h:114

◆ DosCharPrint()

VOID DosCharPrint ( CHAR  Character)

Definition at line 82 of file dem.c.

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

◆ 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!
1347 extern 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.
1358  if ((IsListEmpty(&ComSpecInfoList) ||
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 TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
struct _LIST_ENTRY * Blink
Definition: typedefs.h:120
static COMSPEC_INFO RootCmd
Definition: dem.c:192
HANDLE VdmTaskEvent
Definition: emulator.c:51
VOID WINAPI ExitVDM(BOOL IsWow, ULONG iWowTask)
Definition: vdm.c:1384
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
LIST_ENTRY Entry
Definition: dem.c:186
static LIST_ENTRY ComSpecInfoList
Definition: dem.c:196
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
BOOLEAN Terminated
Definition: dem.c:189
#define WAIT_TIMEOUT
Definition: dderror.h:14
static DWORD ReentrancyCount
Definition: dem.c:193

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
926  BOOL Success;
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 */
946  EmulatorPause();
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());
954  Result = 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 
968 Retry:
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 
1047 Quit:
1048 #ifndef STANDALONE
1049  CloseHandle(DosStartProc32.hEvent);
1050 #endif
1051 
1052  /* Attach to the console and resume the VM */
1054  EmulatorResume();
1055 
1056  return Result;
1057 }
HANDLE hEvent
Definition: dem.c:822
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:45
WORD CurrentPsp
Definition: dos.h:156
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
#define ERROR_SUCCESS
Definition: deptool.c:10
WORD ComSpecPsp
Definition: dem.c:188
static VDM_COMMAND_INFO CommandInfo
Definition: dem.c:246
static VOID InsertComSpecInfo(PCOMSPEC_INFO ComSpecInfo)
Definition: dem.c:214
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
USHORT PifLen
Definition: vdm.h:92
DWORD dwExitCode
Definition: dem.c:187
USHORT CmdLen
Definition: vdm.h:90
char * LPSTR
Definition: xmlstorage.h:182
#define DosDisplayMessage(Format,...)
Definition: dem.h:37
static VOID DosProcessConsoleAttach(VOID)
Definition: dem.c:228
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
Definition: thread.c:540
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
unsigned int BOOL
Definition: ntddk_ex.h:94
PCOMSPEC_INFO ComSpecInfo
Definition: dem.c:821
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:136
smooth NULL
Definition: ftsmooth.c:416
LPSTR ExecutablePath
Definition: dem.c:817
_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:426
IN PSCSI_REQUEST_BLOCK IN OUT NTSTATUS IN OUT BOOLEAN * Retry
Definition: class2.h:49
USHORT VDMState
Definition: vdm.h:94
#define VDM_FLAG_NESTED_TASK
Definition: vdm.h:59
static DWORD WINAPI CommandThreadProc(LPVOID Parameter)
Definition: dem.c:828
static VOID DosProcessConsoleDetach(VOID)
Definition: dem.c:235
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
BOOLEAN Terminated
Definition: dem.c:189
USHORT AppLen
Definition: vdm.h:91
unsigned long DWORD
Definition: ntddk_ex.h:95
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
static DWORD DosStartComSpec(IN BOOLEAN Permanent, IN LPCSTR Environment OPTIONAL, IN DWORD ReturnAddress OPTIONAL, OUT PWORD ComSpecPsp OPTIONAL)
Definition: dem.c:772
VOID EmulatorPause(VOID)
Definition: emulator.c:487
static const WCHAR L[]
Definition: oid.c:1250
PDOS_SDA Sda
Definition: dos.c:48
static BOOLEAN Repeat
Definition: dem.c:247
static BOOLEAN Reentry
Definition: dem.c:248
LPSTR CommandLine
Definition: dem.c:818
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DPRINT1
Definition: precomp.h:8
VOID EmulatorResume(VOID)
Definition: emulator.c:495
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
BOOL WINAPI GetNextVDMCommand(PVDM_COMMAND_INFO CommandData)
Definition: vdm.c:1412
void DisplayMessage(BOOL bConsole, BOOL bSilent, LPCTSTR lpMessage, LPCTSTR lpTitle, UINT uType)
Definition: regsvr32.c:239
#define INFINITE
Definition: serial.h:102
#define VDM_FLAG_DONT_WAIT
Definition: vdm.h:60

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