internal-r3-nt.h revision 5bf0ee311caa414469f26237ff607cb1b3591508
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/* $Id$ */
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/** @file
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * IPRT - Internal Header for the Native NT code.
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync */
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/*
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * Copyright (C) 2010-2012 Oracle Corporation
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * available from http://www.virtualbox.org. This file is free software;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * you can redistribute it and/or modify it under the terms of the GNU
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * General Public License (GPL) as published by the Free Software
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * The contents of this file may alternatively be used under the terms
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * of the Common Development and Distribution License Version 1.0
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * VirtualBox OSE distribution, in which case the provisions of the
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * CDDL are applicable instead of those of the GPL.
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * You may elect to license modified versions of this file under the
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync * terms and conditions of either the GPL or the CDDL or both.
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync */
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#ifndef ___internal_r3_nt_h___
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#define ___internal_r3_nt_h___
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/*******************************************************************************
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync* Header Files *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync*******************************************************************************/
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#include <ntstatus.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#ifdef IPRT_NT_USE_WINTERNL
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# define WIN32_NO_STATUS
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# include <windef.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# include <winnt.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# include <winternl.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# define IPRT_NT_NEED_API_GROUP_1
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#elif defined(IPRT_NT_USE_WDM)
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# include <wdm.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# define IPRT_NT_NEED_API_GROUP_1
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#else
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync# include <ntifs.h>
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#endif
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/*******************************************************************************
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync* Defined Constants And Macros *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync*******************************************************************************/
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/** Initializes a IO_STATUS_BLOCK. */
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#define MY_IO_STATUS_BLOCK_INITIALIZER { STATUS_FAILED_DRIVER_ENTRY, ~(uintptr_t)42 }
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/** Similar to INVALID_HANDLE_VALUE in the Windows environment. */
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#define MY_INVALID_HANDLE_VALUE ( (HANDLE)~(uintptr_t)0 )
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/*******************************************************************************
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync* Internal Functions *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync*******************************************************************************/
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsyncint rtNtPathOpen(const char *pszPath, ACCESS_MASK fDesiredAccess, ULONG fFileAttribs, ULONG fShareAccess,
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync ULONG fCreateDisposition, ULONG fCreateOptions, ULONG fObjAttribs,
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync PHANDLE phHandle, PULONG_PTR puDisposition);
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsyncint rtNtPathClose(HANDLE hHandle);
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync/*******************************************************************************
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync* NT APIs *
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync*******************************************************************************/
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#ifdef IPRT_NT_NEED_API_GROUP_1
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsynctypedef struct _FILE_FS_ATTRIBUTE_INFORMATION
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync{
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync ULONG FileSystemAttributes;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync LONG MaximumComponentNameLength;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync ULONG FileSystemNameLength;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync WCHAR FileSystemName[1];
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync} FILE_FS_ATTRIBUTE_INFORMATION;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsynctypedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION;
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsyncextern "C" NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#endif
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync#endif
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync
33b0e5fd502b10034575ffa7c8a30c6816222ce2vboxsync