strcpy(CommandLine, "cmd.exe /c ");
strcat(CommandLine, Command);
- ZeroMemory(&StartupInfo, sizeof(StartupInfo));
- ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
+ RtlZeroMemory(&StartupInfo, sizeof(StartupInfo));
+ RtlZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
StartupInfo.cb = sizeof(StartupInfo);
do
{
/* Clear the structure */
- ZeroMemory(&CommandInfo, sizeof(CommandInfo));
+ RtlZeroMemory(&CommandInfo, sizeof(CommandInfo));
/* Initialize the structure members */
CommandInfo.TaskId = SessionId;
#if 0
/* Clear the current directory buffer */
- ZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
+ RtlZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
/* Get the current directory */
if (!GetCurrentDirectoryA(MAX_PATH, CurrentDirectory))
PDOS_PSP PspBlock = SEGMENT_TO_PSP(PspSegment);
LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress);
- ZeroMemory(PspBlock, sizeof(DOS_PSP));
+ RtlZeroMemory(PspBlock, sizeof(*PspBlock));
/* Set the exit interrupt */
PspBlock->Exit[0] = 0xCD; // int 0x20
}
/* Set up the startup info structure */
- ZeroMemory(&StartupInfo, sizeof(STARTUPINFOA));
- StartupInfo.cb = sizeof(STARTUPINFOA);
+ RtlZeroMemory(&StartupInfo, sizeof(StartupInfo));
+ StartupInfo.cb = sizeof(StartupInfo);
/* Create the process */
if (!CreateProcessA(ProgramName,
case SCS_WOW_BINARY:
{
/* Clear the structure */
- ZeroMemory(&CommandInfo, sizeof(CommandInfo));
+ RtlZeroMemory(&CommandInfo, sizeof(CommandInfo));
/* Initialize the structure members */
CommandInfo.TaskId = SessionId;
GetNextVDMCommand(&CommandInfo);
/* Clear the structure */
- ZeroMemory(&CommandInfo, sizeof(CommandInfo));
+ RtlZeroMemory(&CommandInfo, sizeof(CommandInfo));
/* Update the VDM state of the task */
CommandInfo.TaskId = SessionId;
WCHAR Buffer[256];
/* Clear the current directory buffer */
- ZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
+ RtlZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
/* Get the current directory */
if (!GetCurrentDirectoryA(MAX_PATH, CurrentDirectory))
BOOLEAN DosMouseInitialize(VOID)
{
/* Clear the state */
- ZeroMemory(&DriverState, sizeof(DriverState));
+ RtlZeroMemory(&DriverState, sizeof(DriverState));
/* Initialize the interrupt handler */
RegisterDosInt32(BIOS_MOUSE_INTERRUPT, BiosMouseService);
ASSERT(hCmosRam == INVALID_HANDLE_VALUE);
/* Clear the CMOS memory */
- ZeroMemory(&CmosMemory, sizeof(CmosMemory));
+ RtlZeroMemory(&CmosMemory, sizeof(CmosMemory));
/* Always open (and if needed, create) a RAM file with shared access */
SetLastError(0); // For debugging purposes
{
/* Bad CMOS Ram file. Reinitialize the CMOS memory. */
DPRINT1("Invalid CMOS file, read bytes %u, expected bytes %u\n", CmosSize, sizeof(CmosMemory));
- ZeroMemory(&CmosMemory, sizeof(CmosMemory));
+ RtlZeroMemory(&CmosMemory, sizeof(CmosMemory));
}
DPRINT1("CMOS loading %s ; GetLastError() = %u\n", Success ? "succeeded" : "failed", GetLastError());
SetFilePointer(hCmosRam, 0, NULL, FILE_BEGIN);
#include "mouse.h"
#include "ps2.h"
+// #include "pic.h"
// HACK: For the PS/2 bypass and MOUSE.COM driver direct call
#include "dos/mouse32.h"
static VOID MouseGetPacket(PMOUSE_PACKET Packet)
{
/* Clear the packet */
- ZeroMemory(Packet, sizeof(MOUSE_PACKET));
+ RtlZeroMemory(Packet, sizeof(*Packet));
Packet->Flags |= MOUSE_ALWAYS_SET;
}
/* Fill the bitmap info header */
- ZeroMemory(&BitmapInfo->bmiHeader, sizeof(BITMAPINFOHEADER));
- BitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ RtlZeroMemory(&BitmapInfo->bmiHeader, sizeof(BitmapInfo->bmiHeader));
+ BitmapInfo->bmiHeader.biSize = sizeof(BitmapInfo->bmiHeader);
BitmapInfo->bmiHeader.biWidth = Width;
BitmapInfo->bmiHeader.biHeight = Height;
BitmapInfo->bmiHeader.biBitCount = 8;
ConsoleMutex = GraphicsBufferInfo.hMutex;
/* Clear the framebuffer */
- ZeroMemory(ConsoleFramebuffer, BitmapInfo->bmiHeader.biSizeImage);
+ RtlZeroMemory(ConsoleFramebuffer, BitmapInfo->bmiHeader.biSizeImage);
/* Set the active buffer */
VgaSetActiveScreenBuffer(GraphicsConsoleBuffer);
VOID VgaClearMemory(VOID)
{
- ZeroMemory(VgaMemory, sizeof(VgaMemory));
+ RtlZeroMemory(VgaMemory, sizeof(VgaMemory));
}
VOID VgaResetPalette(VOID)
* the hVdd gets unregistered as well as all the handlers.
*/
// IoPortProc[Port] = {NULL};
- ZeroMemory(&IoPortProc[Port], sizeof(IoPortProc[Port]));
+ RtlZeroMemory(&IoPortProc[Port], sizeof(IoPortProc[Port]));
}
VOID WINAPI
* the hVdd gets unregistered as well as all the handlers.
*/
// IoPortProc[i] = {NULL};
- ZeroMemory(&IoPortProc[i], sizeof(IoPortProc[i]));
+ RtlZeroMemory(&IoPortProc[i], sizeof(IoPortProc[i]));
}
/* Go to the next range */