mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 15:38:37 +00:00
- WDK and MSVC compatibility fixes.
svn path=/trunk/; revision=28151
This commit is contained in:
parent
bccb44324c
commit
ac4295e788
17 changed files with 81 additions and 63 deletions
|
@ -54,7 +54,7 @@ GetHandleInformation (HANDLE hObject,
|
|||
}
|
||||
|
||||
Status = NtQueryObject (hObject,
|
||||
ObjectHandleInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
&HandleInfo,
|
||||
sizeof(OBJECT_HANDLE_ATTRIBUTE_INFORMATION),
|
||||
&BytesWritten);
|
||||
|
@ -106,7 +106,7 @@ SetHandleInformation (HANDLE hObject,
|
|||
}
|
||||
|
||||
Status = NtQueryObject (hObject,
|
||||
ObjectHandleInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
&HandleInfo,
|
||||
sizeof(OBJECT_HANDLE_ATTRIBUTE_INFORMATION),
|
||||
&BytesWritten);
|
||||
|
@ -118,7 +118,7 @@ SetHandleInformation (HANDLE hObject,
|
|||
HandleInfo.ProtectFromClose = (dwFlags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
|
||||
|
||||
Status = NtSetInformationObject (hObject,
|
||||
ObjectHandleInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
&HandleInfo,
|
||||
sizeof(OBJECT_HANDLE_ATTRIBUTE_INFORMATION));
|
||||
if(!NT_SUCCESS(Status))
|
||||
|
|
|
@ -1903,7 +1903,7 @@ BOOLEAN SockCreateOrReferenceAsyncThread(VOID)
|
|||
HandleFlags.ProtectFromClose = TRUE;
|
||||
HandleFlags.Inherit = FALSE;
|
||||
Status = NtSetInformationObject(SockAsyncCompletionPort,
|
||||
ObjectHandleInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
&HandleFlags,
|
||||
sizeof(HandleFlags));
|
||||
}
|
||||
|
@ -2014,7 +2014,7 @@ BOOLEAN SockGetAsyncSelectHelperAfdHandle(VOID)
|
|||
HandleFlags.ProtectFromClose = TRUE;
|
||||
HandleFlags.Inherit = FALSE;
|
||||
Status = NtSetInformationObject(SockAsyncCompletionPort,
|
||||
ObjectHandleInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
&HandleFlags,
|
||||
sizeof(HandleFlags));
|
||||
|
||||
|
|
|
@ -609,13 +609,31 @@ typedef enum _FILE_STORAGE_TYPE {
|
|||
StorageTypeStream
|
||||
} FILE_STORAGE_TYPE;
|
||||
|
||||
typedef enum _OBJECT_INFO_CLASS {
|
||||
ObjectBasicInfo,
|
||||
ObjectNameInfo,
|
||||
ObjectTypeInfo,
|
||||
ObjectAllTypesInfo,
|
||||
ObjectProtectionInfo
|
||||
} OBJECT_INFO_CLASS;
|
||||
typedef enum _OBJECT_INFORMATION_CLASS
|
||||
{
|
||||
ObjectBasicInformation,
|
||||
ObjectNameInformation,
|
||||
ObjectTypeInformation,
|
||||
ObjectTypesInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
ObjectSessionInformation,
|
||||
MaxObjectInfoClass
|
||||
} OBJECT_INFORMATION_CLASS;
|
||||
|
||||
typedef struct _OBJECT_BASIC_INFORMATION
|
||||
{
|
||||
ULONG Attributes;
|
||||
ACCESS_MASK GrantedAccess;
|
||||
ULONG HandleCount;
|
||||
ULONG PointerCount;
|
||||
ULONG PagedPoolCharge;
|
||||
ULONG NonPagedPoolCharge;
|
||||
ULONG Reserved[ 3 ];
|
||||
ULONG NameInfoSize;
|
||||
ULONG TypeInfoSize;
|
||||
ULONG SecurityDescriptorSize;
|
||||
LARGE_INTEGER CreationTime;
|
||||
} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _KAPC_STATE {
|
||||
LIST_ENTRY ApcListHead[2];
|
||||
|
|
|
@ -9941,6 +9941,11 @@ NTAPI
|
|||
PsGetCurrentThreadId(
|
||||
VOID);
|
||||
|
||||
NTKERNELAPI
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetProcessId(PEPROCESS Process);
|
||||
|
||||
NTKERNELAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
|
|
|
@ -224,10 +224,11 @@ extern NTSYSAPI HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
|||
// HAL Exports
|
||||
//
|
||||
#ifndef _NTHAL_
|
||||
extern DECL_IMPORT PUCHAR *KdComPortInUse;
|
||||
extern NTHALAPI PUCHAR *KdComPortInUse;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -936,7 +936,7 @@ typedef struct _KTHREAD
|
|||
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
|
||||
PVOID MdlForLockedteb;
|
||||
#endif
|
||||
} KTHREAD;
|
||||
} KTHREAD, *PKTHREAD;
|
||||
|
||||
#define ASSERT_THREAD(object) \
|
||||
ASSERT((((object)->DispatcherHeader.Type & KOBJECT_TYPE_MASK) == ThreadObject))
|
||||
|
|
|
@ -58,6 +58,7 @@ Author:
|
|||
#define MEM_PHYSICAL 0x400000
|
||||
#define MEM_ROTATE 0x800000
|
||||
#define MEM_IMAGE SEC_IMAGE
|
||||
#define MEM_DOS_LIM 0x40000000
|
||||
|
||||
//
|
||||
// Section Flags for NtCreateSection
|
||||
|
|
|
@ -72,6 +72,20 @@ Author:
|
|||
//
|
||||
#define OBJ_NAME_PATH_SEPARATOR L'\\'
|
||||
|
||||
//
|
||||
// Object Information Classes for NtQueryInformationObject
|
||||
//
|
||||
typedef enum _OBJECT_INFORMATION_CLASS
|
||||
{
|
||||
ObjectBasicInformation,
|
||||
ObjectNameInformation,
|
||||
ObjectTypeInformation,
|
||||
ObjectTypesInformation,
|
||||
ObjectHandleFlagInformation,
|
||||
ObjectSessionInformation,
|
||||
MaxObjectInfoClass
|
||||
} OBJECT_INFORMATION_CLASS;
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
|
@ -146,18 +160,6 @@ typedef enum _OB_OPEN_REASON
|
|||
#define DOSDEVICE_DRIVE_CDROM 5
|
||||
#define DOSDEVICE_DRIVE_RAMDISK 6
|
||||
|
||||
//
|
||||
// Object Information Classes for NtQueryInformationObject
|
||||
//
|
||||
typedef enum _OBJECT_INFORMATION_CLASS
|
||||
{
|
||||
ObjectBasicInformation,
|
||||
ObjectNameInformation,
|
||||
ObjectTypeInformation,
|
||||
ObjectAllTypesInformation,
|
||||
ObjectHandleInformation
|
||||
} OBJECT_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// Dump Control Structure for Object Debugging
|
||||
//
|
||||
|
@ -297,7 +299,7 @@ typedef struct _OBJECT_TYPE_INFORMATION
|
|||
ULONG DefaultNonPagedPoolCharge;
|
||||
} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
typedef struct _OBJECT_BASIC_INFORMATION
|
||||
{
|
||||
|
@ -314,6 +316,8 @@ typedef struct _OBJECT_BASIC_INFORMATION
|
|||
LARGE_INTEGER CreateTime;
|
||||
} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
|
||||
|
||||
#else
|
||||
|
||||
typedef struct _OBJECT_CREATE_INFORMATION
|
||||
{
|
||||
ULONG Attributes;
|
||||
|
|
|
@ -117,11 +117,6 @@ PsRevertThreadToSelf(
|
|||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
NTKERNELAPI
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetProcessId(PEPROCESS Process);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
|
|
@ -36,16 +36,6 @@ Author:
|
|||
//
|
||||
#define USER_SHARED_DATA (0x7FFE0000)
|
||||
|
||||
//
|
||||
// Kernel Exports
|
||||
//
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//extern NTSYSAPI struct _EPROCESS* PsInitialSystemProcess;
|
||||
//extern NTSYSAPI POBJECT_TYPE PsProcessType;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Global Flags
|
||||
//
|
||||
|
@ -423,7 +413,7 @@ typedef enum _PSW32THREADCALLOUTTYPE
|
|||
//
|
||||
struct _W32THREAD;
|
||||
struct _W32PROCESS;
|
||||
struct _ETHREAD;
|
||||
//struct _ETHREAD;
|
||||
struct _WIN32_POWEREVENT_PARAMETERS;
|
||||
struct _WIN32_POWERSTATE_PARAMETERS;
|
||||
struct _WIN32_JOBCALLOUT_PARAMETERS;
|
||||
|
@ -1148,7 +1138,7 @@ typedef struct _ETHREAD
|
|||
KSEMAPHORE AlpcWaitSemaphore;
|
||||
ULONG CacheManagerCount;
|
||||
#endif
|
||||
} ETHREAD;
|
||||
} ETHREAD, *PETHREAD;
|
||||
|
||||
//
|
||||
// Executive Process (EPROCESS)
|
||||
|
@ -1344,7 +1334,7 @@ typedef struct _EPROCESS
|
|||
UCHAR PriorityClass;
|
||||
MM_AVL_TABLE VadRoot;
|
||||
ULONG Cookie;
|
||||
} EPROCESS;
|
||||
} EPROCESS, *PEPROCESS;
|
||||
|
||||
//
|
||||
// Job Token Filter Data
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <excpt.h>
|
||||
|
||||
/* TODO: some compilers support this */
|
||||
#define RESTRICTED_POINTER
|
||||
|
||||
|
|
|
@ -722,7 +722,7 @@ CmpFindSubKeyByName(IN PHHIVE Hive,
|
|||
HvReleaseCell(Hive, CellToRelease);
|
||||
|
||||
/* Make sure we found something valid */
|
||||
if (Found < 0) break;
|
||||
if (Found & 0x80000000) break;
|
||||
|
||||
/* Get the new Index Root and set the new cell to be released */
|
||||
if (SubKey == HCELL_NIL) continue;
|
||||
|
@ -749,7 +749,7 @@ CmpFindSubKeyByName(IN PHHIVE Hive,
|
|||
HvReleaseCell(Hive, CellToRelease);
|
||||
|
||||
/* Make sure we found a valid index */
|
||||
if (Found < 0) break;
|
||||
if (Found & 0x80000000) break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -512,7 +512,8 @@ CmpQueryKeyValueData(IN PKEY_OBJECT KeyObject,
|
|||
Info->KeyValueFullInformation.DataOffset = AlignedData;
|
||||
|
||||
/* Only the data remains to be copied */
|
||||
SizeLeft = max(0, Length - AlignedData);
|
||||
SizeLeft = (((LONG)Length - (LONG)AlignedData) < 0) ?
|
||||
0 : (Length - AlignedData);
|
||||
Size = KeySize;
|
||||
|
||||
/* Check if the caller has no space for it */
|
||||
|
|
|
@ -358,7 +358,6 @@ extern LCID PsDefaultSystemLocaleId;
|
|||
extern LIST_ENTRY PspReaperListHead;
|
||||
extern WORK_QUEUE_ITEM PspReaperWorkItem;
|
||||
extern BOOLEAN PspReaping;
|
||||
extern PEPROCESS PsInitialSystemProcess;
|
||||
extern PEPROCESS PsIdleProcess;
|
||||
extern LIST_ENTRY PsActiveProcessHead;
|
||||
extern KGUARDED_MUTEX PspActiveProcessMutex;
|
||||
|
|
|
@ -328,7 +328,7 @@ EnumerateDevices(
|
|||
PPNPROOT_FDO_DEVICE_EXTENSION DeviceExtension;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
PKEY_BASIC_INFORMATION KeyInfo = NULL, SubKeyInfo = NULL;
|
||||
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\" REGSTR_PATH_SYSTEMENUM "\\" REGSTR_KEY_ROOTENUM);
|
||||
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\" REGSTR_PATH_SYSTEMENUM L"\\" REGSTR_KEY_ROOTENUM);
|
||||
UNICODE_STRING SubKeyName;
|
||||
WCHAR DevicePath[MAX_PATH + 1];
|
||||
RTL_QUERY_REGISTRY_TABLE QueryTable[5];
|
||||
|
|
|
@ -1411,7 +1411,7 @@ NtQueryObject(IN HANDLE ObjectHandle,
|
|||
* Make sure this isn't a generic type query, since the caller doesn't
|
||||
* have to give a handle for it
|
||||
*/
|
||||
if (ObjectInformationClass != ObjectAllTypesInformation)
|
||||
if (ObjectInformationClass != ObjectTypesInformation)
|
||||
{
|
||||
/* Reference the object */
|
||||
Status = ObReferenceObjectByHandle(ObjectHandle,
|
||||
|
@ -1463,27 +1463,27 @@ NtQueryObject(IN HANDLE ObjectHandle,
|
|||
}
|
||||
|
||||
/* Copy quota information */
|
||||
BasicInfo->PagedPoolUsage = 0; /* FIXME*/
|
||||
BasicInfo->NonPagedPoolUsage = 0; /* FIXME*/
|
||||
BasicInfo->PagedPoolCharge = 0; /* FIXME*/
|
||||
BasicInfo->NonPagedPoolCharge = 0; /* FIXME*/
|
||||
|
||||
/* Copy name information */
|
||||
BasicInfo->NameInformationLength = 0; /* FIXME*/
|
||||
BasicInfo->TypeInformationLength = 0; /* FIXME*/
|
||||
BasicInfo->NameInfoSize = 0; /* FIXME*/
|
||||
BasicInfo->TypeInfoSize = 0; /* FIXME*/
|
||||
|
||||
/* Copy security information */
|
||||
BasicInfo->SecurityDescriptorLength = 0; /* FIXME*/
|
||||
BasicInfo->SecurityDescriptorSize = 0; /* FIXME*/
|
||||
|
||||
/* Check if this is a symlink */
|
||||
if (ObjectHeader->Type == ObSymbolicLinkType)
|
||||
{
|
||||
/* Return the creation time */
|
||||
BasicInfo->CreateTime.QuadPart =
|
||||
BasicInfo->CreationTime.QuadPart =
|
||||
((POBJECT_SYMBOLIC_LINK)Object)->CreationTime.QuadPart;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise return 0 */
|
||||
BasicInfo->CreateTime.QuadPart = (ULONGLONG)0;
|
||||
BasicInfo->CreationTime.QuadPart = (ULONGLONG)0;
|
||||
}
|
||||
|
||||
/* Break out with success */
|
||||
|
@ -1513,13 +1513,13 @@ NtQueryObject(IN HANDLE ObjectHandle,
|
|||
break;
|
||||
|
||||
/* Information about all types */
|
||||
case ObjectAllTypesInformation:
|
||||
case ObjectTypesInformation:
|
||||
DPRINT1("NOT IMPLEMENTED!\n");
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
break;
|
||||
|
||||
/* Information about the handle flags */
|
||||
case ObjectHandleInformation:
|
||||
case ObjectHandleFlagInformation:
|
||||
|
||||
/* Validate length */
|
||||
InfoLength = sizeof (OBJECT_HANDLE_ATTRIBUTE_INFORMATION);
|
||||
|
@ -1609,7 +1609,7 @@ NtSetInformationObject(IN HANDLE ObjectHandle,
|
|||
PAGED_CODE();
|
||||
|
||||
/* Validate the information class */
|
||||
if (ObjectInformationClass != ObjectHandleInformation)
|
||||
if (ObjectInformationClass != ObjectHandleFlagInformation)
|
||||
{
|
||||
/* Invalid class */
|
||||
return STATUS_INVALID_INFO_CLASS;
|
||||
|
|
|
@ -100,7 +100,7 @@ PopGetSysButton(
|
|||
IN PVOID Context)
|
||||
{
|
||||
PSYS_BUTTON_CONTEXT SysButtonContext = Context;
|
||||
PIO_WORKITEM CurrentWorkItem = SysButtonContext->WorkItem;;
|
||||
PIO_WORKITEM CurrentWorkItem = SysButtonContext->WorkItem;
|
||||
PIRP Irp;
|
||||
|
||||
/* Get button pressed (IOCTL_GET_SYS_BUTTON_EVENT) */
|
||||
|
|
Loading…
Reference in a new issue