SysHlp.cpp revision 9e278d07064bac76cd24c99cca7bef6b206211b9
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * VBoxGuestLib - A support library for VirtualBox guest additions:
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Physical memory heap
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright (C) 2006-2007 innotek GmbH
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * available from http://www.virtualbox.org. This file is free software;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * you can redistribute it and/or modify it under the terms of the GNU
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * General Public License as published by the Free Software Foundation,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * If you received this file as part of a commercial VirtualBox
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * distribution, then only the terms of your commercial VirtualBox
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * license agreement apply instead of the previous paragraph.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncint vbglLockLinear (void **ppvCtx, void *pv, uint32_t u32Size, bool fWriteAccess)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PMDL pMdl = IoAllocateMdl (pv, u32Size, FALSE, FALSE, NULL);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync /* Calls to MmProbeAndLockPages must be enclosed in a try/except block. */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync /* Default to IPRT - this ASSUMES that it is USER addresses we're locking. */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync rc = RTR0MemObjLockUser(&MemObj, pv, u32Size, NIL_RTR0PROCESS);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncvoid vbglUnlockLinear (void *pvCtx, void *pv, uint32_t u32Size)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync /* default to IPRT */
#ifdef __LINUX__
#ifdef __OS2__
#ifdef __WIN__
return VINF_SUCCESS;
return rc;
void *opaque;
if (!opaque)
return VERR_NOT_IMPLEMENTED;
return VINF_SUCCESS;
return VINF_SUCCESS;
return VERR_FILE_NOT_FOUND;
#ifdef __WIN__
&Event,
return VERR_NO_MEMORY;
NULL);
return VERR_WRONG_ORDER;
#ifdef __WIN__