Beispiel #1
0
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
	NTSTATUS status;

	status = MmInitManager();
	if (!NT_SUCCESS(status)) {
		Trace(("DriverEntry : MmInitManager() failed with status 0x%08hX\n", status));
		return status;
	}

	status = HvmInit();
	if (!NT_SUCCESS(status)) {
		Trace(("DriverEntry : HvmInit() failed with status 0x%08hX\n", status));
		MmShutdownManager();
		return status;
	}

	status = HvmSwallowBluepill();
	if (!NT_SUCCESS(status)) {
		Trace(("DriverEntry : HvmSwallowBluepill() failed with status 0x%08hX\n", status));
		MmShutdownManager();
		return status;
	}

	DriverObject->DriverUnload = DriverUnload;
	Trace(("DriverEntry: Initialization finished\n"));

	return STATUS_SUCCESS;
}
Beispiel #2
0
/**
 * effects: Install HelloWorld VMM hypervisor.
 */
NTSTATUS NTAPI MadDog_InstallHypervisor(PMadDog_Control mdCtl,PDRIVER_OBJECT DriverObject)
{
	g_HvmControl = mdCtl;
	g_HypervisorDrvObj = DriverObject;
	return HvmSwallowBluepill();
}