ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2005
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
814 discussions
Start a n
N
ew thread
[weiden] 15028: don't leak the registry path string after initializing a driver
by weiden@svn.reactos.com
don't leak the registry path string after initializing a driver Modified: trunk/reactos/drivers/video/videoprt/videoprt.c Modified: trunk/reactos/ntoskrnl/io/driver.c _____ Modified: trunk/reactos/drivers/video/videoprt/videoprt.c --- trunk/reactos/drivers/video/videoprt/videoprt.c 2005-05-05 22:40:05 UTC (rev 15027) +++ trunk/reactos/drivers/video/videoprt/videoprt.c 2005-05-06 00:07:05 UTC (rev 15028) @@ -587,8 +587,27 @@ } DriverExtension->HwContext = HwContext; - RtlCopyMemory(&DriverExtension->RegistryPath, RegistryPath, sizeof(UNICODE_STRING)); + /* we can't use RtlDuplicateUnicodeString because only ntdll exposes it... */ + if (RegistryPath->Length != 0) + { + DriverExtension->RegistryPath.Length = 0; + DriverExtension->RegistryPath.MaximumLength = RegistryPath->Length + sizeof(UNICODE_NULL); + DriverExtension->RegistryPath.Buffer = ExAllocatePoolWithTag(PagedPool, + DriverExtension->RegistryPath.MaximumLength, + TAG('U', 'S', 'T', 'R')); + if (DriverExtension->RegistryPath.Buffer == NULL) + { + RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL); + return STATUS_INSUFFICIENT_RESOURCES; + } + RtlCopyUnicodeString(&DriverExtension->RegistryPath, RegistryPath); + } + else + { + RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL); + } + switch (HwInitializationData->HwInitDataSize) { /* _____ Modified: trunk/reactos/ntoskrnl/io/driver.c --- trunk/reactos/ntoskrnl/io/driver.c 2005-05-05 22:40:05 UTC (rev 15027) +++ trunk/reactos/ntoskrnl/io/driver.c 2005-05-06 00:07:05 UTC (rev 15028) @@ -544,10 +544,29 @@ IN BOOLEAN FileSystemDriver, OUT PDRIVER_OBJECT *DriverObject) { + const WCHAR ServicesKeyName[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"; UNICODE_STRING RegistryKey; - PDRIVER_INITIALIZE DriverEntry = ModuleObject->EntryPoint; + PDRIVER_INITIALIZE DriverEntry; NTSTATUS Status; - WCHAR ServicesKeyName[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"; + + DriverEntry = ModuleObject->EntryPoint; + + if (ServiceName != NULL && ServiceName->Length != 0) + { + RegistryKey.Length = 0; + RegistryKey.MaximumLength = sizeof(ServicesKeyName) + ServiceName->Length; + RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength); + if (RegistryKey.Buffer == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + RtlAppendUnicodeToString(&RegistryKey, ServicesKeyName); + RtlAppendUnicodeStringToString(&RegistryKey, ServiceName); + } + else + { + RtlInitUnicodeString(&RegistryKey, NULL); + } Status = IopCreateDriverObject( DriverObject, @@ -563,26 +582,15 @@ return Status; } - if (ServiceName->Buffer) - { - RegistryKey.Length = ServiceName->Length + - sizeof(ServicesKeyName) - sizeof(UNICODE_NULL); - RegistryKey.MaximumLength = RegistryKey.Length + sizeof(UNICODE_NULL); - RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength); - wcscpy(RegistryKey.Buffer, ServicesKeyName); - wcscat(RegistryKey.Buffer, ServiceName->Buffer); - } - else - { - RtlInitUnicodeString(&RegistryKey, NULL); - } - DPRINT("RegistryKey: %wZ\n", &RegistryKey); DPRINT("Calling driver entrypoint at %08lx\n", DriverEntry); IopMarkLastReinitializeDriver(); Status = DriverEntry(*DriverObject, &RegistryKey); + + RtlFreeUnicodeString(&RegistryKey); + if (!NT_SUCCESS(Status)) { ObMakeTemporaryObject(*DriverObject);
19 years, 4 months
1
0
0
0
[ion] 15027: Update KPROCESS structure to latest version and document all its fields on the Wiki page. Move Kernel Structures to ke.h from ps.h, remove stuff from ntifs.h that shouldnt be there
by ion@svn.reactos.com
Update KPROCESS structure to latest version and document all its fields on the Wiki page. Move Kernel Structures to ke.h from ps.h, remove stuff from ntifs.h that shouldnt be there Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/ps.h Modified: trunk/reactos/ntoskrnl/ke/dpc.c Modified: trunk/reactos/ntoskrnl/ke/event.c Modified: trunk/reactos/ntoskrnl/ke/i386/ldt.c Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c Modified: trunk/reactos/ntoskrnl/ke/i386/vdm.c Modified: trunk/reactos/ntoskrnl/ke/kthread.c Modified: trunk/reactos/ntoskrnl/ke/process.c Modified: trunk/reactos/ntoskrnl/mm/i386/page.c Modified: trunk/reactos/ntoskrnl/ps/psmgr.c Modified: trunk/reactos/w32api/include/ddk/ntifs.h _____ Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h 2005-05-05 22:40:05 UTC (rev 15027) @@ -179,6 +179,38 @@ ULONG Eflags; } KIRQ_TRAPFRAME, *PKIRQ_TRAPFRAME; +typedef struct _KGDTENTRY { + USHORT LimitLow; + USHORT BaseLow; + union { + struct { + UCHAR BaseMid; + UCHAR Flags1; + UCHAR Flags2; + UCHAR BaseHi; + } Bytes; + struct { + ULONG BaseMid : 8; + ULONG Type : 5; + ULONG Dpl : 2; + ULONG Pres : 1; + ULONG LimitHi : 4; + ULONG Sys : 1; + ULONG Reserved_0 : 1; + ULONG Default_Big : 1; + ULONG Granularity : 1; + ULONG BaseHi : 8; + } Bits; + } HighWord; +} KGDTENTRY, *PKGDTENTRY; + +typedef struct _KIDTENTRY { + USHORT Offset; + USHORT Selector; + USHORT Access; + USHORT ExtendedOffset; +} KIDTENTRY, *PKIDTENTRY; + extern ULONG Ke386CacheAlignment; struct _KPCR; _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-05-05 22:40:05 UTC (rev 15027) @@ -29,6 +29,191 @@ #include "arch/ke.h" +/* INTERNAL KERNEL TYPES ****************************************************/ + +#ifndef __ASM__ + +#ifndef __USE_W32API + +typedef struct _KPROCESS *PKPROCESS; + +#endif /* __USE_W32API */ + +typedef struct _HARDWARE_PTE_X86 { + ULONG Valid : 1; + ULONG Write : 1; + ULONG Owner : 1; + ULONG WriteThrough : 1; + ULONG CacheDisable : 1; + ULONG Accessed : 1; + ULONG Dirty : 1; + ULONG LargePage : 1; + ULONG Global : 1; + ULONG CopyOnWrite : 1; + ULONG Prototype : 1; + ULONG reserved : 1; + ULONG PageFrameNumber : 20; +} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86; + +typedef struct _WOW64_PROCESS +{ + PVOID Wow64; +} WOW64_PROCESS, *PWOW64_PROCESS; + +#include <pshpack1.h> + +typedef struct _KTHREAD +{ + /* For waiting on thread exit */ + DISPATCHER_HEADER DispatcherHeader; /* 00 */ + + /* List of mutants owned by the thread */ + LIST_ENTRY MutantListHead; /* 10 */ + PVOID InitialStack; /* 18 */ + ULONG_PTR StackLimit; /* 1C */ + + /* Pointer to the thread's environment block in user memory */ + struct _TEB *Teb; /* 20 */ + + /* Pointer to the thread's TLS array */ + PVOID TlsArray; /* 24 */ + PVOID KernelStack; /* 28 */ + UCHAR DebugActive; /* 2C */ + + /* Thread state (one of THREAD_STATE_xxx constants below) */ + UCHAR State; /* 2D */ + BOOLEAN Alerted[2]; /* 2E */ + UCHAR Iopl; /* 30 */ + UCHAR NpxState; /* 31 */ + CHAR Saturation; /* 32 */ + CHAR Priority; /* 33 */ + KAPC_STATE ApcState; /* 34 */ + ULONG ContextSwitches; /* 4C */ + LONG WaitStatus; /* 50 */ + KIRQL WaitIrql; /* 54 */ + CHAR WaitMode; /* 55 */ + UCHAR WaitNext; /* 56 */ + UCHAR WaitReason; /* 57 */ + union { /* 58 */ + PKWAIT_BLOCK WaitBlockList; /* 58 */ + PKGATE GateObject; /* 58 */ + }; /* 58 */ + LIST_ENTRY WaitListEntry; /* 5C */ + ULONG WaitTime; /* 64 */ + CHAR BasePriority; /* 68 */ + UCHAR DecrementCount; /* 69 */ + UCHAR PriorityDecrement; /* 6A */ + CHAR Quantum; /* 6B */ + KWAIT_BLOCK WaitBlock[4]; /* 6C */ + PVOID LegoData; /* CC */ + union { + struct { + USHORT KernelApcDisable; + USHORT SpecialApcDisable; + }; + ULONG CombinedApcDisable; /* D0 */ + }; + KAFFINITY UserAffinity; /* D4 */ + UCHAR SystemAffinityActive;/* D8 */ + UCHAR PowerState; /* D9 */ + UCHAR NpxIrql; /* DA */ + UCHAR Pad[1]; /* DB */ + PVOID ServiceTable; /* DC */ + PKQUEUE Queue; /* E0 */ + KSPIN_LOCK ApcQueueLock; /* E4 */ + KTIMER Timer; /* E8 */ + LIST_ENTRY QueueListEntry; /* 110 */ + KAFFINITY Affinity; /* 118 */ + UCHAR Preempted; /* 11C */ + UCHAR ProcessReadyQueue; /* 11D */ + UCHAR KernelStackResident; /* 11E */ + UCHAR NextProcessor; /* 11F */ + PVOID CallbackStack; /* 120 */ + struct _W32THREAD *Win32Thread; /* 124 */ + struct _KTRAP_FRAME *TrapFrame; /* 128 */ + PKAPC_STATE ApcStatePointer[2]; /* 12C */ + UCHAR EnableStackSwap; /* 134 */ + UCHAR LargeStack; /* 135 */ + UCHAR ResourceIndex; /* 136 */ + UCHAR PreviousMode; /* 137 */ + ULONG KernelTime; /* 138 */ + ULONG UserTime; /* 13C */ + KAPC_STATE SavedApcState; /* 140 */ + UCHAR Alertable; /* 158 */ + UCHAR ApcStateIndex; /* 159 */ + UCHAR ApcQueueable; /* 15A */ + UCHAR AutoAlignment; /* 15B */ + PVOID StackBase; /* 15C */ + KAPC SuspendApc; /* 160 */ + KSEMAPHORE SuspendSemaphore; /* 190 */ + LIST_ENTRY ThreadListEntry; /* 1A4 */ + CHAR FreezeCount; /* 1AC */ + UCHAR SuspendCount; /* 1AD */ + UCHAR IdealProcessor; /* 1AE */ + UCHAR DisableBoost; /* 1AF */ + UCHAR QuantumReset; /* 1B0 */ +} KTHREAD; + +#include <poppack.h> + +typedef struct _KEXECUTE_OPTIONS +{ + UCHAR ExecuteDisable:1; + UCHAR ExecuteEnable:1; + UCHAR DisableThunkEmulation:1; + UCHAR Permanent:1; + UCHAR ExecuteDispatchEnable:1; + UCHAR ImageDispatchEnable:1; + UCHAR Spare:2; +} KEXECUTE_OPTIONS, *PKEXECUTE_OPTIONS; + +/* + * NAME: KPROCESS + * DESCRIPTION: Internal Kernel Process Structure. + * PORTABILITY: Architecture Dependent. + * KERNEL VERSION: 5.2 + * DOCUMENTATION:
http://reactos.com/wiki/index.php/KPROCESS
+ */ +typedef struct _KPROCESS +{ + DISPATCHER_HEADER Header; /* 000 */ + LIST_ENTRY ProfileListHead; /* 010 */ + PHYSICAL_ADDRESS DirectoryTableBase; /* 018 */ + KGDTENTRY LdtDescriptor; /* 020 */ + KIDTENTRY Int21Descriptor; /* 028 */ + USHORT IopmOffset; /* 030 */ + UCHAR Iopl; /* 032 */ + UCHAR Unused; /* 033 */ + ULONG ActiveProcessors; /* 034 */ + ULONG KernelTime; /* 038 */ + ULONG UserTime; /* 03C */ + LIST_ENTRY ReadyListHead; /* 040 */ + LIST_ENTRY SwapListEntry; /* 048 */ + PVOID VdmTrapcHandler; /* 04C */ + LIST_ENTRY ThreadListHead; /* 050 */ + KSPIN_LOCK ProcessLock; /* 058 */ + KAFFINITY Affinity; /* 05C */ + union { + struct { + ULONG AutoAlignment:1; /* 060.0 */ + ULONG DisableBoost:1; /* 060.1 */ + ULONG DisableQuantum:1; /* 060.2 */ + ULONG ReservedFlags:29; /* 060.3 */ + }; + ULONG ProcessFlags; /* 060 */ + }; + CHAR BasePriority; /* 064 */ + CHAR QuantumReset; /* 065 */ + UCHAR State; /* 066 */ + UCHAR ThreadSeed; /* 067 */ + UCHAR PowerState; /* 068 */ + UCHAR IdealNode; /* 069 */ + UCHAR Visited; /* 06A */ + KEXECUTE_OPTIONS Flags; /* 06B */ + ULONG StackCount; /* 06C */ + LIST_ENTRY ProcessListEntry; /* 070 */ +} KPROCESS; + /* INTERNAL KERNEL FUNCTIONS ************************************************/ #ifdef __USE_W32API @@ -36,9 +221,6 @@ VOID KeSetGdtSelector(ULONG Entry, ULONG Value1, ULONG Value2); #endif -#ifndef __ASM__ - -struct _KTHREAD; struct _KIRQ_TRAPFRAME; struct _KPCR; struct _KPRCB; @@ -82,6 +264,10 @@ } \ } +#ifndef __USE_W32API +#define KeGetCurrentProcessorNumber() (KeGetCurrentKPCR()->ProcessorNumber) +#endif + /* threadsch.c ********************************************************************/ /* Thread Scheduler Functions */ _____ Modified: trunk/reactos/ntoskrnl/include/internal/ps.h --- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-05-05 22:40:05 UTC (rev 15027) @@ -42,110 +42,12 @@ #ifndef __ASM__ #include <internal/mm.h> +#include <internal/ke.h> #include <napi/teb.h> -#ifndef KeGetCurrentProcessorNumber -#define KeGetCurrentProcessorNumber() (KeGetCurrentKPCR()->ProcessorNumber) -#endif - extern LCID PsDefaultThreadLocaleId; extern LCID PsDefaultSystemLocaleId; -#include <pshpack1.h> - -typedef struct _KTHREAD -{ - /* For waiting on thread exit */ - DISPATCHER_HEADER DispatcherHeader; /* 00 */ - - /* List of mutants owned by the thread */ - LIST_ENTRY MutantListHead; /* 10 */ - PVOID InitialStack; /* 18 */ - ULONG_PTR StackLimit; /* 1C */ - - /* Pointer to the thread's environment block in user memory */ - PTEB Teb; /* 20 */ - - /* Pointer to the thread's TLS array */ - PVOID TlsArray; /* 24 */ - PVOID KernelStack; /* 28 */ - UCHAR DebugActive; /* 2C */ - - /* Thread state (one of THREAD_STATE_xxx constants below) */ - UCHAR State; /* 2D */ - BOOLEAN Alerted[2]; /* 2E */ - UCHAR Iopl; /* 30 */ - UCHAR NpxState; /* 31 */ - CHAR Saturation; /* 32 */ - CHAR Priority; /* 33 */ - KAPC_STATE ApcState; /* 34 */ - ULONG ContextSwitches; /* 4C */ - LONG WaitStatus; /* 50 */ - KIRQL WaitIrql; /* 54 */ - CHAR WaitMode; /* 55 */ - UCHAR WaitNext; /* 56 */ - UCHAR WaitReason; /* 57 */ - union { /* 58 */ - PKWAIT_BLOCK WaitBlockList; /* 58 */ - PKGATE GateObject; /* 58 */ - }; /* 58 */ - LIST_ENTRY WaitListEntry; /* 5C */ - ULONG WaitTime; /* 64 */ - CHAR BasePriority; /* 68 */ - UCHAR DecrementCount; /* 69 */ - UCHAR PriorityDecrement; /* 6A */ - CHAR Quantum; /* 6B */ - KWAIT_BLOCK WaitBlock[4]; /* 6C */ - PVOID LegoData; /* CC */ - union { - struct { - USHORT KernelApcDisable; - USHORT SpecialApcDisable; - }; - ULONG CombinedApcDisable; /* D0 */ - }; - KAFFINITY UserAffinity; /* D4 */ - UCHAR SystemAffinityActive;/* D8 */ - UCHAR PowerState; /* D9 */ - UCHAR NpxIrql; /* DA */ - UCHAR Pad[1]; /* DB */ - SSDT_ENTRY *ServiceTable; /* DC */ - PKQUEUE Queue; /* E0 */ - KSPIN_LOCK ApcQueueLock; /* E4 */ - KTIMER Timer; /* E8 */ - LIST_ENTRY QueueListEntry; /* 110 */ - KAFFINITY Affinity; /* 118 */ - UCHAR Preempted; /* 11C */ - UCHAR ProcessReadyQueue; /* 11D */ - UCHAR KernelStackResident; /* 11E */ - UCHAR NextProcessor; /* 11F */ - PVOID CallbackStack; /* 120 */ - struct _W32THREAD *Win32Thread; /* 124 */ - struct _KTRAP_FRAME *TrapFrame; /* 128 */ - PKAPC_STATE ApcStatePointer[2]; /* 12C */ - UCHAR EnableStackSwap; /* 134 */ - UCHAR LargeStack; /* 135 */ - UCHAR ResourceIndex; /* 136 */ - UCHAR PreviousMode; /* 137 */ - ULONG KernelTime; /* 138 */ - ULONG UserTime; /* 13C */ - KAPC_STATE SavedApcState; /* 140 */ - UCHAR Alertable; /* 158 */ - UCHAR ApcStateIndex; /* 159 */ - UCHAR ApcQueueable; /* 15A */ - UCHAR AutoAlignment; /* 15B */ - PVOID StackBase; /* 15C */ - KAPC SuspendApc; /* 160 */ - KSEMAPHORE SuspendSemaphore; /* 190 */ - LIST_ENTRY ThreadListEntry; /* 1A4 */ - CHAR FreezeCount; /* 1AC */ - UCHAR SuspendCount; /* 1AD */ - UCHAR IdealProcessor; /* 1AE */ - UCHAR DisableBoost; /* 1AF */ -} KTHREAD; - -#include <poppack.h> - /* Top level irp definitions. */ #define FSRTL_FSP_TOP_LEVEL_IRP (0x01) #define FSRTL_CACHE_TOP_LEVEL_IRP (0x02) @@ -219,105 +121,12 @@ #include <poppack.h> - #ifndef __USE_W32API typedef struct _ETHREAD *PETHREAD; #endif /* __USE_W32API */ - -typedef struct _KPROCESS -{ - /* So it's possible to wait for the process to terminate */ - DISPATCHER_HEADER DispatcherHeader; /* 000 */ - /* - * Presumably a list of profile objects associated with this process, - * currently unused. - */ - LIST_ENTRY ProfileListHead; /* 010 */ - /* - * We use the first member of this array to hold the physical address of - * the page directory for this process. - */ - PHYSICAL_ADDRESS DirectoryTableBase; /* 018 */ - /* - * Presumably a descriptor for the process's LDT, currently unused. - */ - ULONG LdtDescriptor[2]; /* 020 */ - /* - * Virtual Dos Machine flag. - */ - ULONG NtVdmFlag; /* 028 */ - ULONG VdmUnused; /* 02C */ - /* Is the i/o permission map enabled for the process. */ - USHORT IopmOffset; /* 030 */ - /* - * Presumably I/O privilege level to be used for this process, currently - * unused. - */ - UCHAR Iopl; /* 032 */ - /* Set if this process is a virtual dos machine? */ - UCHAR VdmFlag; /* 033 */ - /* Bitmask of the processors being used by this process's threads? */ - ULONG ActiveProcessors; /* 034 */ - /* Aggregate of the time this process's threads have spent in kernel mode? */ - ULONG KernelTime; /* 038 */ - /* Aggregate of the time this process's threads have spent in user mode? */ - ULONG UserTime; /* 03C */ - /* List of this process's threads that are ready for execution? */ - LIST_ENTRY ReadyListHead; /* 040 */ - /* List of this process's threads that have their stacks swapped out? */ - LIST_ENTRY SwapListEntry; /* 048 */ - /* List of this process's threads? */ - LIST_ENTRY ThreadListHead; /* 050 */ - /* Maybe a lock for this data structure, the type is assumed. */ - KSPIN_LOCK ProcessLock; /* 058 */ - /* Default affinity mask for this process's threads? */ - ULONG Affinity; /* 05C */ - /* Count of the stacks allocated for this process's threads? */ - USHORT StackCount; /* 060 */ - /* Base priority for this process's threads? */ - KPRIORITY BasePriority; /* 062 */ - /* Default quantum for this process's threads */ - UCHAR ThreadQuantum; /* 063 */ - /* Unknown. */ - UCHAR AutoAlignment; /* 064 */ - /* Process execution state, currently either active or terminated. */ - UCHAR State; /* 065 */ - /* Seed for generating thread ids for this process's threads? */ - UCHAR ThreadSeed; /* 066 */ - /* Disable priority boosts? */ - UCHAR DisableBoost; /* 067 */ -} KPROCESS; - -#ifndef __USE_W32API - -typedef struct _KPROCESS *PKPROCESS; - -typedef struct _HARDWARE_PTE_X86 { - ULONG Valid : 1; - ULONG Write : 1; - ULONG Owner : 1; - ULONG WriteThrough : 1; - ULONG CacheDisable : 1; - ULONG Accessed : 1; - ULONG Dirty : 1; - ULONG LargePage : 1; - ULONG Global : 1; - ULONG CopyOnWrite : 1; - ULONG Prototype : 1; - ULONG reserved : 1; - ULONG PageFrameNumber : 20; -} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86; - -typedef struct _WOW64_PROCESS -{ - PVOID Wow64; -} WOW64_PROCESS, *PWOW64_PROCESS; - -#endif /* __USE_W32API */ - struct _EPROCESS { /* Microkernel specific process state. */ _____ Modified: trunk/reactos/ntoskrnl/ke/dpc.c --- trunk/reactos/ntoskrnl/ke/dpc.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/dpc.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -444,9 +444,10 @@ /* Check if Quantum expired */ if (CurrentThread->Quantum <= 0) { - /* Set the new Quantum */ - CurrentThread->Quantum = Process->ThreadQuantum; + /* Reset the new Quantum */ + CurrentThread->Quantum = CurrentThread->QuantumReset; + /* Calculate new priority */ OldPriority = CurrentThread->Priority; if (OldPriority < LOW_REALTIME_PRIORITY) { _____ Modified: trunk/reactos/ntoskrnl/ke/event.c --- trunk/reactos/ntoskrnl/ke/event.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/event.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -259,7 +259,7 @@ if ARGUMENT_PRESENT(Thread) *Thread = WaitingThread; /* Reset the Quantum and Unwait the Thread */ - WaitingThread->Quantum = WaitingThread->ApcState.Process->ThreadQuantum; + WaitingThread->Quantum = WaitingThread->QuantumReset; KiAbortWaitThread(WaitingThread, STATUS_SUCCESS, EVENT_INCREMENT); } _____ Modified: trunk/reactos/ntoskrnl/ke/i386/ldt.c --- trunk/reactos/ntoskrnl/ke/i386/ldt.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/i386/ldt.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -84,7 +84,7 @@ KeAcquireSpinLock(&LdtLock, &oldIrql); - LdtDescriptor = (PUSHORT) &KeGetCurrentProcess()->LdtDescriptor[0]; + LdtDescriptor = (PUSHORT) &KeGetCurrentProcess()->LdtDescriptor; LdtBase = LdtDescriptor[1] | ((LdtDescriptor[2] & 0xff) << 16) | ((LdtDescriptor[3] & ~0xff) << 16); _____ Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c --- trunk/reactos/ntoskrnl/ke/i386/v86m.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/i386/v86m.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -688,7 +688,8 @@ VTf = (PKV86M_TRAP_FRAME)Tf; - if(KeGetCurrentProcess()->NtVdmFlag) + /* FIXME: This should use ->VdmObjects */ + if(KeGetCurrentProcess()->Unused) { VTf->regs->PStatus = (PNTSTATUS) ExceptionNr; if(ExceptionNr != 14) return 1; @@ -799,7 +800,8 @@ Tf->ErrorCode); if (!NT_SUCCESS(Status)) { - if(KeGetCurrentProcess()->NtVdmFlag) + /* FIXME: This should use ->VdmObjects */ + if(KeGetCurrentProcess()->Unused) { VTf->regs->PStatus = (PNTSTATUS) STATUS_NONCONTINUABLE_EXCEPTION; return 1; _____ Modified: trunk/reactos/ntoskrnl/ke/i386/vdm.c --- trunk/reactos/ntoskrnl/ke/i386/vdm.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/i386/vdm.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -64,9 +64,12 @@ sizeof(KV86M_REGISTERS)); if(!NT_SUCCESS(ret)) return ret; - KeGetCurrentProcess()->NtVdmFlag = 1; + /* FIXME: This should use ->VdmObjects */ + KeGetCurrentProcess()->Unused = 1; Ki386RetToV86Mode(&V86Registers, &V86Registers); - KeGetCurrentProcess()->NtVdmFlag = 0; + + /* FIXME: This should use ->VdmObjects */ + KeGetCurrentProcess()->Unused = 0; ret = MmCopyToCaller(ControlData, &V86Registers, _____ Modified: trunk/reactos/ntoskrnl/ke/kthread.c --- trunk/reactos/ntoskrnl/ke/kthread.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -272,7 +272,7 @@ } else { - Thread->Quantum = Thread->ApcState.Process->ThreadQuantum; + Thread->Quantum = Thread->QuantumReset; } if (WaitStatus != NULL) { @@ -771,7 +771,8 @@ /* Setup scheduler Fields based on Parent */ DPRINT("Thread context created, setting Scheduler Data\n"); Thread->BasePriority = Process->BasePriority; - Thread->Quantum = Process->ThreadQuantum; + Thread->Quantum = Process->QuantumReset; + Thread->QuantumReset = Process->QuantumReset; Thread->Affinity = Process->Affinity; Thread->Priority = Process->BasePriority; Thread->UserAffinity = Process->Affinity; _____ Modified: trunk/reactos/ntoskrnl/ke/process.c --- trunk/reactos/ntoskrnl/ke/process.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ke/process.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -73,7 +73,7 @@ DPRINT("KeInitializeProcess. Process: %x, DirectoryTableBase: %x\n", Process, DirectoryTableBase); /* Initialize the Dispatcher Header */ - KeInitializeDispatcherHeader(&Process->DispatcherHeader, + KeInitializeDispatcherHeader(&Process->Header, ProcessObject, sizeof(KPROCESS), FALSE); @@ -81,7 +81,7 @@ /* Initialize Scheduler Data, Disable Alignment Faults and Set the PDE */ Process->Affinity = Affinity; Process->BasePriority = Priority; - Process->ThreadQuantum = 6; + Process->QuantumReset = 6; Process->DirectoryTableBase = DirectoryTableBase; Process->AutoAlignment = TRUE; Process->IopmOffset = 0xFFFF; @@ -104,11 +104,11 @@ OldIrql = KeAcquireDispatcherDatabaseLock(); /* Get Old State */ - OldState = Process->DispatcherHeader.SignalState; + OldState = Process->Header.SignalState; /* Signal the Process */ - Process->DispatcherHeader.SignalState = TRUE; - if ((OldState == 0) && IsListEmpty(&Process->DispatcherHeader.WaitListHead) != TRUE) { + Process->Header.SignalState = TRUE; + if ((OldState == 0) && IsListEmpty(&Process->Header.WaitListHead) != TRUE) { /* Satisfy waits */ KiWaitTest((PVOID)Process, Increment); @@ -198,19 +198,12 @@ VOID STDCALL -KiSwapProcess(PKPROCESS NewProcess, PKPROCESS OldProcess) +KiSwapProcess(PKPROCESS NewProcess, + PKPROCESS OldProcess) { - //PKPCR Pcr = KeGetCurrentKpcr(); - - /* Do they have an LDT? */ - if ((NewProcess->LdtDescriptor) || (OldProcess->LdtDescriptor)) { - - /* FIXME : SWitch GDT/IDT */ - } + /* FIXME: Write this in ASM. Much easier */ DPRINT("Switching CR3 to: %x\n", NewProcess->DirectoryTableBase.u.LowPart); Ke386SetPageTableDirectory(NewProcess->DirectoryTableBase.u.LowPart); - - /* FIXME: Set IopmOffset in TSS */ } /* _____ Modified: trunk/reactos/ntoskrnl/mm/i386/page.c --- trunk/reactos/ntoskrnl/mm/i386/page.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/mm/i386/page.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -203,7 +203,7 @@ DPRINT("Mmi386ReleaseMmInfo(Process %x)\n",Process); - LdtDescriptor = (PUSHORT) &Process->Pcb.LdtDescriptor[0]; + LdtDescriptor = (PUSHORT) &Process->Pcb.LdtDescriptor; LdtBase = LdtDescriptor[1] | ((LdtDescriptor[2] & 0xff) << 16) | ((LdtDescriptor[3] & ~0xff) << 16); _____ Modified: trunk/reactos/ntoskrnl/ps/psmgr.c --- trunk/reactos/ntoskrnl/ps/psmgr.c 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/ntoskrnl/ps/psmgr.c 2005-05-05 22:40:05 UTC (rev 15027) @@ -182,14 +182,12 @@ PsIdleProcess->Pcb.Affinity = 0xFFFFFFFF; PsIdleProcess->Pcb.IopmOffset = 0xffff; - PsIdleProcess->Pcb.LdtDescriptor[0] = 0; - PsIdleProcess->Pcb.LdtDescriptor[1] = 0; PsIdleProcess->Pcb.BasePriority = PROCESS_PRIO_IDLE; - PsIdleProcess->Pcb.ThreadQuantum = 6; + PsIdleProcess->Pcb.QuantumReset = 6; InitializeListHead(&PsIdleProcess->Pcb.ThreadListHead); InitializeListHead(&PsIdleProcess->ThreadListHead); InitializeListHead(&PsIdleProcess->ProcessListEntry); - KeInitializeDispatcherHeader(&PsIdleProcess->Pcb.DispatcherHeader, + KeInitializeDispatcherHeader(&PsIdleProcess->Pcb.Header, ProcessObject, sizeof(EPROCESS), FALSE); @@ -217,14 +215,13 @@ } /* System threads may run on any processor. */ + RtlZeroMemory(PsInitialSystemProcess, sizeof(EPROCESS)); PsInitialSystemProcess->Pcb.Affinity = 0xFFFFFFFF; PsInitialSystemProcess->Pcb.IopmOffset = 0xffff; - PsInitialSystemProcess->Pcb.LdtDescriptor[0] = 0; - PsInitialSystemProcess->Pcb.LdtDescriptor[1] = 0; PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIO_NORMAL; - PsInitialSystemProcess->Pcb.ThreadQuantum = 6; + PsInitialSystemProcess->Pcb.QuantumReset = 6; InitializeListHead(&PsInitialSystemProcess->Pcb.ThreadListHead); - KeInitializeDispatcherHeader(&PsInitialSystemProcess->Pcb.DispatcherHead er, + KeInitializeDispatcherHeader(&PsInitialSystemProcess->Pcb.Header, ProcessObject, sizeof(EPROCESS), FALSE); @@ -234,8 +231,6 @@ &PsInitialSystemProcess->AddressSpace); KeInitializeEvent(&PsInitialSystemProcess->LockEvent, SynchronizationEvent, FALSE); - PsInitialSystemProcess->LockCount = 0; - PsInitialSystemProcess->LockOwner = NULL; #if defined(__GNUC__) KProcess->DirectoryTableBase = _____ Modified: trunk/reactos/w32api/include/ddk/ntifs.h --- trunk/reactos/w32api/include/ddk/ntifs.h 2005-05-05 22:36:25 UTC (rev 15026) +++ trunk/reactos/w32api/include/ddk/ntifs.h 2005-05-05 22:40:05 UTC (rev 15027) @@ -464,7 +464,6 @@ typedef PVOID PEJOB; typedef PVOID OPLOCK, *POPLOCK; -typedef PVOID PWOW64_PROCESS; typedef struct _CACHE_MANAGER_CALLBACKS *PCACHE_MANAGER_CALLBACKS; typedef struct _EPROCESS_QUOTA_BLOCK *PEPROCESS_QUOTA_BLOCK; @@ -530,22 +529,6 @@ ObjectProtectionInfo } OBJECT_INFO_CLASS; -typedef struct _HARDWARE_PTE_X86 { - ULONG Valid : 1; - ULONG Write : 1; - ULONG Owner : 1; - ULONG WriteThrough : 1; - ULONG CacheDisable : 1; - ULONG Accessed : 1; - ULONG Dirty : 1; - ULONG LargePage : 1; - ULONG Global : 1; - ULONG CopyOnWrite : 1; - ULONG Prototype : 1; - ULONG reserved : 1; - ULONG PageFrameNumber : 20; -} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86; - typedef struct _KAPC_STATE { LIST_ENTRY ApcListHead[2]; PKPROCESS Process; @@ -554,38 +537,6 @@ BOOLEAN UserApcPending; } KAPC_STATE, *PKAPC_STATE, *__restrict PRKAPC_STATE; -typedef struct _KGDTENTRY { - USHORT LimitLow; - USHORT BaseLow; - union { - struct { - UCHAR BaseMid; - UCHAR Flags1; - UCHAR Flags2; - UCHAR BaseHi; - } Bytes; - struct { - ULONG BaseMid : 8; - ULONG Type : 5; - ULONG Dpl : 2; - ULONG Pres : 1; - ULONG LimitHi : 4; - ULONG Sys : 1; - ULONG Reserved_0 : 1; - ULONG Default_Big : 1; - ULONG Granularity : 1; - ULONG BaseHi : 8; - } Bits; - } HighWord; -} KGDTENTRY, *PKGDTENTRY; - -typedef struct _KIDTENTRY { - USHORT Offset; - USHORT Selector; - USHORT Access; - USHORT ExtendedOffset; -} KIDTENTRY, *PKIDTENTRY; - #if (VER_PRODUCTBUILD >= 2600) typedef struct _MMSUPPORT_FLAGS {
19 years, 4 months
1
0
0
0
[gvg] 15026: Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
by gvg@svn.reactos.com
Jose Manuel Ferrer Ortiz <jmfo1982(a)yahoo.es> - Spanish translations updated. Hans Leidekker <hans(a)it.vu.nl> - Dutch resource translation. Added: trunk/reactos/lib/shdocvw/Es.rc Added: trunk/reactos/lib/shdocvw/Nl.rc Modified: trunk/reactos/lib/shdocvw/shdocvw.rc _____ Copied: trunk/reactos/lib/shdocvw/Es.rc (from rev 15025, vendor/wine/dlls/shdocvw/current/Es.rc) Property changes on: trunk/reactos/lib/shdocvw/Es.rc ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Copied: trunk/reactos/lib/shdocvw/Nl.rc (from rev 15025, vendor/wine/dlls/shdocvw/current/Nl.rc) Property changes on: trunk/reactos/lib/shdocvw/Nl.rc ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/shdocvw/shdocvw.rc --- trunk/reactos/lib/shdocvw/shdocvw.rc 2005-05-05 22:24:27 UTC (rev 15025) +++ trunk/reactos/lib/shdocvw/shdocvw.rc 2005-05-05 22:36:25 UTC (rev 15026) @@ -25,5 +25,7 @@ #include "De.rc" #include "En.rc" +#include "Es.rc" #include "Fr.rc" +#include "Nl.rc" #include "Pt.rc"
19 years, 4 months
1
0
0
0
[hbirr] 15025: Fixed InterlockedClearBit.
by hbirr@svn.reactos.com
Fixed InterlockedClearBit. Modified: trunk/reactos/ntoskrnl/ex/i386/interlck.c _____ Modified: trunk/reactos/ntoskrnl/ex/i386/interlck.c --- trunk/reactos/ntoskrnl/ex/i386/interlck.c 2005-05-05 22:16:20 UTC (rev 15024) +++ trunk/reactos/ntoskrnl/ex/i386/interlck.c 2005-05-05 22:24:27 UTC (rev 15025) @@ -414,7 +414,7 @@ LOCK "btr %edx,(%ecx)\n\t" "setc %al\n\t" - "ret $8\n\t"); + "ret\n\t"); #elif defined(_MSC_VER) /*
19 years, 4 months
1
0
0
0
[gvg] 15024: Sync to Wine-20050419:
by gvg@svn.reactos.com
Sync to Wine-20050419: Francois Gouget <fgouget(a)free.fr> - Assorted spelling fixes. Mike McCormack <mike(a)codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths(a)yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw(a)codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153(a)yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang(a)yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs(a)gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl(a)math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine(a)troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara(a)volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric(a)codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. Modified: trunk/reactos/include/wine/shlguid.h Modified: trunk/reactos/lib/shell32/Makefile.in Modified: trunk/reactos/lib/shell32/autocomplete.c Modified: trunk/reactos/lib/shell32/classes.c Modified: trunk/reactos/lib/shell32/cpanelfolder.c Modified: trunk/reactos/lib/shell32/dataobject.c Modified: trunk/reactos/lib/shell32/debughlp.c Modified: trunk/reactos/lib/shell32/dragdrophelper.c Modified: trunk/reactos/lib/shell32/enumidlist.c Modified: trunk/reactos/lib/shell32/folders.c Modified: trunk/reactos/lib/shell32/iconcache.c Modified: trunk/reactos/lib/shell32/memorystream.c Modified: trunk/reactos/lib/shell32/pidl.c Modified: trunk/reactos/lib/shell32/pidl.h Modified: trunk/reactos/lib/shell32/regsvr.c Modified: trunk/reactos/lib/shell32/shell.c Modified: trunk/reactos/lib/shell32/shell32_main.c Modified: trunk/reactos/lib/shell32/shell32_main.h Modified: trunk/reactos/lib/shell32/shellfolder.h Modified: trunk/reactos/lib/shell32/shelllink.c Modified: trunk/reactos/lib/shell32/shellole.c Modified: trunk/reactos/lib/shell32/shellord.c Modified: trunk/reactos/lib/shell32/shellpath.c Modified: trunk/reactos/lib/shell32/shfldr_desktop.c Modified: trunk/reactos/lib/shell32/shfldr_fs.c Modified: trunk/reactos/lib/shell32/shfldr_mycomp.c Modified: trunk/reactos/lib/shell32/shlexec.c Modified: trunk/reactos/lib/shell32/shlfileop.c Modified: trunk/reactos/lib/shell32/shlfolder.c Modified: trunk/reactos/lib/shell32/shlmenu.c Modified: trunk/reactos/lib/shell32/shlview.c Modified: trunk/reactos/lib/shell32/shres.rc Modified: trunk/reactos/lib/shell32/shresdef.h Modified: trunk/reactos/lib/shell32/shv_bg_cmenu.c Modified: trunk/reactos/lib/shell32/shv_item_cmenu.c Modified: trunk/reactos/lib/shell32/systray.c Modified: trunk/reactos/w32api/include/shlguid.h Modified: trunk/reactos/w32api/include/shlobj.h _____ Modified: trunk/reactos/include/wine/shlguid.h --- trunk/reactos/include/wine/shlguid.h 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/include/wine/shlguid.h 2005-05-05 22:16:20 UTC (rev 15024) @@ -44,6 +44,7 @@ DEFINE_GUID(CLSID_RecycleBin, 0x645FF040, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E); DEFINE_GUID(CLSID_ControlPanel, 0x21EC2020, 0x3AEA, 0x1069, 0xA2, 0xDD, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D); DEFINE_GUID(CLSID_Printers, 0x2227A280, 0x3AEA, 0x1069, 0xA2, 0xDE, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D); +DEFINE_GUID(CLSID_MyDocuments, 0x450d8fba, 0xad25, 0x11d0, 0x98, 0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03); DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57); _____ Modified: trunk/reactos/lib/shell32/Makefile.in --- trunk/reactos/lib/shell32/Makefile.in 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/Makefile.in 2005-05-05 22:16:20 UTC (rev 15024) @@ -62,6 +62,7 @@ mycomputer.ico \ netdrive.ico \ netdrive2.ico \ + printer.ico \ ramdisk.ico C_SRCS16 = shell.c _____ Modified: trunk/reactos/lib/shell32/autocomplete.c --- trunk/reactos/lib/shell32/autocomplete.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/autocomplete.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -83,7 +83,7 @@ #define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); /* - converts This to a interface pointer + converts This to an interface pointer */ #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) #define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtblAutoComplete2) @@ -101,8 +101,7 @@ if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) return CLASS_E_NOAGGREGATION; - lpac = (IAutoCompleteImpl*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); + lpac = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); if (!lpac) return E_OUTOFMEMORY; @@ -280,7 +279,7 @@ LONG len; /* pwszRegKeyPath contains the key as well as the value, so we split */ - key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); + key = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); strcpyW(key, pwzsRegKeyPath); value = strrchrW(key, '\\'); *value = 0; @@ -294,7 +293,7 @@ if (res == ERROR_SUCCESS) { res = RegQueryValueW(hKey, value, result, &len); if (res == ERROR_SUCCESS) { - This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); + This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); strcpyW(This->quickComplete, result); } RegCloseKey(hKey); @@ -303,7 +302,7 @@ } if ((pwszQuickComplete) && (!This->quickComplete)) { - This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); + This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); lstrcpyW(This->quickComplete, pwszQuickComplete); } @@ -482,7 +481,7 @@ /* If quickComplete is set and control is pressed, replace the string */ control = GetKeyState(VK_CONTROL) & 0x8000; if (control && This->quickComplete) { - hwndQCText = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + hwndQCText = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(This->quickComplete)+lstrlenW(hwndText))*sizeof(WCHAR)); sel = sprintfW(hwndQCText, This->quickComplete, hwndText); SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); @@ -525,7 +524,7 @@ int len; len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); SendMessageW(hwnd, EM_SETSEL, lstrlenW(msg), lstrlenW(msg)); @@ -562,7 +561,7 @@ SendMessageW(This->hwndListBox, LB_RESETCONTENT, 0, 0); HeapFree(GetProcessHeap(), 0, This->txtbackup); - This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(), + This->txtbackup = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); lstrcpyW(This->txtbackup, hwndText); @@ -631,7 +630,7 @@ break; case WM_LBUTTONDOWN: len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); sel = (INT)SendMessageW(hwnd, LB_GETCURSEL, 0, 0); SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); _____ Modified: trunk/reactos/lib/shell32/classes.c --- trunk/reactos/lib/shell32/classes.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/classes.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -223,7 +223,12 @@ ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr); RegCloseKey(hkey); } - TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); + + if(ret) + TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); + else + TRACE("-- not found\n"); + return ret; } _____ Modified: trunk/reactos/lib/shell32/cpanelfolder.c --- trunk/reactos/lib/shell32/cpanelfolder.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/cpanelfolder.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -87,7 +87,7 @@ /* - converts This to a interface pointer + converts This to an interface pointer */ #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) @@ -124,7 +124,7 @@ if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) return CLASS_E_NOAGGREGATION; - sf = (ICPanelImpl *) LocalAlloc(GMEM_ZEROINIT, sizeof(ICPanelImpl)); + sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); if (!sf) return E_OUTOFMEMORY; @@ -904,26 +904,14 @@ ICPanel_PersistFolder2_GetCurFolder }; -HRESULT WINAPI CPanel_GetIconLocationA(LPITEMIDLIST pidl, LPSTR szIconFile, UINT cchMax, int* piIndex) +HRESULT CPanel_GetIconLocationW(LPITEMIDLIST pidl, + LPWSTR szIconFile, UINT cchMax, int* piIndex) { PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); if (!pcpanel) return E_INVALIDARG; - lstrcpyA(szIconFile, pcpanel->szName); - *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - -HRESULT WINAPI CPanel_GetIconLocationW(LPITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex) -{ - PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); - - if (!pcpanel) - return E_INVALIDARG; - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; @@ -935,7 +923,8 @@ * IShellExecuteHookW Implementation */ -static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface(IShellExecuteHookW* iface, REFIID riid, void** ppvObject) +static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( + IShellExecuteHookW* iface, REFIID riid, void** ppvObject) { _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); @@ -1087,10 +1076,8 @@ static IShellExecuteHookAVtbl vt_ShellExecuteHookA = { - IShellExecuteHookA_fnQueryInterface, IShellExecuteHookA_fnAddRef, IShellExecuteHookA_fnRelease, - IShellExecuteHookA_fnExecute }; _____ Modified: trunk/reactos/lib/shell32/dataobject.c --- trunk/reactos/lib/shell32/dataobject.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/dataobject.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -50,52 +50,9 @@ LPFORMATETC pFmt; } IEnumFORMATETCImpl; -static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj); -static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface); -static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface); -static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC* rgelt, ULONG* pceltFethed); -static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt); -static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface); -static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum); - -static struct IEnumFORMATETCVtbl efvt = +static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface( + LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj) { - IEnumFORMATETC_fnQueryInterface, - IEnumFORMATETC_fnAddRef, - IEnumFORMATETC_fnRelease, - IEnumFORMATETC_fnNext, - IEnumFORMATETC_fnSkip, - IEnumFORMATETC_fnReset, - IEnumFORMATETC_fnClone -}; - -LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) -{ - IEnumFORMATETCImpl* ef; - DWORD size=cfmt * sizeof(FORMATETC); - - ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl)); - - if(ef) - { - ef->ref=1; - ef->lpVtbl=&efvt; - - ef->countFmt = cfmt; - ef->pFmt = SHAlloc (size); - - if (ef->pFmt) - { - memcpy(ef->pFmt, afmt, size); - } - } - - TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt); - return (LPENUMFORMATETC)ef; -} - -static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj) -{ IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); @@ -118,7 +75,6 @@ } TRACE("-- Interface: E_NOINTERFACE\n"); return E_NOINTERFACE; - } static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface) @@ -203,7 +159,41 @@ return S_OK; } +static struct IEnumFORMATETCVtbl efvt = +{ + IEnumFORMATETC_fnQueryInterface, + IEnumFORMATETC_fnAddRef, + IEnumFORMATETC_fnRelease, + IEnumFORMATETC_fnNext, + IEnumFORMATETC_fnSkip, + IEnumFORMATETC_fnReset, + IEnumFORMATETC_fnClone +}; +LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) +{ + IEnumFORMATETCImpl* ef; + DWORD size=cfmt * sizeof(FORMATETC); + + ef = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl)); + + if(ef) + { + ef->ref=1; + ef->lpVtbl=&efvt; + + ef->countFmt = cfmt; + ef->pFmt = SHAlloc (size); + + if (ef->pFmt) + memcpy(ef->pFmt, afmt, size); + } + + TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt); + return (LPENUMFORMATETC)ef; +} + + /*********************************************************************** * IDataObject implementation */ @@ -229,38 +219,6 @@ } IDataObjectImpl; -static struct IDataObjectVtbl dtovt; - -/********************************************************************** **** -* IDataObject_Constructor -*/ -LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl) -{ - IDataObjectImpl* dto; - - dto = (IDataObjectImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDataObjectImpl)); - - if (dto) - { - dto->ref = 1; - dto->lpVtbl = &dtovt; - dto->pidl = ILClone(pMyPidl); - dto->apidl = _ILCopyaPidl(apidl, cidl); - dto->cidl = cidl; - - dto->cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); - dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); - dto->cfFileNameW = RegisterClipboardFormatA(CFSTR_FILENAMEW); - InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL); - } - - TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl); - return (LPDATAOBJECT)dto; -} - /*********************************************************************** **** * IDataObject_QueryInterface */ @@ -465,3 +423,34 @@ IDataObject_fnDUnadvise, IDataObject_fnEnumDAdvise }; + +/********************************************************************** **** +* IDataObject_Constructor +*/ +LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, + LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl) +{ + IDataObjectImpl* dto; + + dto = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDataObjectImpl)); + + if (dto) + { + dto->ref = 1; + dto->lpVtbl = &dtovt; + dto->pidl = ILClone(pMyPidl); + dto->apidl = _ILCopyaPidl(apidl, cidl); + dto->cidl = cidl; + + dto->cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); + dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); + dto->cfFileNameW = RegisterClipboardFormatA(CFSTR_FILENAMEW); + InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL); + } + + TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl); + return (LPDATAOBJECT)dto; +} _____ Modified: trunk/reactos/lib/shell32/debughlp.c --- trunk/reactos/lib/shell32/debughlp.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/debughlp.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -136,6 +136,7 @@ { case PT_SHELLEXT: case PT_GUID: + case PT_YAGUID: return &(pdata->u.guid.guid); } } @@ -158,13 +159,13 @@ if (_dbg_ILIsDesktop(pidl)) { /* desktop */ - if (szOut) strncpy(szOut, "Desktop", uOutSize); + if (szOut) lstrcpynA(szOut, "Desktop", uOutSize); dwReturn = strlen ("Desktop"); } else if (( szSrc = _dbg_ILGetTextPointer(pidl) )) { /* filesystem */ - if (szOut) strncpy(szOut, szSrc, uOutSize); + if (szOut) lstrcpynA(szOut, szSrc, uOutSize); dwReturn = strlen(szSrc); } else if (( riid = _dbg_ILGetGUIDPointer(pidl) )) @@ -215,7 +216,7 @@ pidltemp = _dbg_ILGetNext(pidltemp); - } while (pidltemp->mkid.cb); + } while (pidltemp && pidltemp->mkid.cb); } else { @@ -224,60 +225,69 @@ pcheck(pidl); } } -#define BYTES_PRINTED 32 -BOOL pcheck (LPCITEMIDLIST pidl) + +static void dump_pidl_hex( LPCITEMIDLIST pidl ) { - DWORD type, ret=TRUE; - LPCITEMIDLIST pidltemp = pidl; + const unsigned char *p = (const unsigned char *)pidl; + const int max_bytes = 0x80, max_line = 0x10; + char szHex[max_line*3+1], szAscii[max_line+1]; + int i, n; - if (pidltemp && pidltemp->mkid.cb) - { do - { type = _dbg_ILGetDataPointer(pidltemp)->type; - switch (type) - { case PT_CPLAPPLET: - case PT_GUID: - case PT_SHELLEXT: - case PT_DRIVE: - case PT_DRIVE1: - case PT_DRIVE2: - case PT_DRIVE3: - case PT_FOLDER: - case PT_VALUE: - case PT_FOLDER1: - case PT_WORKGRP: - case PT_COMP: - case PT_NETPROVIDER: - case PT_NETWORK: - case PT_IESPECIAL1: - case PT_YAGUID: - case PT_IESPECIAL2: - case PT_SHARE: - break; - default: - { - char szTemp[BYTES_PRINTED*4 + 1]; - int i; - unsigned char c; + n = pidl->mkid.cb; + if( n>max_bytes ) + n = max_bytes; + for( i=0; i<n; i++ ) + { + sprintf( &szHex[ (i%max_line)*3 ], "%02X ", p[i] ); + szAscii[ (i%max_line) ] = isprint( p[i] ) ? p[i] : '.'; - memset(szTemp, ' ', BYTES_PRINTED*4 + 1); - for ( i = 0; (i<pidltemp->mkid.cb) && (i<BYTES_PRINTED); i++) - { - c = ((const unsigned char *)pidltemp)[i]; + /* print out at the end of each line and when we're finished */ + if( i!=(n-1) && (i%max_line) != (max_line-1) ) + continue; + szAscii[ (i%max_line)+1 ] = 0; + DPRINTF("%-*s %s\n", max_line*3, szHex, szAscii ); + } +} - szTemp[i*3+0] = ((c>>4)>9)? (c>>4)+55 : (c>>4)+48; - szTemp[i*3+1] = ((0x0F&c)>9)? (0x0F&c)+55 : (0x0F&c)+48; - szTemp[i*3+2] = ' '; - szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.'; - } - szTemp[BYTES_PRINTED*4] = 0x00; - ERR("unknown IDLIST %p [%p] size=%u type=%lx\n%s\n",pidl, pidltemp, pidltemp->mkid.cb,type, szTemp); - ret = FALSE; - } - } - pidltemp = _dbg_ILGetNext(pidltemp); - } while (pidltemp->mkid.cb); - } - return ret; +BOOL pcheck( LPCITEMIDLIST pidl ) +{ + DWORD type; + LPCITEMIDLIST pidltemp = pidl; + + while( pidltemp && pidltemp->mkid.cb ) + { + type = _dbg_ILGetDataPointer(pidltemp)->type; + switch( type ) + { + case PT_CPLAPPLET: + case PT_GUID: + case PT_SHELLEXT: + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + case PT_FOLDER: + case PT_VALUE: + case PT_VALUEW: + case PT_FOLDER1: + case PT_WORKGRP: + case PT_COMP: + case PT_NETPROVIDER: + case PT_NETWORK: + case PT_IESPECIAL1: + case PT_YAGUID: + case PT_IESPECIAL2: + case PT_SHARE: + break; + default: + ERR("unknown IDLIST %p [%p] size=%u type=%lx\n", + pidl, pidltemp, pidltemp->mkid.cb,type ); + dump_pidl_hex( pidltemp ); + return FALSE; + } + pidltemp = _dbg_ILGetNext(pidltemp); + } + return TRUE; } static char shdebugstr_buf1[100]; @@ -308,6 +318,8 @@ {&IID_IDataObject, "IID_IDataObject"}, {&IID_IAutoComplete, "IID_IAutoComplete"}, {&IID_IAutoComplete2, "IID_IAutoComplete2"}, + {&IID_IShellLinkA, "IID_IShellLinkA"}, + {&IID_IShellLinkW, "IID_IShellLinkW"}, {NULL,NULL}}; const char * shdebugstr_guid( const struct _GUID *id ) _____ Modified: trunk/reactos/lib/shell32/dragdrophelper.c --- trunk/reactos/lib/shell32/dragdrophelper.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/dragdrophelper.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -71,7 +71,7 @@ if (pUnkOuter) return CLASS_E_NOAGGREGATION; - dth = (IDropTargetHelperImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IDropTargetHelperImpl)); + dth = (IDropTargetHelperImpl *) LocalAlloc (LMEM_ZEROINIT, sizeof (IDropTargetHelperImpl)); if (!dth) return E_OUTOFMEMORY; dth->ref = 0; _____ Modified: trunk/reactos/lib/shell32/enumidlist.c --- trunk/reactos/lib/shell32/enumidlist.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/enumidlist.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -193,7 +193,7 @@ IEnumIDList * IEnumIDList_Constructor(void) { - IEnumIDListImpl *lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(), + IEnumIDListImpl *lpeidl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); if (lpeidl) _____ Modified: trunk/reactos/lib/shell32/folders.c --- trunk/reactos/lib/shell32/folders.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/folders.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -40,6 +40,7 @@ #include "pidl.h" #include "shell32_main.h" #include "shfldr.h" +#include "shresdef.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -74,7 +75,7 @@ TRACE("%p\n", pidl); - ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImp l)); + ei = HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); ei->ref=1; ei->lpVtbl = &eivt; ei->lpvtblPersistFile = &pfvt; @@ -196,9 +197,9 @@ if (!HCR_GetDefaultIconW(folder, szIconFile, cchMax, &dwNr)) { lstrcpynW(szIconFile, swShell32Name, cchMax); - dwNr = 3; + dwNr = IDI_SHELL_FOLDER; } - *piIndex = (uFlags & GIL_OPENICON) ? dwNr + 1 : dwNr; + *piIndex = -((uFlags & GIL_OPENICON) ? dwNr + 1 : dwNr); } return S_OK; } @@ -233,7 +234,7 @@ if (_ILIsDesktop(pSimplePidl)) { lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 34; + *piIndex = -IDI_SHELL_DESKTOP; } /* my computer and other shell extensions */ @@ -257,7 +258,14 @@ else { lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 15; + if(IsEqualGUID(riid, &CLSID_MyComputer)) + *piIndex = -IDI_SHELL_MY_COMPUTER; + else if(IsEqualGUID(riid, &CLSID_MyDocuments)) + *piIndex = -IDI_SHELL_FOLDER; + else if(IsEqualGUID(riid, &CLSID_NetworkPlaces)) + *piIndex = -IDI_SHELL_MY_NETWORK_PLACES; + else + *piIndex = -IDI_SHELL_FOLDER; } } @@ -271,17 +279,17 @@ { switch(GetDriveTypeA(sTemp)) { - case DRIVE_REMOVABLE: icon_idx = 5; break; - case DRIVE_CDROM: icon_idx = 11; break; - case DRIVE_REMOTE: icon_idx = 9; break; - case DRIVE_RAMDISK: icon_idx = 12; break; + case DRIVE_REMOVABLE: icon_idx = IDI_SHELL_FLOPPY; break; + case DRIVE_CDROM: icon_idx = IDI_SHELL_CDROM; break; + case DRIVE_REMOTE: icon_idx = IDI_SHELL_NETDRIVE; break; + case DRIVE_RAMDISK: icon_idx = IDI_SHELL_RAMDISK; break; } } if (icon_idx != -1) { lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = icon_idx; + *piIndex = -icon_idx; } else { @@ -292,14 +300,14 @@ else { lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 8; + *piIndex = -IDI_SHELL_DRIVE; } } } else if (_ILIsFolder (pSimplePidl)) { - getIconLocationForFolder(iface, uFlags, szIconFile, cchMax, piIndex, - pwFlags); + getIconLocationForFolder(iface, uFlags, szIconFile, cchMax, piIndex, + pwFlags); } else { @@ -370,14 +378,18 @@ static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) { IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + int index; - FIXME("(%p) (file=%p index=%u %p %p size=%u) semi-stub\n", This, debugstr_w(pszFile), nIconIndex, phiconLarge, phiconSmall, nIconSize); + FIXME("(%p) (file=%p index=%d %p %p size=%08x) semi-stub\n", This, debugstr_w(pszFile), (signed)nIconIndex, + phiconLarge, phiconSmall, nIconSize); + index = SIC_GetIconIndex(pszFile, nIconIndex); + if (phiconLarge) - *phiconLarge = ImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT); + *phiconLarge = ImageList_GetIcon(ShellBigIconList, index, ILD_TRANSPARENT); if (phiconSmall) - *phiconSmall = ImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT); + *phiconSmall = ImageList_GetIcon(ShellSmallIconList, index, ILD_TRANSPARENT); return S_OK; } _____ Modified: trunk/reactos/lib/shell32/iconcache.c --- trunk/reactos/lib/shell32/iconcache.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/iconcache.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -257,7 +257,8 @@ hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_small, cy_small, LR_SHARED); hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_large, cy_large, LR_SHARED); } - SIC_IconAppend (swShell32Name, index, hSm, hLg); + SIC_IconAppend (swShell32Name, index - 1, hSm, hLg); + SIC_IconAppend (swShell32Name, -index, hSm, hLg); } TRACE("hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList); _____ Modified: trunk/reactos/lib/shell32/memorystream.c --- trunk/reactos/lib/shell32/memorystream.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/memorystream.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -1,12 +1,12 @@ /* - * this class implements a pure IStream object - * and can be used for many purposes + * This class implements a pure IStream object + * and can be used for many purposes. * - * the main reason for implementing this was + * The main reason for implementing this was * a cleaner implementation of IShellLink which - * needs to be able to load lnk's from a IStream + * needs to be able to load lnks from an IStream * interface so it was obvious to capsule the file - * access in a IStream to. + * access in an IStream to. * * Copyright 1999 Juergen Schmied * Copyright 2003 Mike McCormack for CodeWeavers @@ -42,59 +42,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); -static const IStreamVtbl stvt; +#define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) +#define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0) +#define STGM_CREATE_MODE(stgm) ((stgm)&0x0f000) typedef struct { const IStreamVtbl *lpvtst; - DWORD ref; - HANDLE handle; + DWORD ref; + HANDLE handle; } ISHFileStream; /*********************************************************************** *** - * CreateStreamOnFile() - * - * similar to CreateStreamOnHGlobal - */ -HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm) -{ - ISHFileStream* fstr; - HANDLE handle; - DWORD access = GENERIC_READ, creat; - - if( grfMode & STGM_TRANSACTED ) - return E_INVALIDARG; - - if( grfMode & STGM_WRITE ) - access |= GENERIC_WRITE; - if( grfMode & STGM_READWRITE ) - access = GENERIC_WRITE | GENERIC_READ; - - if( grfMode & STGM_CREATE ) - creat = CREATE_ALWAYS; - else - creat = OPEN_EXISTING; - - TRACE("Opening %s\n", debugstr_w(pszFilename) ); - - handle = CreateFileW( pszFilename, access, FILE_SHARE_READ, NULL, creat, 0, NULL ); - if( handle == INVALID_HANDLE_VALUE ) - return HRESULT_FROM_WIN32(GetLastError()); - - fstr = (ISHFileStream*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY,sizeof(ISHFileStream)); - if( !fstr ) - return E_OUTOFMEMORY; - fstr->lpvtst=&stvt; - fstr->ref = 1; - fstr->handle = handle; - - (*ppstm) = (IStream*)fstr; - - return S_OK; -} - -/********************************************************************** **** * IStream_fnQueryInterface */ static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj) @@ -105,17 +64,14 @@ *ppvObj = NULL; - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IStream)) - { - *ppvObj = This; - } + if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IStream)) + *ppvObj = This; if(*ppvObj) { - IStream_AddRef((IStream*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; + IStream_AddRef((IStream*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; } TRACE("-- Interface: E_NOINTERFACE\n"); return E_NOINTERFACE; @@ -294,5 +250,60 @@ IStream_fnUnlockRegion, IStream_fnStat, IStream_fnClone +}; -}; +/********************************************************************** **** + * CreateStreamOnFile() + * + * similar to CreateStreamOnHGlobal + */ +HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm) +{ + ISHFileStream* fstr; + HANDLE handle; + DWORD access = GENERIC_READ, creat; + + if( grfMode & STGM_TRANSACTED ) + return E_INVALIDARG; + + switch( STGM_ACCESS_MODE( grfMode ) ) + { + case STGM_READ: + access = GENERIC_READ; + break; + case STGM_WRITE: + case STGM_READWRITE: + access = GENERIC_WRITE | GENERIC_READ; + break; + default: + return STG_E_INVALIDFLAG; + } + + switch( STGM_CREATE_MODE( grfMode ) ) + { + case STGM_CREATE: + creat = CREATE_ALWAYS; + break; + case STGM_FAILIFTHERE: + creat = OPEN_EXISTING; + break; + default: + return STG_E_INVALIDFLAG; + } + + handle = CreateFileW( pszFilename, access, + FILE_SHARE_READ, NULL, creat, 0, NULL ); + if( handle == INVALID_HANDLE_VALUE ) + return HRESULT_FROM_WIN32(GetLastError()); + + fstr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ISHFileStream)); + if( !fstr ) + return E_OUTOFMEMORY; + fstr->lpvtst = &stvt; + fstr->ref = 1; + fstr->handle = handle; + + (*ppstm) = (IStream*)fstr; + + return S_OK; +} _____ Modified: trunk/reactos/lib/shell32/pidl.c --- trunk/reactos/lib/shell32/pidl.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/pidl.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -1226,7 +1226,7 @@ if (SUCCEEDED(hr)) PathAddBackslashA(pszPath); } - /* The only other valid case is a item ID list beginning at "My Computer" */ + /* The only other valid case is an item ID list beginning at "My Computer" */ else if (_ILIsMyComputer(pidl)) pidl = ILGetNext(pidl); @@ -1338,7 +1338,7 @@ if (SUCCEEDED(hr)) PathAddBackslashW(pszPath); } - /* The only other valid case is a item ID list beginning at "My Computer" */ + /* The only other valid case is an item ID list beginning at "My Computer" */ else if (_ILIsMyComputer(pidl)) pidl = ILGetNext(pidl); @@ -1825,7 +1825,7 @@ TRACE("(%p)\n",pidl); - return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type)) || + return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type || PT_YAGUID == lpPData->type)) || (pidl && pidl->mkid.cb == 0x00) )); } @@ -2081,6 +2081,7 @@ { case PT_SHELLEXT: case PT_GUID: + case PT_YAGUID: return &(pdata->u.guid.guid); default: _____ Modified: trunk/reactos/lib/shell32/pidl.h --- trunk/reactos/lib/shell32/pidl.h 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/pidl.h 2005-05-05 22:16:20 UTC (rev 15024) @@ -97,6 +97,7 @@ #define PT_FOLDER1 0x30 #define PT_FOLDER 0x31 #define PT_VALUE 0x32 +#define PT_VALUEW 0x34 #define PT_WORKGRP 0x41 #define PT_COMP 0x42 #define PT_NETPROVIDER 0x46 @@ -142,6 +143,11 @@ The second the dos name when needed or just 0x00 */ } FileStruct; +typedef struct tagValueW +{ + WCHAR name[1]; +} ValueWStruct; + typedef struct tagPIDLDATA { PIDLTYPE type; /*00*/ union @@ -159,6 +165,7 @@ CHAR szName[1]; /*06*/ /* terminated by 0x00 0x00 */ } htmlhelp; struct tagPIDLCPanelStruct cpanel; + struct tagValueW valueW; }u; } PIDLDATA, *LPPIDLDATA; #include "poppack.h" _____ Modified: trunk/reactos/lib/shell32/regsvr.c --- trunk/reactos/lib/shell32/regsvr.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/regsvr.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -477,6 +477,12 @@ "shell32.dll", "Apartment" }, + { &CLSID_DragDropHelper, + "Shell Drag and Drop Helper", + NULL, + "shell32.dll", + "Apartment" + }, { &CLSID_MyComputer, "My Computer", NULL, _____ Modified: trunk/reactos/lib/shell32/shell.c --- trunk/reactos/lib/shell32/shell.c 2005-05-05 21:07:02 UTC (rev 15023) +++ trunk/reactos/lib/shell32/shell.c 2005-05-05 22:16:20 UTC (rev 15024) @@ -287,11 +287,11 @@ int i; if (phiconLarge) - ilarge = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); + ilarge = HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); else ilarge = NULL; if (phiconSmall) - ismall = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); + ismall = HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); else ismall = NULL; ret = HICON_16(ExtractIconExA(lpszFile,nIconIndex,ilarge,ismall,nIcons)); @@ -368,7 +368,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length) { LPSTR lpEnv = MapSL(GetDOSEnvironment16()); - LPSTR lpBuffer = (LPSTR)HeapAlloc( GetProcessHeap(), 0, length); + LPSTR lpBuffer = HeapAlloc( GetProcessHeap(), 0, length); LPSTR lpstr = str; LPSTR lpbstr = lpBuffer; _____ Modified: trunk/reactos/lib/shell32/shell32_main.c --- trunk/reactos/lib/shell32/shell32_main.c 2005-05-05 21:07:02 UTC (rev 15023) [truncated at 1000 lines; 1859 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 15023: Sync to Wine-20050419:
by gvg@svn.reactos.com
Sync to Wine-20050419: Mike McCormack <mike(a)codeweavers.com> - Add stub for FaultInIEFeature. Modified: trunk/reactos/lib/urlmon/urlmon.spec Modified: trunk/reactos/lib/urlmon/urlmon_main.c Modified: trunk/reactos/w32api/include/wtypes.h _____ Modified: trunk/reactos/lib/urlmon/urlmon.spec --- trunk/reactos/lib/urlmon/urlmon.spec 2005-05-05 20:52:14 UTC (rev 15022) +++ trunk/reactos/lib/urlmon/urlmon.spec 2005-05-05 21:07:02 UTC (rev 15023) @@ -33,7 +33,7 @@ @ stdcall -private DllRegisterServerEx() URLMON_DllRegisterServerEx @ stdcall -private DllUnregisterServer() URLMON_DllUnregisterServer @ stdcall Extract(long ptr) cabinet.Extract -@ stub FaultInIEFeature +@ stdcall FaultInIEFeature(long ptr ptr long) @ stub FindMediaType @ stub FindMediaTypeClass @ stdcall FindMimeFromData(long ptr ptr long ptr long ptr long) _____ Modified: trunk/reactos/lib/urlmon/urlmon_main.c --- trunk/reactos/lib/urlmon/urlmon_main.c 2005-05-05 20:52:14 UTC (rev 15022) +++ trunk/reactos/lib/urlmon/urlmon_main.c 2005-05-05 21:07:02 UTC (rev 15023) @@ -329,3 +329,15 @@ return S_OK; } + +/********************************************************************** **** + * FaultInIEFeature (URLMON.@) + * + * Undocumented. Appears to be used by native shdocvw.dll. + */ +HRESULT WINAPI FaultInIEFeature( HWND hwnd, uCLSSPEC * pClassSpec, + QUERYCONTEXT *pQuery, DWORD flags ) +{ + FIXME("%p %p %p %08lx\n", hwnd, pClassSpec, pQuery, flags); + return E_NOTIMPL; +} _____ Modified: trunk/reactos/w32api/include/wtypes.h --- trunk/reactos/w32api/include/wtypes.h 2005-05-05 20:52:14 UTC (rev 15022) +++ trunk/reactos/w32api/include/wtypes.h 2005-05-05 21:07:02 UTC (rev 15023) @@ -160,6 +160,37 @@ }; } DECIMAL; typedef void *HMETAFILEPICT; +typedef struct tagCSPLATFORM { + DWORD dwPlatformId; + DWORD dwVersionHi; + DWORD dwVersionLo; + DWORD dwProcessorArch; +} CSPLATFORM; +typedef struct tagQUERYCONTEXT { + DWORD dwContext; + CSPLATFORM Platform; + LCID Locale; + DWORD dwVersionHi; + DWORD dwVersionLo; +} QUERYCONTEXT; +typedef struct { + DWORD tyspec; + union { + CLSID clsid; + LPOLESTR pFileExt; + LPOLESTR pMimeType; + LPOLESTR pProgId; + LPOLESTR pFileName; + struct { + LPOLESTR pPackageName; + GUID PolicyId; + } ByName; + struct { + GUID ObjectId; + GUID PolicyId; + } ByObjectId; + } tagged_union; +} uCLSSPEC; #ifdef __cplusplus } #endif
19 years, 4 months
1
0
0
0
[hpoussin] 15022: SVN maintenance: Set eol style to native and add keywords
by hpoussin@svn.reactos.com
SVN maintenance: Set eol style to native and add keywords Modified: trunk/reactos/lib/rtl/access.c Modified: trunk/reactos/lib/rtl/i386/alldiv.s Modified: trunk/reactos/lib/rtl/i386/allmul.s Modified: trunk/reactos/lib/rtl/i386/allrem.s Modified: trunk/reactos/lib/rtl/i386/allshl.s Modified: trunk/reactos/lib/rtl/i386/allshr.s Modified: trunk/reactos/lib/rtl/i386/aulldiv.s Modified: trunk/reactos/lib/rtl/i386/aullrem.s Modified: trunk/reactos/lib/rtl/i386/aullshr.s Modified: trunk/reactos/lib/rtl/readme.txt Modified: trunk/reactos/lib/rtl/registry.c _____ Modified: trunk/reactos/lib/rtl/access.c --- trunk/reactos/lib/rtl/access.c 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/access.c 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,68 +1,68 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: lib/rtl/access.c - * PURPOSE: Access rights handling functions - * - * PROGRAMMERS: Eric Kohl - */ - -/* INCLUDES *****************************************************************/ - -#include <ddk/ntddk.h> -#include <ntdll/rtl.h> - -#define NDEBUG -#include <debug.h> - -/* FUNCTIONS ***************************************************************/ - -/* - * @implemented - */ -BOOLEAN STDCALL -RtlAreAllAccessesGranted(ACCESS_MASK GrantedAccess, - ACCESS_MASK DesiredAccess) -{ - PAGED_CODE_RTL(); - return ((GrantedAccess & DesiredAccess) == DesiredAccess); -} - - -/* - * @implemented - */ -BOOLEAN STDCALL -RtlAreAnyAccessesGranted(ACCESS_MASK GrantedAccess, - ACCESS_MASK DesiredAccess) -{ - PAGED_CODE_RTL(); - return ((GrantedAccess & DesiredAccess) != 0); -} - - -/* - * @implemented - */ -VOID STDCALL -RtlMapGenericMask(PACCESS_MASK AccessMask, - PGENERIC_MAPPING GenericMapping) -{ - PAGED_CODE_RTL(); - - if (*AccessMask & GENERIC_READ) - *AccessMask |= GenericMapping->GenericRead; - - if (*AccessMask & GENERIC_WRITE) - *AccessMask |= GenericMapping->GenericWrite; - - if (*AccessMask & GENERIC_EXECUTE) - *AccessMask |= GenericMapping->GenericExecute; - - if (*AccessMask & GENERIC_ALL) - *AccessMask |= GenericMapping->GenericAll; - - *AccessMask &= ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); -} - -/* EOF */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rtl/access.c + * PURPOSE: Access rights handling functions + * + * PROGRAMMERS: Eric Kohl + */ + +/* INCLUDES *****************************************************************/ + +#include <ddk/ntddk.h> +#include <ntdll/rtl.h> + +#define NDEBUG +#include <debug.h> + +/* FUNCTIONS ***************************************************************/ + +/* + * @implemented + */ +BOOLEAN STDCALL +RtlAreAllAccessesGranted(ACCESS_MASK GrantedAccess, + ACCESS_MASK DesiredAccess) +{ + PAGED_CODE_RTL(); + return ((GrantedAccess & DesiredAccess) == DesiredAccess); +} + + +/* + * @implemented + */ +BOOLEAN STDCALL +RtlAreAnyAccessesGranted(ACCESS_MASK GrantedAccess, + ACCESS_MASK DesiredAccess) +{ + PAGED_CODE_RTL(); + return ((GrantedAccess & DesiredAccess) != 0); +} + + +/* + * @implemented + */ +VOID STDCALL +RtlMapGenericMask(PACCESS_MASK AccessMask, + PGENERIC_MAPPING GenericMapping) +{ + PAGED_CODE_RTL(); + + if (*AccessMask & GENERIC_READ) + *AccessMask |= GenericMapping->GenericRead; + + if (*AccessMask & GENERIC_WRITE) + *AccessMask |= GenericMapping->GenericWrite; + + if (*AccessMask & GENERIC_EXECUTE) + *AccessMask |= GenericMapping->GenericExecute; + + if (*AccessMask & GENERIC_ALL) + *AccessMask |= GenericMapping->GenericAll; + + *AccessMask &= ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); +} + +/* EOF */ Property changes on: trunk/reactos/lib/rtl/access.c ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/alldiv.s --- trunk/reactos/lib/rtl/i386/alldiv.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/alldiv.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: alldiv.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/alldiv.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/allmul.s --- trunk/reactos/lib/rtl/i386/allmul.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/allmul.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: allmul.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/allmul.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/allrem.s --- trunk/reactos/lib/rtl/i386/allrem.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/allrem.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: allrem.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/allrem.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/allshl.s --- trunk/reactos/lib/rtl/i386/allshl.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/allshl.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: allshl.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/allshl.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/allshr.s --- trunk/reactos/lib/rtl/i386/allshr.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/allshr.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: allshr.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/allshr.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/aulldiv.s --- trunk/reactos/lib/rtl/i386/aulldiv.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/aulldiv.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: aulldiv.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/aulldiv.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/aullrem.s --- trunk/reactos/lib/rtl/i386/aullrem.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/aullrem.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: aullrem.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/aullrem.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/i386/aullshr.s --- trunk/reactos/lib/rtl/i386/aullshr.s 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/i386/aullshr.s 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: aullshr.s 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/i386/aullshr.s ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/readme.txt --- trunk/reactos/lib/rtl/readme.txt 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/readme.txt 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,5 +1,5 @@ -RTL restrictions: - -ExAllocatePool (and friends) must be used exclusively. RtlAllocateHeap (and friends) must NOT be used! ExAllocatePool (and friends) translate to RtlAllocateHeap (and friends) in ntdll\rtl\libsupp.c. - +RTL restrictions: + +ExAllocatePool (and friends) must be used exclusively. RtlAllocateHeap (and friends) must NOT be used! ExAllocatePool (and friends) translate to RtlAllocateHeap (and friends) in ntdll\rtl\libsupp.c. + RtlEnterCriticalSection (and friends) must be used exclusively. ExAcquireFastMutex (and friends) must NOT be used! RtlEnterCriticalSection (and friends) translate to ExAcquireFastMutex (and friends) in ntoskrnl\rtl\libsupp.c. This means that RtlEnterCriticalSection (and friends) can NOT be used recursively in RTL. The reason for choosing RtlEnterCriticalSection (and friends) over ExAcquireFastMutex (and friends) is that the FAST_MUTEX struct is smaller than the RTL_CRITICAL_SECTION struct. \ No newline at end of file Property changes on: trunk/reactos/lib/rtl/readme.txt ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/rtl/registry.c --- trunk/reactos/lib/rtl/registry.c 2005-05-05 20:19:01 UTC (rev 15021) +++ trunk/reactos/lib/rtl/registry.c 2005-05-05 20:52:14 UTC (rev 15022) @@ -1,4 +1,4 @@ -/* $Id: registry.c 12852 2005-01-06 13:58:04Z mf $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel Property changes on: trunk/reactos/lib/rtl/registry.c ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native
19 years, 4 months
1
0
0
0
[hpoussin] 15021: RtlFreeUnicodeString -> ExFreePool changes
by hpoussin@svn.reactos.com
RtlFreeUnicodeString -> ExFreePool changes Modified: trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/ntoskrnl/io/arcname.c Modified: trunk/reactos/ntoskrnl/io/driver.c Modified: trunk/reactos/ntoskrnl/io/irp.c Modified: trunk/reactos/ntoskrnl/ob/symlink.c Modified: trunk/reactos/ntoskrnl/rtl/capture.c _____ Modified: trunk/reactos/ntoskrnl/ex/init.c --- trunk/reactos/ntoskrnl/ex/init.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/ex/init.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -125,14 +125,14 @@ &ObjectAttributes); /* Free the String */ - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); /* Check for Success */ if (!NT_SUCCESS(Status)) { /* Free the Strings */ RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&ArcDeviceName); + ExFreePool(ArcDeviceName.Buffer); CPRINT("NtOpenSymbolicLinkObject() failed (Status %x)\n", Status); KEBUGCHECK(0); } @@ -148,7 +148,7 @@ /* Free the Strings */ RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&ArcDeviceName); + ExFreePool(ArcDeviceName.Buffer); CPRINT("NtQuerySymbolicLinkObject() failed (Status %x)\n", Status); KEBUGCHECK(0); } @@ -209,8 +209,8 @@ /* Free all the Strings we have in memory */ RtlFreeUnicodeString (&BootPath); - RtlFreeUnicodeString (&DriveDeviceName); - RtlFreeUnicodeString (&ArcDeviceName); + ExFreePool(DriveDeviceName.Buffer); + ExFreePool(ArcDeviceName.Buffer); /* Make sure we found the Boot Drive */ if (BootDriveFound == FALSE) { _____ Modified: trunk/reactos/ntoskrnl/io/arcname.c --- trunk/reactos/ntoskrnl/io/arcname.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/io/arcname.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -413,15 +413,15 @@ if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&DeviceName); + ExFreePool(DeviceName.Buffer); CPRINT("ZwOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n", &ArcName, Status); - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); return(Status); } - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); Status = ZwQuerySymbolicLinkObject(Handle, &DeviceName, @@ -430,7 +430,7 @@ if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&DeviceName); + ExFreePool(DeviceName.Buffer); CPRINT("ZwQuerySymbolicObject() failed (Status %x)\n", Status); @@ -450,7 +450,7 @@ Status = IoCreateSymbolicLink(&LinkName, &DeviceName); - RtlFreeUnicodeString (&DeviceName); + ExFreePool(DeviceName.Buffer); if (!NT_SUCCESS(Status)) { CPRINT("IoCreateSymbolicLink() failed (Status %x)\n", _____ Modified: trunk/reactos/ntoskrnl/io/driver.c --- trunk/reactos/ntoskrnl/io/driver.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/io/driver.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -188,7 +188,7 @@ DPRINT("IopDeleteDriver(ObjectBody %x)\n", ObjectBody); ExFreePool(Object->DriverExtension); - RtlFreeUnicodeString(&Object->DriverName); + ExFreePool(Object->DriverName.Buffer); OldIrql = KeRaiseIrqlToDpcLevel(); @@ -197,7 +197,7 @@ DriverExtension = NextDriverExtension) { NextDriverExtension = DriverExtension->Link; - ExFreePool(DriverExtension); + ExFreePoolWithTag(DriverExtension, TAG_DRIVER_EXTENSION); } KfLowerIrql(OldIrql); @@ -358,7 +358,7 @@ wcscpy(ImagePath->Buffer, L"\\SystemRoot\\"); wcscat(ImagePath->Buffer, InputImagePath.Buffer); - RtlFreeUnicodeString(&InputImagePath); + ExFreePool(InputImagePath.Buffer); } return STATUS_SUCCESS; @@ -496,7 +496,7 @@ Status = STATUS_IMAGE_ALREADY_LOADED; } - RtlFreeUnicodeString(&ServiceImagePath); + ExFreePool(ServiceImagePath.Buffer); /* * Now check if the module was loaded successfully. @@ -908,8 +908,8 @@ NULL); if (!NT_SUCCESS(Status) || Service->Start > 1) { - RtlFreeUnicodeString(&Service->ServiceGroup); - RtlFreeUnicodeString(&Service->ImagePath); + ExFreePool(Service->ServiceGroup.Buffer); + ExFreePool(Service->ImagePath.Buffer); ExFreePool(Service); return(Status); } @@ -1065,7 +1065,7 @@ { CurrentGroup = CONTAINING_RECORD(GroupEntry, SERVICE_GROUP, GroupListEntry); - RtlFreeUnicodeString(&CurrentGroup->GroupName); + ExFreePool(CurrentGroup->GroupName.Buffer); RemoveEntryList(GroupEntry); if (CurrentGroup->TagArray) { @@ -1082,10 +1082,10 @@ { CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry); - RtlFreeUnicodeString(&CurrentService->ServiceName); - RtlFreeUnicodeString(&CurrentService->RegistryPath); - RtlFreeUnicodeString(&CurrentService->ServiceGroup); - RtlFreeUnicodeString(&CurrentService->ImagePath); + ExFreePool(CurrentService->ServiceName.Buffer); + ExFreePool(CurrentService->RegistryPath.Buffer); + ExFreePool(CurrentService->ServiceGroup.Buffer); + ExFreePool(CurrentService->ImagePath.Buffer); RemoveEntryList(ServiceEntry); ExFreePool(CurrentService); @@ -1547,7 +1547,7 @@ * Free the service path */ - RtlFreeUnicodeString(&ImagePath); + ExFreePool(ImagePath.Buffer); /* * Unload the module and release the references to the device object @@ -1865,7 +1865,7 @@ if (!NT_SUCCESS(Status)) { DPRINT("RtlQueryRegistryValues() failed (Status %lx)\n", Status); - RtlFreeUnicodeString(&ImagePath); + ExFreePool(ImagePath.Buffer); goto ReleaseCapturedString; } _____ Modified: trunk/reactos/ntoskrnl/io/irp.c --- trunk/reactos/ntoskrnl/io/irp.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/io/irp.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -17,7 +17,7 @@ /* GLOBALS *******************************************************************/ #define TAG_IRP TAG('I', 'R', 'P', ' ') -#define TAG_SYS_BUF TAG('I', 'o', ' ' , ' ') +#define TAG_SYS_BUF TAG('S', 'Y', 'S' , 'B') /* FUNCTIONS *****************************************************************/ _____ Modified: trunk/reactos/ntoskrnl/ob/symlink.c --- trunk/reactos/ntoskrnl/ob/symlink.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/ob/symlink.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -72,7 +72,7 @@ { PSYMLINK_OBJECT SymlinkObject = (PSYMLINK_OBJECT)ObjectBody; - RtlFreeUnicodeString(&SymlinkObject->TargetName); + ExFreePool(SymlinkObject->TargetName.Buffer); } @@ -129,7 +129,7 @@ } /* transfer target path buffer into FullPath */ - RtlFreeUnicodeString(FullPath); + ExFreePool(FullPath->Buffer); FullPath->Length = TargetPath.Length; FullPath->MaximumLength = TargetPath.MaximumLength; FullPath->Buffer = TargetPath.Buffer; _____ Modified: trunk/reactos/ntoskrnl/rtl/capture.c --- trunk/reactos/ntoskrnl/rtl/capture.c 2005-05-05 20:14:39 UTC (rev 15020) +++ trunk/reactos/ntoskrnl/rtl/capture.c 2005-05-05 20:19:01 UTC (rev 15021) @@ -123,7 +123,7 @@ { if(CurrentMode != KernelMode || CaptureIfKernel ) { - RtlFreeUnicodeString(CapturedString); + ExFreePool(CapturedString->Buffer); } }
19 years, 4 months
1
0
0
0
[gvg] 15020: Sync to Wine-20050419:
by gvg@svn.reactos.com
Sync to Wine-20050419: Hans Leidekker <hans(a)it.vu.nl> - Stub implementation for SetupCopyOEMInfW. Peter Berg Larsen <pebl(a)math.ku.dk> - Janitorial: Get rid of strncpy/strncpyW. Jakob Eriksson <jakov(a)vmlinux.org> - Get rid of HeapAlloc casts. Juan Lang <juan_lang(a)yahoo.com> - Implement SetupDiClassNameFromGuidExA. Modified: trunk/reactos/include/wine/cfgmgr32.h Modified: trunk/reactos/lib/setupapi/devinst.c Modified: trunk/reactos/lib/setupapi/diskspace.c Modified: trunk/reactos/lib/setupapi/setupcab.c Modified: trunk/reactos/lib/setupapi/stubs.c _____ Modified: trunk/reactos/include/wine/cfgmgr32.h --- trunk/reactos/include/wine/cfgmgr32.h 2005-05-05 19:36:25 UTC (rev 15019) +++ trunk/reactos/include/wine/cfgmgr32.h 2005-05-05 20:14:39 UTC (rev 15020) @@ -36,14 +36,17 @@ typedef WCHAR *DEVINSTID_W; DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID) - #define CR_SUCCESS 0x00000000 #define CR_OUT_OF_MEMORY 0x00000002 #define CR_INVALID_DATA 0x0000001F #define CR_INVALID_MACHINENAME 0x0000002F #define CR_ACCESS_DENIED 0x00000033 +#define MAX_CLASS_NAME_LEN 32 +#define MAX_GUID_STRING_LEN 39 +#define MAX_PROFILE_LEN 80 + CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE ); CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE ); #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine) Property changes on: trunk/reactos/include/wine/cfgmgr32.h ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-05-05 19:36:25 UTC (rev 15019) +++ trunk/reactos/lib/setupapi/devinst.c 2005-05-05 20:14:39 UTC (rev 15020) @@ -34,6 +34,7 @@ #include "setupapi.h" #include "wine/debug.h" #include "wine/unicode.h" +#include "cfgmgr32.h" #include "initguid.h" #include "winioctl.h" #include "rpc.h" @@ -469,8 +470,24 @@ PCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return FALSE; + WCHAR ClassNameW[MAX_CLASS_NAME_LEN]; + LPWSTR MachineNameW = NULL; + BOOL ret; + + if (MachineName) + MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + ret = SetupDiClassNameFromGuidExW(ClassGuid, ClassNameW, MAX_CLASS_NAME_LEN, + NULL, MachineNameW, Reserved); + if (ret) + { + int len = WideCharToMultiByte(CP_ACP, 0, ClassNameW, -1, ClassName, + ClassNameSize, NULL, NULL); + + if (!ClassNameSize && RequiredSize) + *RequiredSize = len; + } + MyFree(MachineNameW); + return ret; } /*********************************************************************** @@ -859,8 +876,7 @@ size *= 2; if (devices != buf) HeapFree(GetProcessHeap(), 0, devices); - devices = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, - size * sizeof(WCHAR)); + devices = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); if (!devices) failed = TRUE; else @@ -892,7 +908,7 @@ { if (!strncmpW(comW, ptr, sizeof(comW) / sizeof(comW[0]) - 1)) { - strncpyW(list->names[list->numPorts].name, ptr, + lstrcpynW(list->names[list->numPorts].name, ptr, sizeof(list->names[list->numPorts].name) / sizeof(list->names[list->numPorts].name[0])); TRACE("Adding %s to list\n", _____ Modified: trunk/reactos/lib/setupapi/diskspace.c --- trunk/reactos/lib/setupapi/diskspace.c 2005-05-05 19:36:25 UTC (rev 15019) +++ trunk/reactos/lib/setupapi/diskspace.c 2005-05-05 20:14:39 UTC (rev 15020) @@ -58,7 +58,7 @@ if (rc == 0) return NULL; - list = (LPDISKSPACELIST)HeapAlloc(GetProcessHeap(),0,sizeof(DISKSPACELIST)); + list = HeapAlloc(GetProcessHeap(),0,sizeof(DISKSPACELIST)); list->dwDriveCount = 0; _____ Modified: trunk/reactos/lib/setupapi/setupcab.c --- trunk/reactos/lib/setupapi/setupcab.c 2005-05-05 19:36:25 UTC (rev 15019) +++ trunk/reactos/lib/setupapi/setupcab.c 2005-05-05 20:14:39 UTC (rev 15020) @@ -363,9 +363,7 @@ } else { if (mysterio[0]) { /* some easy paranoia. no such carefulness exists on the wide API IIRC */ - mysterio[SIZEOF_MYSTERIO - 1] = '\0'; - strncpy(pfdin->psz3, &(mysterio[0]), 255); - mysterio[255] = '\0'; + lstrcpynA(pfdin->psz3, &(mysterio[0]), SIZEOF_MYSTERIO); } return 0; } _____ Modified: trunk/reactos/lib/setupapi/stubs.c --- trunk/reactos/lib/setupapi/stubs.c 2005-05-05 19:36:25 UTC (rev 15019) +++ trunk/reactos/lib/setupapi/stubs.c 2005-05-05 20:14:39 UTC (rev 15020) @@ -99,7 +99,7 @@ DWORD destnamesize, PDWORD required, PSTR *destinfnamecomponent) { - FIXME("stub: source %s location %sá...\n",sourceinffile, sourcemedialoc); + FIXME("stub: source %s location %s ...\n",sourceinffile, sourcemedialoc); return FALSE; }
19 years, 4 months
1
0
0
0
[hpoussin] 15019: Forgot to commit this file with revision 15013
by hpoussin@svn.reactos.com
Forgot to commit this file with revision 15013 Modified: trunk/reactos/lib/ntdll/rtl/libsupp.c _____ Modified: trunk/reactos/lib/ntdll/rtl/libsupp.c --- trunk/reactos/lib/ntdll/rtl/libsupp.c 2005-05-05 19:17:25 UTC (rev 15018) +++ trunk/reactos/lib/ntdll/rtl/libsupp.c 2005-05-05 19:36:25 UTC (rev 15019) @@ -63,7 +63,17 @@ Mem); } +VOID +STDCALL +ExFreePoolWithTag(IN PVOID Mem, IN ULONG Tag) +{ + RtlFreeHeap ( + RtlGetProcessHeap (), + 0, + Mem); +} + #ifdef DBG VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line)
19 years, 4 months
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
...
82
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200