13#include "../ntldr/ntldropts.h"
114 ULONG PercentPerChunk, Percent;
155 UiMessageBox(
"Failed to allocate memory for RAM disk.");
174 Percent += PercentPerChunk;
PRTL_UNICODE_STRING_BUFFER Path
__int64 CDECL _atoi64(const char *nptr)
static ARC_STATUS RamDiskOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
static ARC_STATUS RamDiskRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
static ARC_STATUS RamDiskSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
static ARC_STATUS RamDiskClose(ULONG FileId)
static ARC_STATUS RamDiskGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
static BOOLEAN RamDiskDeviceRegistered
static ULONGLONG RamDiskFileSize
static ULONG RamDiskImageOffset
ARC_STATUS RamDiskInitialize(IN BOOLEAN InitRamDisk, IN PCSTR LoadOptions OPTIONAL, IN PCSTR DefaultPath OPTIONAL)
static ARC_STATUS RamDiskLoadVirtualFile(IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL)
static const DEVVTBL RamDiskVtbl
static ULONGLONG RamDiskOffset
static ULONGLONG RamDiskImageLength
ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
ARC_STATUS FsOpenFile(IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL, IN OPENMODE OpenMode, OUT PULONG FileId)
ARC_STATUS ArcClose(_In_ ULONG FileId)
VOID FsRegisterDevice(_In_ PCSTR DeviceName, _In_ const DEVVTBL *FuncTable)
ARC_STATUS ArcRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
VOID MmFreeMemory(PVOID MemoryPointer)
PVOID MmAllocateMemoryWithType(SIZE_T MemorySize, TYPE_OF_MEMORY MemoryType)
VOID UiUpdateProgressBar(_In_ ULONG Percentage, _In_opt_ PCSTR ProgressText)
VOID UiDrawProgressBarCenter(_In_ PCSTR ProgressText)
VOID UiMessageBox(_In_ PCSTR Format,...)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ HANDLE _In_ ULONG FileNameLength
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
PCSTR NtLdrGetOption(IN PCSTR Options, IN PCSTR OptionName)
PCSTR NtLdrGetOptionEx(IN PCSTR Options, IN PCSTR OptionName, OUT PULONG OptionLength OPTIONAL)
NTSTRSAFEAPI RtlStringCbCopyNA(_Out_writes_bytes_(cbDest) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_reads_bytes_(cbToCopy) STRSAFE_LPCSTR pszSrc, _In_ size_t cbToCopy)
PULONG MinorVersion OPTIONAL
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Inout_ PUCHAR _In_ PUCHAR _Out_ PUCHAR _Out_ PULONG ChunkSize