VBoxDrvTool.cpp revision e04781b223e38e3b0c386d7e7c1dd7f30e9f6e90
/* $Id$ */
/** @file
* Windows Driver R0 Tooling.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VBoxDrvTool.h"
#define VBOXDRVTOOL_MEMTAG 'TDBV'
{
return pvMem;
}
{
if (pvMem)
{
}
return pvMem;
}
{
}
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegOpenKeyU(OUT PHANDLE phKey, IN PUNICODE_STRING pName, IN ACCESS_MASK fAccess)
{
}
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegOpenKey(OUT PHANDLE phKey, IN PWCHAR pName, IN ACCESS_MASK fAccess)
{
}
{
}
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegQueryValueDword(IN HANDLE hKey, IN PWCHAR pName, OUT PULONG pDword)
{
struct
{
} Buf;
&RtlStr,
sizeof(Buf),
&cbBuf);
if (Status == STATUS_SUCCESS)
{
{
return STATUS_SUCCESS;
}
}
return STATUS_INVALID_PARAMETER;
}
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolRegSetValueDword(IN HANDLE hKey, IN PWCHAR pName, OUT ULONG val)
{
NULL, /* IN ULONG TitleIndex OPTIONAL, reserved */
&val,
sizeof(val));
}
static NTSTATUS vboxDrvToolIoCompletionSetEvent(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp, IN PVOID pvContext)
{
return STATUS_MORE_PROCESSING_REQUIRED;
}
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolIoPostAsync(PDEVICE_OBJECT pDevObj, PIRP pIrp, PKEVENT pEvent)
{
}
{
if (Status == STATUS_PENDING)
{
}
return Status;
}
/* !!!NOTE: the caller MUST be the IRP owner!!! *
* !! one can not post threaded IRPs this way!! */
VBOXDRVTOOL_DECL(NTSTATUS) VBoxDrvToolIoPostSyncWithTimeout(PDEVICE_OBJECT pDevObj, PIRP pIrp, ULONG dwTimeoutMs)
{
if (Status == STATUS_PENDING)
{
if (dwTimeoutMs != RT_INDEFINITE_WAIT)
{
}
if (Status == STATUS_TIMEOUT)
{
#ifdef DEBUG_misha
/* debugging only */
AssertFailed();
#endif
if (!IoCancelIrp(pIrp))
{
/* this may happen, but this is something the caller with timeout is not expecting */
AssertFailed();
}
/* wait for the IRP to complete */
}
else
{
}
/* by this time the IRP is completed */
}
return Status;
}
{
{
}
}
{
{
return STATUS_SUCCESS;
}
return STATUS_NO_MEMORY;
}
{
}