ChangeLog-0.3.10

This is the changelog for ReactOS™ version 0.3.10 (released 5th July, 2009), an open-source operating system designed to be binary executable – and device driver-compatible with Microsoft™ Windows NT™ and subsequent Microsoft operating systems such as Windows 2000™ and Windows XP™. ReactOS is written by the ReactOS development team, and the last previous version of ReactOS was version 0.3.9 (released 26th April, 2009).

Host Tools

BUILDNO

LOG2LINES

RBUILD

Moved linker and compiler rules in separate files Renamed compiler rules to more generic names New compiler rules for dependencies and preprocessor modes Rules for Microsoft C/C++ Compiler Linker rule file stubs. All elements now support "compilerset" and "linkerset" conditional attributes (KJK::Hyperion)

Almost all build rules moved to a makefile.auto include (rules.mak). Size of makefile.auto reduced to about half. The new rules correctly sort includes, defines and flags in priority order and don't duplicate flags anymore. (KJK::Hyperion)

Flag sets are defined once, as makefile variables, and then referred to by variable name Compiler-specific flags, includes and defines can now be set (KJK::Hyperion)

Drop "overridable" attribute for <define>, as it never worked right (KJK::Hyperion)

New <redefine> tag: works like <define>, but undefines the variable before defining it. (KJK::Hyperion)

Don't feed GCC options in MSC Minor detection fixes Support for the Microsoft compiler is now fully functional: now get off your grotesquely fat asses and start fixing code so that it compiles with it TODO: make it fully functional for real (PCH, full dependencies); Microsoft linker support (KJK::Hyperion)

RBUILD_HELPER

Build tool to invoke Microsoft tools, overriding the %PATH% variable and optionally filtering out the name of the file being compiled. Will be used by the Visual C++ support for rbuild (KJK::Hyperion)

RSYM

Core

Bootloader (FreeLoader)

Remove MachGetMemoryMap() and replace it by ArcGetMemoryDescriptor(). Rework memory initialization to use it. We are no longer limited anymore to 32 memory descriptors and having more than 4 GB of RAM does not lead to out of bounds accesses (Hervé Poussineau)

WINLDR: Pass boot options to the kernel when booting in setup mode (it was disabled for debugging reasons). (Aleksey Bragin)

WINLDR: Use SystemRoot path as it is because after recent changes by Herve there is no need to do additional operations with it. (Aleksey Bragin)

Fix CDROM device registration: do not hardcode it to 0xE0, but register whatever device FreeLdr starts and which is not reported by BIOS as a harddisk. Fixes setupldr2. (Aleksey Bragin)

Disable partition table exploration, as long as it displays an error message if disk is not partitioned (Hervé Poussineau)

Implement agnostic architecture for file system access, according to Advanced RISC Computing Specification Version 1.2 Some shortcuts still exist, and will need to be addressed later. Use this new API in the NTLDR-style loader (Hervé Poussineau)

Kernel and Executive (NTOSKRNL)

Implement a helper for updating IO transfer counters. Based on a patch by Dmitry Chapyshev. (Aleksey Bragin)

IopCreateObjectTypes: Add a DeleteProcedure for Device Objects. IopUnloadDevice: After calling the drivers Unload routine, make the DriverObject temporary and dereference it. IopUnloadDriver: Check that the driver is not already unloading before trying to call unload routine. If any failure, dereference the DriverObject before returning STATUS code. On an attempt to unload the driver, loop through each DeviceObject and set DOE_UNLOAD_PENDING in device extensions flags. Before calling the driver's unload routine set DRVO_UNLOAD_INVOKED in DriverObject's flags. Fixes Bugchecks when attempting to load driver a second time and when unloading a driver that has upper level device attached. (Michael Martin)

Disable debugging traces for dbgk/io/lpc/ob/ps by default, removing mostly unused debug code from frequently used routines and decreasing image size by about 32 KB. Also fix the way some macros are defined so we do not end up with double semicolons after the preprocessor. (Stefan Ginsberg)

Implement a special "debug pool" allocator which catches pool overruns. It evolved from an initial patch by Art Yerkes, and is fully independent from underlying pool implementation. It supports only non-paged pool and detects only overruns now. To enable, uncomment DEBUG_NPOOL define in mm/pool.c. (Aleksey Bragin)

FSTUB

IO

IopUnloadDriver: Only add the DOE_UNLOAD_PENDING to the Device's DeviceExtensions Flags and check for attached devices and reference counts if the DriverObject->DriverUnload is valid. Verified on XP. IopLoadUnloadDriver: Add a check to verify that ImagePath.Buffer is not null before freeing it. (Michael Martin)

IopCreateDriver: Change MajorFunction routines back to internal function IopInvalidDeviceRequest for ones that were set to NULL in the Drivers DriverEntry. Behavior verified on Windows. (Michael Martin)

Fix a potential crash in IoGetLowerDeviceObject if nothing is attached (Cameron Gutman)

Fix writing of BootConfig to the registry (previously, it wrote contents of DEVICE_NODE structure and caused nonpaged pool overread). Similar error a few lines below was fixed by Hervé in r15691. (Aleksey Bragin)

Fix driver object type DeleteProcedure so that it actually unloads the driver image. Make IopUnloadDriver work accordingly (it should not try to unload an image when its object has already been deleted). Drivers can now be unloaded in ReactOS, this probably fixes a number of hardware-related applications and applications using hardware protection. (Aleksey Bragin)

Make debug pool return 8-bytes aligned pointers. The padding area (up to 7 bytes) is not being checked for overruns now. ReactOS fully boots and works with this change and a debug pool. (Aleksey Bragin)

OB

Make ObReferenceObjectEx return the new ref count instead of old ref count. Fix same bug ObDereferenceObjectEx. (Aleksey Bragin)

Fix a typo in ObDereferenceObjectEx which resulted in ObpDeferObjectDeletion not being called when needed. Fixes missing object deletions in code using ObDereferenceObjectEx (e.g. executive timers in reactos kernel). (Aleksey Bragin)

Fix obvious bugs in the code (e.g. freeing a stack-allocated pointer). Rewrite the code to be more readable. Enlarge static buffer for SearchPathBuffer to be at least 5*MAX_PATH to prevent possible overflowing for now. In the meanwhile, Dmitry is rewriting this part of code to dynamically allocate the memory without the need for a temporary static storage. (Aleksey Bragin)

Kernel Mode Drivers

Audio Stack

Add a few sanity asserts to KsCreate. Pass a create item and use an object class when creating an object header Return zero mixer count when wdmaud fails to enumerate virtual device count. Should fix high CPU usage after installing audio drivers (Johannes Anderwald)

FASTFAT

Silence "argument unused" warnings. Corrected several accesses to potentially uninitialized variables. Visual C++ is no longer a guarantee of compilation with the DDK (Samuel Serapión)

I8042prt

i8042MouInternalDeviceControl: Implement IoControlCode of IOCTL_INTERNAL_I8042_HOOK_MOUSE. ForwardIrpAndWait: Don't use IoForwardIrpSynchronously to Forward IRPs as it fails if no next stack location is available, which can prevent mouse from initializing. Changed it to match implementation of our other input drivers. Mouse pointer now works with VBoxMouse driver loaded. (Michael Martin)

MINIPORT_CONFIGURATION_CONTEXT must be allocated from nonpaged pool as it contains a spinlock (Stefan Ginsberg)

Rewrite MiniQueryInformation so it creates a NDIS_REQUEST and passes it to MiniDoRequest for processing to reduce code duplication Call MiniportCoRequest in connection-oriented miniports Now our NDIS loads all the way to the ASSERT for unsupported media on XP (Cameron Gutman)

Fix our handler checks Now XP's intermediate miniport drivers can load on ROS's NDIS More work still needs to be done to get them working though (Cameron Gutman)

Register the adapter shutdown handler if it is specified in the miniport characteristics (Cameron Gutman)

The slot number passed directly to NdisImmediateReadPciSlotInformation/NdisImmediateWritePciSlotInformation is ignored according to MSDN so store a valid slot number in the wrapper context to use instead (Cameron Gutman)

Implement handing for IRP_MN_SET_POWER and IRP_MN_QUERY_POWER (not plugged in yet). Allocate a buffer and copy data into it instead of using the buffer passed to us directly. Use a helper function to perform common operations which save lots of lines of duplicated code (Cameron Gutman)

Allocate memory for the OOB area also Set the NdisPacketOobOffset in each packet Fixes the mysterious packet corruption Fixes Realtek 8139 and Intel PRO/1000 (Cameron Gutman)

Zero the whole packet in other packet allocation routines. Set ValidCount TRUE because we do not have any buffers chained yet. Set the fPACKET_ALLOCATED_BY_NDIS flag (fixes storing media-specific data) (Cameron Gutman)

Do not attempt to store packets and buffers in the same place (Cameron Gutman)

Once one second of audio data has been buffered, always queue audio irps and dont complete them imediately. Greatly improves the playback of SMPlayer and probably many other audio players which act strictly on the timing of completed irps (Johannes Anderwald)

Topology nodes can have a nullable name. Disable releasing resources when IPortFilterWaveCyclic is closed (Johannes Anderwald)

Use a reference name when registering audio subdevices. Release subdevice interface when it is no longer needed. Fix a memory leak. Audio support is on hold until #4566 is resolved (Johannes Anderwald, #4566)

SYSAUDIO

Check in wdmaud if a pin with the specified filter ID and pin ID has been opened. Partly rewrite SysAudio as it is no longer required to store client specific information per connection since wdmaud just opens one connection. Verify all audio handles at incoming IRP (Johannes Anderwald)

Fix a bug in KsTopologyPropertyHandler. Create a KSTOPOLOGY struct when creating the subdevice descriptor and pass the struct to KsTopologyPropertyHandler. Implement enumerating mixer devices. Change handle array to contain the target device type. Mixer handles are not real handles, they are just pseudo handles. Forward KSPROPSETID_Topology request to portcls (sysaudio) (Johannes Anderwald)

Also Store audio filter object header in FsContext member Create the pin on the correct filter by using the filters object class Remove filter object class before performing actual create request Remove object header from audio filter when closing Retrieve internal object class name with internal IOCTL_KS_OBJECT_CLASS Avoid using interface name as ReactOS doesn't support it Store object class name when creating the object header for the audio sub device Implement IPortFilterTopology interface Activate pin property handle for port topology driver There is no need to create a handle to sysaudio for each application opening wdmaud, use only one connection per driver basis Pass object create class to pin creation method by duplicating KsCreatePin Audio devices should now be accessible again (Johannes Anderwald)

TCPIP

Register the unload handler so it gets called by NDIS (Cameron Gutman)

UNIATA

Fix WaitOnBusy, WaitOnBaseBusy and Wait[Short]ForDrq to wait and loop exactly the same as our existing atapi driver. This greatly enhances uniata's compatibility, especially on modern highspeed hardware where a controller usually does not have enough time to change its state and was considered invalid. (Aleksey Bragin)

Static Libraries

CMLIB

Define UNREFERENCED_PARAMETER for cmlib when built as host. (Stefan Ginsberg)

IP

Restore the old loopback implementation Should fix the buildbot test hang (Cameron Gutman)

Set up the TCP interface data as needed in TCPFindInterface (Cameron Gutman)

Use FindOnLinkInterface to get the interface Return NULL if TCPContext is NULL (which means we don't have a valid IP address) Should fix a crash when using multiple NICs but they still won't work (DHCP bug?) (Cameron Gutman)

Migration changes from W32THREADINFO to use ThreadInfo for kernel space and user space pointer reference, and use ClientInfo from TEB for user space. Next change will have the full removal of W32THREADINFO. (James Tabor)

eventlog.h: Add CurrentRecord to EventSource struct as each EventLog handle must keep track of current record. LogfInitializeNew/LogfInitializeExisting: Set LogFile MaxSize to just under 5k and add a FIXME to read value from registry. TODO. LogfReadEvent: Change return value to DWORD so that errors can be passed back and last error can be set from caller(advapi32). Change RecordNumber parameter to pointer so that it can be returned and saved in rpc's handle for the EventLog. RecordNumber of 0 can only be used with flag EVENTLOG_SEQUENTIAL READ. Set BytesRead and BytesNeeded to 0 as caller expects those values for any failure. LogfWriteData: Implement record overwriting when the LogFile has reached MaxSize. Implement LogfGetCurrentRecord. (Michael Martin)

Implement internal function LogfDeleteOffsetInformation. LogfWriteData: Fix record overwriting when the log file has reached MaxSize. Previous implementation was incorrect. LogfInitializeExisting: Add support for log files that have had old records overwritten with new records. (Michael Martin)

ElfrReportEventW: Silence debugging thats no longer needed as this API is now implemented. (Michael Martin)

DHCP

tftpd

Imported the MT snapshot of the GPL tftp-server for win32 from sourceforge. Minor changes such as formatting and renaming the files, totally untested except for building, will be used later to serve up ReactOS images to PXE boot (Steven Edwards)

Downloader

Explorer

Split the PIDL into current and parent folder, and call GetFolderAttributes only for current folder PIDL. This fixes tons of "ERR: HCR_GetFolderAttributes should be called for simple PIDL's only!" debug log spam messages. (Mikhail Denisenko, #4494)

Servman

Rewrite, the last method of getting service dependants and dependent services was flawed/buggy. (Ged Murphy)

Add most of the code for the dependencies tab in the property sheet. It's not quite complete but I'm getting bored with it now. May finish it tomorrow. (Ged Murphy)

Add a temporary manifest to servman which contains support for comctl32 v6 and more importantly, support for UAC elevation in NT6+ This will be required for any app which needs to run with elevated privs. As we've previously stated, rbuild needs to generate the manifest hence this is only temporary. We therefore need a UAC tag adding to rbuild so the generated manifest can contain support for UAC elevation for any apps which require it. If anyone wishes to add this support to rbuild, feel free to do so. (Ged Murphy)

Add the list of dependencies to the listbox so we know what else will be stopping Restructure the stop code (Ged Murphy)

Rewrite start and stop routines to make them much more robust Add the ability to check for and stop dependent services Untested at the moment, but unfinished anyway. (Ged Murphy)

ADVAPI32

Add a lazy-initializing hack until user32 is able to delay-load the advapi32 as it should. It fixes a problem of trying to enter a non-initialized critical section object and possibly hanging on every boot. (Aleksey Bragin)

eventlog.c: When manually creating RPC_UNICODE_STRING/RPC_STRING the Length member does not include the terminating null, but MaximumLength is Length + terminating NULL. Fixes returning handle for Security and System event logs. (Michael Martin)

Sync GetNamedSecurityInfoA with Wine. RtlCreateUnicodeStringFromAsciiz is unwanted since the call to GetNamedSecurityInfoW checks for NULL and in this case sets ERROR_INVALID_PARAMETER. (Sylvain Petreolle)

ElfrOpenBELW/ElfrOpenELW/ElfrRegisterEventSourceW: MajorVersion and MinorVersion must be 1 as documented on MSDN. ReportEventW: Use RtlInitUnicodeString for ComputerName. (Michael Martin)

ReadEventLogA/ReadEventLogW: Check for lpBuffer for NULL and if so set nNumberOfBytesToRead to zero so that rpcrt4 does not access a NULL buffer. Set pnBytesRead and pnMinNumberOfBytesNeeded variables prior to checking for failure and returning FALSE. (Michael Martin)

Fix 2 kernel32:environ tests. The GetComputerNameEx ComputerNameDnsDomain tests can't succeed if we have no domain, as the function succeeds querying a zero length domain into a zero length buffer. (Sylvain Petreolle)

VERSION

WINTRUST

WS2_32_NEW

Add the ws2_32 library from Alex's old network branch which is a _huge_ improvement over our current, incorrect lib. I've made various changes and tweaks to get it building with gcc, however it doesn't yet build with out build environment as out headers are severely lacking. It's also reliant on other winsock libs which will come in future commits along with the header rewrite. (Ged Murphy)

Regression tests

Add a "regtest.cmd" for running other commands (here "ipconfig") before starting rosautotest and call "start rosautotest" to run it asynchronously and let Explorer load completely Set svn:eol-style for "unattend.inf" to CRLF, this file is a target one, which should also use target line-endings Fix typo in syssetup debug print (Colin Finck)