mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- changed InitializeObjectAttributes() from a function to a macro
- fixed STDCALL more issues - changed some RtlLargeIntegerXxx functions to macros svn path=/trunk/; revision=801
This commit is contained in:
parent
c18e7f06ce
commit
8b829113cb
10 changed files with 529 additions and 612 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rtl.h,v 1.18 1999/11/20 21:44:09 ekohl Exp $
|
/* $Id: rtl.h,v 1.19 1999/11/27 03:29:20 ekohl Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -122,6 +122,15 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* VOID
|
||||||
|
* InitializeObjectAttributes (
|
||||||
|
* POBJECT_ATTRIBUTES InitializedAttributes,
|
||||||
|
* PUNICODE_STRING ObjectName,
|
||||||
|
* ULONG Attributes,
|
||||||
|
* HANDLE RootDirectory,
|
||||||
|
* PSECURITY_DESCRIPTOR SecurityDescriptor
|
||||||
|
* );
|
||||||
|
*
|
||||||
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
|
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
|
||||||
* subsequent call to ZwCreateXXX or ZwOpenXXX
|
* subsequent call to ZwCreateXXX or ZwOpenXXX
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -132,14 +141,17 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
|
||||||
* RootDirectory = Where the object should be placed or NULL
|
* RootDirectory = Where the object should be placed or NULL
|
||||||
* SecurityDescriptor = Ignored
|
* SecurityDescriptor = Ignored
|
||||||
*/
|
*/
|
||||||
VOID
|
|
||||||
InitializeObjectAttributes (
|
#define InitializeObjectAttributes(p,n,a,r,s) \
|
||||||
POBJECT_ATTRIBUTES InitializedAttributes,
|
{ \
|
||||||
PUNICODE_STRING ObjectName,
|
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
|
||||||
ULONG Attributes,
|
(p)->ObjectName = n; \
|
||||||
HANDLE RootDirectory,
|
(p)->Attributes = a; \
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor
|
(p)->RootDirectory = r; \
|
||||||
);
|
(p)->SecurityDescriptor = s; \
|
||||||
|
(p)->SecurityQualityOfService = NULL; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
InitializeListHead (
|
InitializeListHead (
|
||||||
|
@ -226,7 +238,7 @@ RtlAppendAsciizToString(
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
RtlAppendStringToString(
|
RtlAppendStringToString (
|
||||||
PSTRING Destination,
|
PSTRING Destination,
|
||||||
PSTRING Source
|
PSTRING Source
|
||||||
);
|
);
|
||||||
|
@ -285,11 +297,13 @@ RtlCompareUnicodeString (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlConvertLongToLargeInteger (
|
RtlConvertLongToLargeInteger (
|
||||||
LONG SignedInteger
|
LONG SignedInteger
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlConvertUlongToLargeInteger (
|
RtlConvertUlongToLargeInteger (
|
||||||
ULONG UnsignedInteger
|
ULONG UnsignedInteger
|
||||||
);
|
);
|
||||||
|
@ -366,12 +380,14 @@ RtlDowncaseUnicodeString (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlEnlargedIntegerMultiply (
|
RtlEnlargedIntegerMultiply (
|
||||||
LONG Multiplicand,
|
LONG Multiplicand,
|
||||||
LONG Multiplier
|
LONG Multiplier
|
||||||
);
|
);
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
|
STDCALL
|
||||||
RtlEnlargedUnsignedDivide (
|
RtlEnlargedUnsignedDivide (
|
||||||
ULARGE_INTEGER Dividend,
|
ULARGE_INTEGER Dividend,
|
||||||
ULONG Divisor,
|
ULONG Divisor,
|
||||||
|
@ -379,6 +395,7 @@ RtlEnlargedUnsignedDivide (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlEnlargedUnsignedMultiply (
|
RtlEnlargedUnsignedMultiply (
|
||||||
ULONG Multiplicand,
|
ULONG Multiplicand,
|
||||||
ULONG Multiplier
|
ULONG Multiplier
|
||||||
|
@ -408,12 +425,14 @@ RtlEraseUnicodeString (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlExtendedIntegerMultiply (
|
RtlExtendedIntegerMultiply (
|
||||||
LARGE_INTEGER Multiplicand,
|
LARGE_INTEGER Multiplicand,
|
||||||
LONG Multiplier
|
LONG Multiplier
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlExtendedLargeIntegerDivide (
|
RtlExtendedLargeIntegerDivide (
|
||||||
LARGE_INTEGER Dividend,
|
LARGE_INTEGER Dividend,
|
||||||
ULONG Divisor,
|
ULONG Divisor,
|
||||||
|
@ -421,6 +440,7 @@ RtlExtendedLargeIntegerDivide (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlExtendedMagicDivide (
|
RtlExtendedMagicDivide (
|
||||||
LARGE_INTEGER Dividend,
|
LARGE_INTEGER Dividend,
|
||||||
LARGE_INTEGER MagicDivisor,
|
LARGE_INTEGER MagicDivisor,
|
||||||
|
@ -475,6 +495,16 @@ RtlInitAnsiString (
|
||||||
PCSZ SourceString
|
PCSZ SourceString
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
RtlInitializeContext (
|
||||||
|
IN HANDLE ProcessHandle,
|
||||||
|
IN PCONTEXT Context,
|
||||||
|
IN PVOID Parameter,
|
||||||
|
IN PTHREAD_START_ROUTINE StartAddress,
|
||||||
|
IN OUT PINITIAL_TEB InitialTeb
|
||||||
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
RtlInitString (
|
RtlInitString (
|
||||||
|
@ -507,115 +537,182 @@ RtlIntegerToUnicodeString (
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerAdd (
|
RtlLargeIntegerAdd (
|
||||||
LARGE_INTEGER Addend1,
|
LARGE_INTEGER Addend1,
|
||||||
LARGE_INTEGER Addend2
|
LARGE_INTEGER Addend2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#define RtlLargeIntegerAnd(Result, Source, Mask) \
|
||||||
|
{ \
|
||||||
|
Result.HighPart = Source.HighPart & Mask.HighPart; \
|
||||||
|
Result.LowPart = Source.LowPart & Mask.LowPart; \
|
||||||
|
}
|
||||||
|
/*
|
||||||
VOID
|
VOID
|
||||||
RtlLargeIntegerAnd (
|
RtlLargeIntegerAnd (
|
||||||
PLARGE_INTEGER Result,
|
PLARGE_INTEGER Result,
|
||||||
LARGE_INTEGER Source,
|
LARGE_INTEGER Source,
|
||||||
LARGE_INTEGER Mask
|
LARGE_INTEGER Mask
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerArithmeticShift (
|
RtlLargeIntegerArithmeticShift (
|
||||||
LARGE_INTEGER LargeInteger,
|
LARGE_INTEGER LargeInteger,
|
||||||
CCHAR ShiftCount
|
CCHAR ShiftCount
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerDivide (
|
RtlLargeIntegerDivide (
|
||||||
LARGE_INTEGER Dividend,
|
LARGE_INTEGER Dividend,
|
||||||
LARGE_INTEGER Divisor,
|
LARGE_INTEGER Divisor,
|
||||||
PLARGE_INTEGER Remainder
|
PLARGE_INTEGER Remainder
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#define RtlLargeIntegerEqualTo(X,Y) \
|
||||||
|
(!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerEqualTo (
|
RtlLargeIntegerEqualTo (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerEqualToZero(X) \
|
||||||
|
(!((X).LowPart | (X).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerEqualToZero (
|
RtlLargeIntegerEqualToZero (
|
||||||
LARGE_INTEGER Operand
|
LARGE_INTEGER Operand
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerGreaterThan(X,Y) \
|
||||||
|
((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
|
||||||
|
((X).HighPart > (Y).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerGreaterThan (
|
RtlLargeIntegerGreaterThan (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
|
||||||
|
((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
|
||||||
|
((X).HighPart > (Y).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerGreaterThanOrEqualTo (
|
RtlLargeIntegerGreaterThanOrEqualTo (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerGreaterOrEqualToZero(X) \
|
||||||
|
((X).HighPart >= 0)
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerGreaterThanOrEqualToZero (
|
RtlLargeIntegerGreaterThanOrEqualToZero (
|
||||||
LARGE_INTEGER Operand1
|
LARGE_INTEGER Operand1
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerGreaterThanZero(X) \
|
||||||
|
((((X).HighPart == 0) && ((X).LowPart > 0)) || \
|
||||||
|
((X).HighPart > 0 ))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerGreaterThanZero (
|
RtlLargeIntegerGreaterThanZero (
|
||||||
LARGE_INTEGER Operand1
|
LARGE_INTEGER Operand1
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerLessThan(X,Y) \
|
||||||
|
((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
|
||||||
|
((X).HighPart < (Y).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerLessThan (
|
RtlLargeIntegerLessThan (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
|
||||||
|
((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
|
||||||
|
((X).HighPart < (Y).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerLessThanOrEqualTo (
|
RtlLargeIntegerLessThanOrEqualTo (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerLessOrEqualToZero(X) \
|
||||||
|
(((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerLessThanOrEqualToZero (
|
RtlLargeIntegerLessThanOrEqualToZero (
|
||||||
LARGE_INTEGER Operand
|
LARGE_INTEGER Operand
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerLessThanZero(X) \
|
||||||
|
(((X).HighPart < 0))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerLessThanZero (
|
RtlLargeIntegerLessThanZero (
|
||||||
LARGE_INTEGER Operand
|
LARGE_INTEGER Operand
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerNegate (
|
RtlLargeIntegerNegate (
|
||||||
LARGE_INTEGER Subtrahend
|
LARGE_INTEGER Subtrahend
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#define RtlLargeIntegerNotEqualTo(X,Y) \
|
||||||
|
((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerNotEqualTo (
|
RtlLargeIntegerNotEqualTo (
|
||||||
LARGE_INTEGER Operand1,
|
LARGE_INTEGER Operand1,
|
||||||
LARGE_INTEGER Operand2
|
LARGE_INTEGER Operand2
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RtlLargeIntegerNotEqualToZero(X) \
|
||||||
|
(((X).LowPart | (X).HighPart))
|
||||||
|
/*
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RtlLargeIntegerNotEqualToZero (
|
RtlLargeIntegerNotEqualToZero (
|
||||||
LARGE_INTEGER Operand
|
LARGE_INTEGER Operand
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerShiftLeft (
|
RtlLargeIntegerShiftLeft (
|
||||||
LARGE_INTEGER LargeInteger,
|
LARGE_INTEGER LargeInteger,
|
||||||
CCHAR ShiftCount
|
CCHAR ShiftCount
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerShiftRight (
|
RtlLargeIntegerShiftRight (
|
||||||
LARGE_INTEGER LargeInteger,
|
LARGE_INTEGER LargeInteger,
|
||||||
CCHAR ShiftCount
|
CCHAR ShiftCount
|
||||||
);
|
);
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
RtlLargeIntegerSubtract (
|
RtlLargeIntegerSubtract (
|
||||||
LARGE_INTEGER Minuend,
|
LARGE_INTEGER Minuend,
|
||||||
LARGE_INTEGER Subtrahend
|
LARGE_INTEGER Subtrahend
|
||||||
|
@ -934,7 +1031,7 @@ RtlNtStatusToDosError (
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
WINAPI
|
STDCALL
|
||||||
RtlDestroyHeap (
|
RtlDestroyHeap (
|
||||||
HANDLE hheap
|
HANDLE hheap
|
||||||
);
|
);
|
||||||
|
@ -949,11 +1046,11 @@ RtlReAllocateHeap (
|
||||||
);
|
);
|
||||||
|
|
||||||
HANDLE
|
HANDLE
|
||||||
WINAPI
|
STDCALL
|
||||||
RtlGetProcessHeap (VOID);
|
RtlGetProcessHeap (VOID);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
WINAPI
|
STDCALL
|
||||||
RtlLockHeap (
|
RtlLockHeap (
|
||||||
HANDLE hheap
|
HANDLE hheap
|
||||||
);
|
);
|
||||||
|
@ -987,6 +1084,31 @@ RtlValidateHeap (
|
||||||
PVOID pmem
|
PVOID pmem
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
STDCALL
|
||||||
|
RtlxAnsiStringToUnicodeSize (
|
||||||
|
IN PANSI_STRING AnsiString
|
||||||
|
);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
STDCALL
|
||||||
|
RtlxOemStringToUnicodeSize (
|
||||||
|
IN POEM_STRING OemString
|
||||||
|
);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
STDCALL
|
||||||
|
RtlxUnicodeStringToAnsiSize (
|
||||||
|
IN PUNICODE_STRING UnicodeString
|
||||||
|
);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
STDCALL
|
||||||
|
RtlxUnicodeStringToOemSize (
|
||||||
|
IN PUNICODE_STRING UnicodeString
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/* NtProcessStartup */
|
/* NtProcessStartup */
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -1001,14 +1123,6 @@ RtlDenormalizeProcessParams (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
|
||||||
RtlInitializeContext(
|
|
||||||
IN HANDLE ProcessHandle,
|
|
||||||
IN PCONTEXT Context,
|
|
||||||
IN PVOID Parameter,
|
|
||||||
IN PTHREAD_START_ROUTINE StartAddress,
|
|
||||||
IN OUT PINITIAL_TEB InitialTeb
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
; $Id: ntdll.def,v 1.24 1999/11/25 23:45:29 ekohl Exp $
|
; $Id: ntdll.def,v 1.25 1999/11/27 03:32:17 ekohl Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
LIBRARY ntdll.dll
|
LIBRARY ntdll.dll
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
InitializeObjectAttributes
|
|
||||||
NlsAnsiCodePage
|
NlsAnsiCodePage
|
||||||
NlsMbCodePageTag
|
NlsMbCodePageTag
|
||||||
NlsMbOemCodePageTag
|
NlsMbOemCodePageTag
|
||||||
|
@ -446,21 +445,21 @@ RtlCreateUserThread@40
|
||||||
RtlCompactHeap@8
|
RtlCompactHeap@8
|
||||||
RtlCompareString@12
|
RtlCompareString@12
|
||||||
RtlCompareUnicodeString@12
|
RtlCompareUnicodeString@12
|
||||||
RtlConvertLongToLargeInteger
|
RtlConvertLongToLargeInteger@4
|
||||||
RtlConvertUlongToLargeInteger
|
RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyString@8
|
RtlCopyString@8
|
||||||
RtlCopyUnicodeString@8
|
RtlCopyUnicodeString@8
|
||||||
RtlDestroyHeap@4
|
RtlDestroyHeap@4
|
||||||
RtlDowncaseUnicodeString@12
|
RtlDowncaseUnicodeString@12
|
||||||
RtlEnlargedIntegerMultiply
|
RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide
|
RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply
|
RtlEnlargedUnsignedMultiply@8
|
||||||
RtlEqualString@12
|
RtlEqualString@12
|
||||||
RtlEqualUnicodeString@12
|
RtlEqualUnicodeString@12
|
||||||
RtlEraseUnicodeString@4
|
RtlEraseUnicodeString@4
|
||||||
RtlExtendedIntegerMultiply
|
RtlExtendedIntegerMultiply@12
|
||||||
RtlExtendedLargeIntegerDivide
|
RtlExtendedLargeIntegerDivide@16
|
||||||
RtlExtendedMagicDivide
|
RtlExtendedMagicDivide@20
|
||||||
RtlFillMemory@12
|
RtlFillMemory@12
|
||||||
RtlFreeAnsiString@4
|
RtlFreeAnsiString@4
|
||||||
RtlFreeHeap@12
|
RtlFreeHeap@12
|
||||||
|
@ -473,13 +472,13 @@ RtlInitString@8
|
||||||
RtlInitUnicodeString@8
|
RtlInitUnicodeString@8
|
||||||
RtlIntegerToChar@16
|
RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString@12
|
||||||
RtlLargeIntegerAdd
|
RtlLargeIntegerAdd@16
|
||||||
RtlLargeIntegerArithmeticShift
|
RtlLargeIntegerArithmeticShift@12
|
||||||
RtlLargeIntegerDivide
|
RtlLargeIntegerDivide@20
|
||||||
RtlLargeIntegerNegate
|
RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft
|
RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight
|
RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract
|
RtlLargeIntegerSubtract@16
|
||||||
RtlLengthSecurityDescriptor
|
RtlLengthSecurityDescriptor
|
||||||
RtlLockHeap@4
|
RtlLockHeap@4
|
||||||
RtlMoveMemory@12
|
RtlMoveMemory@12
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
; $Id: ntdll.edf,v 1.14 1999/11/25 23:45:30 ekohl Exp $
|
; $Id: ntdll.edf,v 1.15 1999/11/27 03:32:17 ekohl Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
LIBRARY ntdll.dll
|
LIBRARY ntdll.dll
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
InitializeObjectAttributes
|
|
||||||
NlsAnsiCodePage
|
NlsAnsiCodePage
|
||||||
NlsMbCodePageTag
|
NlsMbCodePageTag
|
||||||
NlsMbOemCodePageTag
|
NlsMbOemCodePageTag
|
||||||
|
@ -444,21 +443,21 @@ RtlCreateUserThread=RtlCreateUserThread@40
|
||||||
RtlCompactHeap=RtlCompactHeap@8
|
RtlCompactHeap=RtlCompactHeap@8
|
||||||
RtlCompareString=RtlCompareString@12
|
RtlCompareString=RtlCompareString@12
|
||||||
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
||||||
RtlConvertLongToLargeInteger
|
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
|
||||||
RtlConvertUlongToLargeInteger
|
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyString=RtlCopyString@8
|
RtlCopyString=RtlCopyString@8
|
||||||
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
||||||
RtlDestroyHeap=RtlDestroyHeap@4
|
RtlDestroyHeap=RtlDestroyHeap@4
|
||||||
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
|
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
|
||||||
RtlEnlargedIntegerMultiply
|
RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide
|
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply
|
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
|
||||||
RtlEqualString=RtlEqualString@12
|
RtlEqualString=RtlEqualString@12
|
||||||
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
||||||
RtlEraseUnicodeString=RtlEraseUnicodeString@4
|
RtlEraseUnicodeString=RtlEraseUnicodeString@4
|
||||||
RtlExtendedIntegerMultiply
|
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
|
||||||
RtlExtendedLargeIntegerDivide
|
RtlExtendedLargeIntegerDivide=RtlExtendedLargeIntegerDivide@16
|
||||||
RtlExtendedMagicDivide
|
RtlExtendedMagicDivide=RtlExtendedMagicDivide@20
|
||||||
RtlFillMemory=RtlFillMemory@12
|
RtlFillMemory=RtlFillMemory@12
|
||||||
RtlFreeAnsiString=RtlFreeAnsiString@4
|
RtlFreeAnsiString=RtlFreeAnsiString@4
|
||||||
RtlFreeHeap=RtlFreeHeap@12
|
RtlFreeHeap=RtlFreeHeap@12
|
||||||
|
@ -470,13 +469,13 @@ RtlInitString=RtlInitString@8
|
||||||
RtlInitUnicodeString=RtlInitUnicodeString@8
|
RtlInitUnicodeString=RtlInitUnicodeString@8
|
||||||
RtlIntegerToChar=RtlIntegerToChar@16
|
RtlIntegerToChar=RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
||||||
RtlLargeIntegerAdd
|
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
|
||||||
RtlLargeIntegerArithmeticShift
|
RtlLargeIntegerArithmeticShift=RtlLargeIntegerArithmeticShift@12
|
||||||
RtlLargeIntegerDivide
|
RtlLargeIntegerDivide=RtlLargeIntegerDivide@20
|
||||||
RtlLargeIntegerNegate
|
RtlLargeIntegerNegate=RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft
|
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight
|
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract
|
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
|
||||||
RtlLengthSecurityDescriptor
|
RtlLengthSecurityDescriptor
|
||||||
RtlLockHeap=RtlLockHeap@4
|
RtlLockHeap=RtlLockHeap@4
|
||||||
RtlMoveMemory=RtlMoveMemory@12
|
RtlMoveMemory=RtlMoveMemory@12
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: makefile,v 1.26 1999/11/15 15:57:27 ekohl Exp $
|
# $Id: makefile,v 1.27 1999/11/27 03:31:43 ekohl Exp $
|
||||||
#
|
#
|
||||||
# ReactOS Operating System
|
# ReactOS Operating System
|
||||||
#
|
#
|
||||||
|
@ -24,8 +24,8 @@ endif
|
||||||
all: $(DLLTARGET)
|
all: $(DLLTARGET)
|
||||||
|
|
||||||
RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
|
RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
|
||||||
rtl/mem.o rtl/namespc.o rtl/security.o rtl/unicode.o \
|
rtl/mem.o rtl/nls.o rtl/process.o rtl/security.o \
|
||||||
rtl/thread.o rtl/process.o rtl/nls.o
|
rtl/thread.o rtl/unicode.o
|
||||||
|
|
||||||
STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
|
STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
|
||||||
stdlib/strtol.o stdlib/strtoul.o
|
stdlib/strtol.o stdlib/strtoul.o
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: largeint.c,v 1.6 1999/11/15 16:00:19 ekohl Exp $
|
/* $Id: largeint.c,v 1.7 1999/11/27 03:32:55 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -19,276 +19,232 @@
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlConvertLongToLargeInteger(LONG SignedInteger)
|
STDCALL
|
||||||
|
RtlConvertLongToLargeInteger (
|
||||||
|
LONG SignedInteger
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = SignedInteger;
|
RC.QuadPart = SignedInteger;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
|
STDCALL
|
||||||
|
RtlConvertUlongToLargeInteger (
|
||||||
|
ULONG UnsignedInteger
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = UnsignedInteger;
|
RC.QuadPart = UnsignedInteger;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlEnlargedIntegerMultiply(LONG Multiplicand,
|
STDCALL
|
||||||
LONG Multiplier)
|
RtlEnlargedIntegerMultiply (
|
||||||
|
LONG Multiplicand,
|
||||||
|
LONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = (LONGLONG) Multiplicand * Multiplier;
|
RC.QuadPart = (LONGLONG) Multiplicand * Multiplier;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
|
STDCALL
|
||||||
ULONG Divisor,
|
RtlEnlargedUnsignedDivide (
|
||||||
PULONG Remainder)
|
ULARGE_INTEGER Dividend,
|
||||||
|
ULONG Divisor,
|
||||||
|
PULONG Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (Remainder)
|
if (Remainder)
|
||||||
*Remainder = Dividend.QuadPart % Divisor;
|
*Remainder = Dividend.QuadPart % Divisor;
|
||||||
|
|
||||||
return (ULONG)(Dividend.QuadPart / Divisor);
|
return (ULONG)(Dividend.QuadPart / Divisor);
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
|
STDCALL
|
||||||
ULONG Multiplier)
|
RtlEnlargedUnsignedMultiply (
|
||||||
|
ULONG Multiplicand,
|
||||||
|
ULONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = (ULONGLONG) Multiplicand * Multiplier;
|
RC.QuadPart = (ULONGLONG) Multiplicand * Multiplier;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
|
||||||
|
|
||||||
LARGE_INTEGER
|
|
||||||
RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
|
|
||||||
LONG Multiplier)
|
|
||||||
{
|
|
||||||
LARGE_INTEGER RC;
|
|
||||||
|
|
||||||
RC.QuadPart = Multiplicand.QuadPart * Multiplier;
|
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
ULONG Divisor,
|
RtlExtendedIntegerMultiply (
|
||||||
PULONG Remainder)
|
LARGE_INTEGER Multiplicand,
|
||||||
|
LONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
if (Remainder)
|
RC.QuadPart = Multiplicand.QuadPart * Multiplier;
|
||||||
*Remainder = Dividend.QuadPart % Divisor;
|
|
||||||
|
|
||||||
RC.QuadPart = Dividend.QuadPart / Divisor;
|
return RC;
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlExtendedMagicDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
LARGE_INTEGER MagicDivisor,
|
RtlExtendedLargeIntegerDivide (
|
||||||
CCHAR ShiftCount)
|
LARGE_INTEGER Dividend,
|
||||||
|
ULONG Divisor,
|
||||||
|
PULONG Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
LARGE_INTEGER RC;
|
||||||
}
|
|
||||||
|
|
||||||
LARGE_INTEGER
|
if (Remainder)
|
||||||
RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
|
*Remainder = Dividend.QuadPart % Divisor;
|
||||||
LARGE_INTEGER Addend2)
|
|
||||||
{
|
|
||||||
LARGE_INTEGER RC;
|
|
||||||
|
|
||||||
RC.QuadPart = Addend1.QuadPart + Addend2.QuadPart;
|
RC.QuadPart = Dividend.QuadPart / Divisor;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
RtlLargeIntegerAnd(PLARGE_INTEGER Result,
|
|
||||||
LARGE_INTEGER Source,
|
|
||||||
LARGE_INTEGER Mask)
|
|
||||||
{
|
|
||||||
Result->QuadPart = Source.QuadPart & Mask.QuadPart;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlExtendedMagicDivide (
|
||||||
|
LARGE_INTEGER Dividend,
|
||||||
|
LARGE_INTEGER MagicDivisor,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
UNIMPLEMENTED;
|
||||||
CHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
|
||||||
|
|
||||||
if (Shift < 32)
|
|
||||||
{
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* copy the sign bit */
|
|
||||||
RC.u.HighPart |= (LargeInteger.u.HighPart & 0x80000000);
|
|
||||||
RC.u.LowPart = LargeInteger.u.HighPart >> Shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
LARGE_INTEGER Divisor,
|
RtlLargeIntegerAdd (
|
||||||
PLARGE_INTEGER Remainder)
|
LARGE_INTEGER Addend1,
|
||||||
|
LARGE_INTEGER Addend2
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
if (Remainder)
|
RC.QuadPart = Addend1.QuadPart + Addend2.QuadPart;
|
||||||
Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
|
|
||||||
|
|
||||||
|
return RC;
|
||||||
RC.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
|
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart == Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart == 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThan(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart > Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanOrEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart >= Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanOrEqualToZero(LARGE_INTEGER Operand1)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanZero(LARGE_INTEGER Operand1)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThan(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart < Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanOrEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart <= Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanOrEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart <= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart < 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
|
STDCALL
|
||||||
|
RtlLargeIntegerArithmeticShift (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
CHAR Shift;
|
||||||
|
|
||||||
RC.QuadPart = - Subtrahend.QuadPart;
|
Shift = ShiftCount % 64;
|
||||||
|
|
||||||
return RC;
|
if (Shift < 32)
|
||||||
}
|
{
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* copy the sign bit */
|
||||||
|
RC.u.HighPart |= (LargeInteger.u.HighPart & 0x80000000);
|
||||||
|
RC.u.LowPart = LargeInteger.u.HighPart >> Shift;
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN
|
return RC;
|
||||||
RtlLargeIntegerNotEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart != Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerNotEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlLargeIntegerDivide (
|
||||||
|
LARGE_INTEGER Dividend,
|
||||||
|
LARGE_INTEGER Divisor,
|
||||||
|
PLARGE_INTEGER Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
CCHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
if (Remainder)
|
||||||
|
Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
|
||||||
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart << Shift;
|
RC.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlLargeIntegerNegate (
|
||||||
|
LARGE_INTEGER Subtrahend
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
CCHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
RC.QuadPart = - Subtrahend.QuadPart;
|
||||||
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
return RC;
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerSubtract(LARGE_INTEGER Minuend,
|
STDCALL
|
||||||
LARGE_INTEGER Subtrahend)
|
RtlLargeIntegerShiftLeft (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
CCHAR Shift;
|
||||||
|
|
||||||
RC.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart;
|
Shift = ShiftCount % 64;
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart << Shift;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
|
}
|
||||||
|
|
||||||
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
|
RtlLargeIntegerShiftRight (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER RC;
|
||||||
|
CCHAR Shift;
|
||||||
|
|
||||||
|
Shift = ShiftCount % 64;
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
||||||
|
|
||||||
|
return RC;
|
||||||
|
}
|
||||||
|
|
||||||
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
|
RtlLargeIntegerSubtract (
|
||||||
|
LARGE_INTEGER Minuend,
|
||||||
|
LARGE_INTEGER Subtrahend
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
|
RC.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart;
|
||||||
|
|
||||||
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
/* $Id: namespc.c,v 1.2 1999/09/29 23:10:25 ekohl Exp $
|
|
||||||
*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS kernel
|
|
||||||
* FILE: ntoskrnl/lib/ntdll/namespc.c
|
|
||||||
* PURPOSE: Manages the system namespace
|
|
||||||
* PROGRAMMER: David Welch (welch@mcmail.com)
|
|
||||||
* UPDATE HISTORY:
|
|
||||||
* 24/12/98: Created
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* INCLUDES ***************************************************************/
|
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
|
|
||||||
/* FUNCTIONS **************************************************************/
|
|
||||||
|
|
||||||
VOID InitializeObjectAttributes(POBJECT_ATTRIBUTES InitializedAttributes,
|
|
||||||
PUNICODE_STRING ObjectName,
|
|
||||||
ULONG Attributes,
|
|
||||||
HANDLE RootDirectory,
|
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor)
|
|
||||||
/*
|
|
||||||
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
|
|
||||||
* subsequent call to ZwCreateXXX or ZwOpenXXX
|
|
||||||
* ARGUMENTS:
|
|
||||||
* InitializedAttributes (OUT) = Caller supplied storage for the
|
|
||||||
* object attributes
|
|
||||||
* ObjectName = Full path name for object
|
|
||||||
* Attributes = Attributes for the object
|
|
||||||
* RootDirectory = Where the object should be placed or NULL
|
|
||||||
* SecurityDescriptor = Ignored
|
|
||||||
*
|
|
||||||
* NOTE:
|
|
||||||
* Either ObjectName is a fully qualified pathname or a path relative
|
|
||||||
* to RootDirectory
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
InitializedAttributes->Length=sizeof(OBJECT_ATTRIBUTES);
|
|
||||||
InitializedAttributes->RootDirectory=RootDirectory;
|
|
||||||
InitializedAttributes->ObjectName=ObjectName;
|
|
||||||
InitializedAttributes->Attributes=Attributes;
|
|
||||||
InitializedAttributes->SecurityDescriptor=SecurityDescriptor;
|
|
||||||
InitializedAttributes->SecurityQualityOfService=NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.def,v 1.28 1999/11/25 23:35:24 ekohl Exp $
|
; $Id: ntoskrnl.def,v 1.29 1999/11/27 03:29:46 ekohl Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -74,7 +74,7 @@ ExReleaseResourceForThreadLite
|
||||||
ExSystemTimeToLocalTime
|
ExSystemTimeToLocalTime
|
||||||
ExTryToAcquireResourceExclusiveLite
|
ExTryToAcquireResourceExclusiveLite
|
||||||
HalRegisterServiceTable
|
HalRegisterServiceTable
|
||||||
InitializeObjectAttributes
|
;InitializeObjectAttributes
|
||||||
IoAllocateController
|
IoAllocateController
|
||||||
IoAttachDeviceToDeviceStack
|
IoAttachDeviceToDeviceStack
|
||||||
IoBuildSynchronousFsdRequest
|
IoBuildSynchronousFsdRequest
|
||||||
|
@ -185,21 +185,21 @@ RtlCharToInteger@12
|
||||||
RtlCompareMemory@12
|
RtlCompareMemory@12
|
||||||
RtlCompareString@12
|
RtlCompareString@12
|
||||||
RtlCompareUnicodeString@12
|
RtlCompareUnicodeString@12
|
||||||
RtlConvertLongToLargeInteger
|
RtlConvertLongToLargeInteger@4
|
||||||
RtlConvertUlongToLargeInteger
|
RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyMemory
|
RtlCopyMemory
|
||||||
RtlCopyString@8
|
RtlCopyString@8
|
||||||
RtlCopyUnicodeString@8
|
RtlCopyUnicodeString@8
|
||||||
RtlCreateUnicodeString@8
|
RtlCreateUnicodeString@8
|
||||||
RtlDowncaseUnicodeString@12
|
RtlDowncaseUnicodeString@12
|
||||||
RtlEnlargedIntegerMultiply
|
RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide
|
RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply
|
RtlEnlargedUnsignedMultiply@8
|
||||||
RtlEqualString@12
|
RtlEqualString@12
|
||||||
RtlEqualUnicodeString@12
|
RtlEqualUnicodeString@12
|
||||||
RtlExtendedIntegerMultiply
|
RtlExtendedIntegerMultiply@12
|
||||||
RtlExtendedLargeIntegerDivide
|
RtlExtendedLargeIntegerDivide@16
|
||||||
RtlExtendedMagicDivide
|
RtlExtendedMagicDivide@20
|
||||||
RtlFillMemory@12
|
RtlFillMemory@12
|
||||||
RtlFillMemoryUlong@12
|
RtlFillMemoryUlong@12
|
||||||
RtlFreeAnsiString@4
|
RtlFreeAnsiString@4
|
||||||
|
@ -211,13 +211,13 @@ RtlInitString@8
|
||||||
RtlInitUnicodeString@8
|
RtlInitUnicodeString@8
|
||||||
RtlIntegerToChar@16
|
RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString@12
|
||||||
RtlLargeIntegerAdd
|
RtlLargeIntegerAdd@16
|
||||||
RtlLargeIntegerArithmeticShift
|
RtlLargeIntegerArithmeticShift@12
|
||||||
RtlLargeIntegerDivide
|
RtlLargeIntegerDivide@20
|
||||||
RtlLargeIntegerNegate
|
RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft
|
RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight
|
RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract
|
RtlLargeIntegerSubtract@16
|
||||||
RtlMoveMemory@12
|
RtlMoveMemory@12
|
||||||
RtlMultiByteToUnicodeN@20
|
RtlMultiByteToUnicodeN@20
|
||||||
RtlMultiByteToUnicodeSize@12
|
RtlMultiByteToUnicodeSize@12
|
||||||
|
@ -359,8 +359,8 @@ _wcsnicmp
|
||||||
_wcsnset
|
_wcsnset
|
||||||
_wcsrev
|
_wcsrev
|
||||||
_wcsupr
|
_wcsupr
|
||||||
;atoi
|
atoi
|
||||||
;atol
|
atol
|
||||||
isdigit
|
isdigit
|
||||||
islower
|
islower
|
||||||
isprint
|
isprint
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.edf,v 1.15 1999/11/25 23:35:24 ekohl Exp $
|
; $Id: ntoskrnl.edf,v 1.16 1999/11/27 03:29:46 ekohl Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -74,7 +74,7 @@ ExReleaseResourceForThreadLite
|
||||||
ExSystemTimeToLocalTime
|
ExSystemTimeToLocalTime
|
||||||
ExTryToAcquireResourceExclusiveLite
|
ExTryToAcquireResourceExclusiveLite
|
||||||
HalRegisterServiceTable
|
HalRegisterServiceTable
|
||||||
InitializeObjectAttributes
|
;InitializeObjectAttributes
|
||||||
IoAllocateController
|
IoAllocateController
|
||||||
IoAttachDeviceToDeviceStack
|
IoAttachDeviceToDeviceStack
|
||||||
IoBuildSynchronousFsdRequest
|
IoBuildSynchronousFsdRequest
|
||||||
|
@ -185,21 +185,21 @@ RtlCharToInteger=RtlCharToInteger@12
|
||||||
RtlCompareMemory=RtlCompareMemory@12
|
RtlCompareMemory=RtlCompareMemory@12
|
||||||
RtlCompareString=RtlCompareString@12
|
RtlCompareString=RtlCompareString@12
|
||||||
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
||||||
RtlConvertLongToLargeInteger
|
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
|
||||||
RtlConvertUlongToLargeInteger
|
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyMemory
|
RtlCopyMemory
|
||||||
RtlCopyString=RtlCopyString@8
|
RtlCopyString=RtlCopyString@8
|
||||||
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
||||||
RtlCreateUnicodeString=RtlCreateUnicodeString@8
|
RtlCreateUnicodeString=RtlCreateUnicodeString@8
|
||||||
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
|
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
|
||||||
RtlEnlargedIntegerMultiply
|
RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide
|
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply
|
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
|
||||||
RtlEqualString=RtlEqualString@12
|
RtlEqualString=RtlEqualString@12
|
||||||
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
||||||
RtlExtendedIntegerMultiply
|
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
|
||||||
RtlExtendedLargeIntegerDivide
|
RtlExtendedLargeIntegerDivide=RtlExtendedLargeIntegerDivide@16
|
||||||
RtlExtendedMagicDivide
|
RtlExtendedMagicDivide=RtlExtendedMagicDivide@20
|
||||||
RtlFillMemory=RtlFillMemory@12
|
RtlFillMemory=RtlFillMemory@12
|
||||||
RtlFillMemoryUlong=RtlFillMemoryUlong@12
|
RtlFillMemoryUlong=RtlFillMemoryUlong@12
|
||||||
RtlFreeAnsiString=RtlFreeAnsiString@4
|
RtlFreeAnsiString=RtlFreeAnsiString@4
|
||||||
|
@ -211,13 +211,13 @@ RtlInitString=RtlInitString@8
|
||||||
RtlInitUnicodeString=RtlInitUnicodeString@8
|
RtlInitUnicodeString=RtlInitUnicodeString@8
|
||||||
RtlIntegerToChar=RtlIntegerToChar@16
|
RtlIntegerToChar=RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
||||||
RtlLargeIntegerAdd
|
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
|
||||||
RtlLargeIntegerArithmeticShift
|
RtlLargeIntegerArithmeticShift=RtlLargeIntegerArithmeticShift@12
|
||||||
RtlLargeIntegerDivide
|
RtlLargeIntegerDivide=RtlLargeIntegerDivide@20
|
||||||
RtlLargeIntegerNegate
|
RtlLargeIntegerNegate=RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft
|
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight
|
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract
|
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
|
||||||
RtlMoveMemory=RtlMoveMemory@12
|
RtlMoveMemory=RtlMoveMemory@12
|
||||||
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
|
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
|
||||||
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
|
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
|
||||||
|
@ -357,8 +357,8 @@ _wcsnicmp
|
||||||
_wcsnset
|
_wcsnset
|
||||||
_wcsrev
|
_wcsrev
|
||||||
_wcsupr
|
_wcsupr
|
||||||
;atoi
|
atoi
|
||||||
;atol
|
atol
|
||||||
isdigit
|
isdigit
|
||||||
islower
|
islower
|
||||||
isprint
|
isprint
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: dirobj.c,v 1.5 1999/08/29 06:59:10 ea Exp $
|
/* $Id: dirobj.c,v 1.6 1999/11/27 03:31:08 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -57,9 +57,9 @@ NtOpenDirectoryObject (
|
||||||
{
|
{
|
||||||
PVOID Object;
|
PVOID Object;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
*DirectoryHandle = 0;
|
*DirectoryHandle = 0;
|
||||||
|
|
||||||
Status = ObReferenceObjectByName(
|
Status = ObReferenceObjectByName(
|
||||||
ObjectAttributes->ObjectName,
|
ObjectAttributes->ObjectName,
|
||||||
ObjectAttributes->Attributes,
|
ObjectAttributes->Attributes,
|
||||||
|
@ -74,7 +74,7 @@ NtOpenDirectoryObject (
|
||||||
{
|
{
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = ObCreateHandle(
|
Status = ObCreateHandle(
|
||||||
PsGetCurrentProcess(),
|
PsGetCurrentProcess(),
|
||||||
Object,
|
Object,
|
||||||
|
@ -152,9 +152,9 @@ NtQueryDirectoryObject (
|
||||||
dir,
|
dir,
|
||||||
HEADER_TO_BODY(&(namespc_root.hdr))
|
HEADER_TO_BODY(&(namespc_root.hdr))
|
||||||
);
|
);
|
||||||
|
|
||||||
// assert_irql(PASSIVE_LEVEL);
|
// assert_irql(PASSIVE_LEVEL);
|
||||||
|
|
||||||
Status = ObReferenceObjectByHandle(
|
Status = ObReferenceObjectByHandle(
|
||||||
DirObjHandle,
|
DirObjHandle,
|
||||||
DIRECTORY_QUERY,
|
DIRECTORY_QUERY,
|
||||||
|
@ -170,11 +170,11 @@ NtQueryDirectoryObject (
|
||||||
|
|
||||||
EntriesToRead = BufferLength / sizeof (OBJDIR_INFORMATION);
|
EntriesToRead = BufferLength / sizeof (OBJDIR_INFORMATION);
|
||||||
*DataWritten = 0;
|
*DataWritten = 0;
|
||||||
|
|
||||||
DPRINT("EntriesToRead %d\n",EntriesToRead);
|
DPRINT("EntriesToRead %d\n",EntriesToRead);
|
||||||
|
|
||||||
current_entry = dir->head.Flink;
|
current_entry = dir->head.Flink;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optionally, skip over some entries at the start of the directory
|
* Optionally, skip over some entries at the start of the directory
|
||||||
*/
|
*/
|
||||||
|
@ -188,9 +188,9 @@ NtQueryDirectoryObject (
|
||||||
current_entry = current_entry->Flink;
|
current_entry = current_entry->Flink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("DirObjInformation %x\n",DirObjInformation);
|
DPRINT("DirObjInformation %x\n",DirObjInformation);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the maximum entries possible into the buffer
|
* Read the maximum entries possible into the buffer
|
||||||
*/
|
*/
|
||||||
|
@ -232,7 +232,7 @@ NtQueryDirectoryObject (
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
}
|
}
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optionally, count the number of entries in the directory
|
* Optionally, count the number of entries in the directory
|
||||||
*/
|
*/
|
||||||
|
@ -285,7 +285,7 @@ NtCreateDirectoryObject (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PDIRECTORY_OBJECT dir;
|
PDIRECTORY_OBJECT dir;
|
||||||
|
|
||||||
dir = ObCreateObject(
|
dir = ObCreateObject(
|
||||||
DirectoryHandle,
|
DirectoryHandle,
|
||||||
DesiredAccess,
|
DesiredAccess,
|
||||||
|
@ -295,65 +295,4 @@ NtCreateDirectoryObject (
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* NAME (MACRO in DDK)
|
|
||||||
* InitializeObjectAttributes
|
|
||||||
*
|
|
||||||
* DESCRIPTION
|
|
||||||
* Sets up a parameter of type OBJECT_ATTRIBUTES for a
|
|
||||||
* subsequent call to ZwCreateXXX or ZwOpenXXX.
|
|
||||||
*
|
|
||||||
* ARGUMENTS
|
|
||||||
* InitializedAttributes (OUT)
|
|
||||||
* Caller supplied storage for the object attributes.
|
|
||||||
*
|
|
||||||
* ObjectName
|
|
||||||
* Full path name for object.
|
|
||||||
*
|
|
||||||
* Attributes
|
|
||||||
* Attributes for the object.
|
|
||||||
*
|
|
||||||
* RootDirectory
|
|
||||||
* Where the object should be placed or NULL.
|
|
||||||
*
|
|
||||||
* SecurityDescriptor
|
|
||||||
* Ignored.
|
|
||||||
*
|
|
||||||
* NOTE
|
|
||||||
* Either ObjectName is a fully qualified pathname or a path
|
|
||||||
* relative to RootDirectory.
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
InitializeObjectAttributes (
|
|
||||||
POBJECT_ATTRIBUTES InitializedAttributes,
|
|
||||||
PUNICODE_STRING ObjectName,
|
|
||||||
ULONG Attributes,
|
|
||||||
HANDLE RootDirectory,
|
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor
|
|
||||||
)
|
|
||||||
{
|
|
||||||
DPRINT(
|
|
||||||
"InitializeObjectAttributes(InitializedAttributes %x "
|
|
||||||
"ObjectName %x Attributes %x RootDirectory %x)\n",
|
|
||||||
InitializedAttributes,
|
|
||||||
ObjectName,
|
|
||||||
Attributes,
|
|
||||||
RootDirectory
|
|
||||||
);
|
|
||||||
InitializedAttributes->Length =
|
|
||||||
sizeof (OBJECT_ATTRIBUTES);
|
|
||||||
InitializedAttributes->RootDirectory =
|
|
||||||
RootDirectory;
|
|
||||||
InitializedAttributes->ObjectName =
|
|
||||||
ObjectName;
|
|
||||||
InitializedAttributes->Attributes =
|
|
||||||
Attributes;
|
|
||||||
InitializedAttributes->SecurityDescriptor =
|
|
||||||
SecurityDescriptor;
|
|
||||||
InitializedAttributes->SecurityQualityOfService =
|
|
||||||
NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: largeint.c,v 1.8 1999/11/09 18:01:43 ekohl Exp $
|
/* $Id: largeint.c,v 1.9 1999/11/27 03:31:20 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -19,275 +19,232 @@
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlConvertLongToLargeInteger(LONG SignedInteger)
|
STDCALL
|
||||||
|
RtlConvertLongToLargeInteger (
|
||||||
|
LONG SignedInteger
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = SignedInteger;
|
RC.QuadPart = SignedInteger;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
|
STDCALL
|
||||||
|
RtlConvertUlongToLargeInteger (
|
||||||
|
ULONG UnsignedInteger
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = UnsignedInteger;
|
RC.QuadPart = UnsignedInteger;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlEnlargedIntegerMultiply(LONG Multiplicand,
|
STDCALL
|
||||||
LONG Multiplier)
|
RtlEnlargedIntegerMultiply (
|
||||||
|
LONG Multiplicand,
|
||||||
|
LONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = (LONGLONG) Multiplicand * Multiplier;
|
RC.QuadPart = (LONGLONG) Multiplicand * Multiplier;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
|
STDCALL
|
||||||
ULONG Divisor,
|
RtlEnlargedUnsignedDivide (
|
||||||
PULONG Remainder)
|
ULARGE_INTEGER Dividend,
|
||||||
|
ULONG Divisor,
|
||||||
|
PULONG Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (Remainder)
|
if (Remainder)
|
||||||
*Remainder = Dividend.QuadPart % Divisor;
|
*Remainder = Dividend.QuadPart % Divisor;
|
||||||
|
|
||||||
return (ULONG)(Dividend.QuadPart / Divisor);
|
return (ULONG)(Dividend.QuadPart / Divisor);
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
|
STDCALL
|
||||||
ULONG Multiplier)
|
RtlEnlargedUnsignedMultiply (
|
||||||
|
ULONG Multiplicand,
|
||||||
|
ULONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
RC.QuadPart = (ULONGLONG) Multiplicand * Multiplier;
|
RC.QuadPart = (ULONGLONG) Multiplicand * Multiplier;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
|
||||||
|
|
||||||
LARGE_INTEGER
|
|
||||||
RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
|
|
||||||
LONG Multiplier)
|
|
||||||
{
|
|
||||||
LARGE_INTEGER RC;
|
|
||||||
|
|
||||||
RC.QuadPart = Multiplicand.QuadPart * Multiplier;
|
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
ULONG Divisor,
|
RtlExtendedIntegerMultiply (
|
||||||
PULONG Remainder)
|
LARGE_INTEGER Multiplicand,
|
||||||
|
LONG Multiplier
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
if (Remainder)
|
RC.QuadPart = Multiplicand.QuadPart * Multiplier;
|
||||||
*Remainder = Dividend.QuadPart % Divisor;
|
|
||||||
|
|
||||||
RC.QuadPart = Dividend.QuadPart / Divisor;
|
return RC;
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlExtendedMagicDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
LARGE_INTEGER MagicDivisor,
|
RtlExtendedLargeIntegerDivide (
|
||||||
CCHAR ShiftCount)
|
LARGE_INTEGER Dividend,
|
||||||
|
ULONG Divisor,
|
||||||
|
PULONG Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
LARGE_INTEGER RC;
|
||||||
}
|
|
||||||
|
|
||||||
LARGE_INTEGER
|
if (Remainder)
|
||||||
RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
|
*Remainder = Dividend.QuadPart % Divisor;
|
||||||
LARGE_INTEGER Addend2)
|
|
||||||
{
|
|
||||||
LARGE_INTEGER RC;
|
|
||||||
|
|
||||||
RC.QuadPart = Addend1.QuadPart + Addend2.QuadPart;
|
RC.QuadPart = Dividend.QuadPart / Divisor;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
RtlLargeIntegerAnd(PLARGE_INTEGER Result,
|
|
||||||
LARGE_INTEGER Source,
|
|
||||||
LARGE_INTEGER Mask)
|
|
||||||
{
|
|
||||||
Result->QuadPart = Source.QuadPart & Mask.QuadPart;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlExtendedMagicDivide (
|
||||||
|
LARGE_INTEGER Dividend,
|
||||||
|
LARGE_INTEGER MagicDivisor,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
UNIMPLEMENTED;
|
||||||
CHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
|
||||||
|
|
||||||
if (Shift < 32)
|
|
||||||
{
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* copy the sign bit */
|
|
||||||
RC.u.HighPart |= (LargeInteger.u.HighPart & 0x80000000);
|
|
||||||
RC.u.LowPart = LargeInteger.u.HighPart >> Shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerDivide(LARGE_INTEGER Dividend,
|
STDCALL
|
||||||
LARGE_INTEGER Divisor,
|
RtlLargeIntegerAdd (
|
||||||
PLARGE_INTEGER Remainder)
|
LARGE_INTEGER Addend1,
|
||||||
|
LARGE_INTEGER Addend2
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
if (Remainder)
|
RC.QuadPart = Addend1.QuadPart + Addend2.QuadPart;
|
||||||
Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
|
|
||||||
|
|
||||||
RC.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
|
return RC;
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart == Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart == 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThan(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart > Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanOrEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart >= Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanOrEqualToZero(LARGE_INTEGER Operand1)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerGreaterThanZero(LARGE_INTEGER Operand1)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThan(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart < Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanOrEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart <= Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanOrEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart <= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerLessThanZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart < 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
|
STDCALL
|
||||||
|
RtlLargeIntegerArithmeticShift (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
CHAR Shift;
|
||||||
|
|
||||||
RC.QuadPart = - Subtrahend.QuadPart;
|
Shift = ShiftCount % 64;
|
||||||
|
|
||||||
return RC;
|
if (Shift < 32)
|
||||||
}
|
{
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart >> Shift;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* copy the sign bit */
|
||||||
|
RC.u.HighPart |= (LargeInteger.u.HighPart & 0x80000000);
|
||||||
|
RC.u.LowPart = LargeInteger.u.HighPart >> Shift;
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN
|
return RC;
|
||||||
RtlLargeIntegerNotEqualTo(LARGE_INTEGER Operand1,
|
|
||||||
LARGE_INTEGER Operand2)
|
|
||||||
{
|
|
||||||
return Operand1.QuadPart != Operand2.QuadPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RtlLargeIntegerNotEqualToZero(LARGE_INTEGER Operand)
|
|
||||||
{
|
|
||||||
return Operand.QuadPart != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlLargeIntegerDivide (
|
||||||
|
LARGE_INTEGER Dividend,
|
||||||
|
LARGE_INTEGER Divisor,
|
||||||
|
PLARGE_INTEGER Remainder
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
CHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
if (Remainder)
|
||||||
|
Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
|
||||||
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart << Shift;
|
RC.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger,
|
STDCALL
|
||||||
CCHAR ShiftCount)
|
RtlLargeIntegerNegate (
|
||||||
|
LARGE_INTEGER Subtrahend
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
CHAR Shift;
|
|
||||||
|
|
||||||
Shift = ShiftCount % 64;
|
RC.QuadPart = - Subtrahend.QuadPart;
|
||||||
|
|
||||||
RC.QuadPart = LargeInteger.QuadPart >> ShiftCount;
|
return RC;
|
||||||
|
|
||||||
return RC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
RtlLargeIntegerSubtract(LARGE_INTEGER Minuend,
|
STDCALL
|
||||||
LARGE_INTEGER Subtrahend)
|
RtlLargeIntegerShiftLeft (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER RC;
|
LARGE_INTEGER RC;
|
||||||
|
CHAR Shift;
|
||||||
|
|
||||||
RC.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart;
|
Shift = ShiftCount % 64;
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart << Shift;
|
||||||
|
|
||||||
return RC;
|
return RC;
|
||||||
|
}
|
||||||
|
|
||||||
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
|
RtlLargeIntegerShiftRight (
|
||||||
|
LARGE_INTEGER LargeInteger,
|
||||||
|
CCHAR ShiftCount
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER RC;
|
||||||
|
CHAR Shift;
|
||||||
|
|
||||||
|
Shift = ShiftCount % 64;
|
||||||
|
RC.QuadPart = LargeInteger.QuadPart >> ShiftCount;
|
||||||
|
|
||||||
|
return RC;
|
||||||
|
}
|
||||||
|
|
||||||
|
LARGE_INTEGER
|
||||||
|
STDCALL
|
||||||
|
RtlLargeIntegerSubtract (
|
||||||
|
LARGE_INTEGER Minuend,
|
||||||
|
LARGE_INTEGER Subtrahend
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER RC;
|
||||||
|
|
||||||
|
RC.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart;
|
||||||
|
|
||||||
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue