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
December
November
October
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
July 2008
----- 2024 -----
December 2024
November 2024
October 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
25 participants
761 discussions
Start a n
N
ew thread
[ros-arm-bringup] 34449: - Implement RamdiskAddDevice. - Fix uninitialized pointer in DriverEntry. - Add hack for ReactOS plug and play manager bug. - Fix broken assert. - Now in RamdiskPnp.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 23:23:59 2008 New Revision: 34449 URL:
http://svn.reactos.org/svn/reactos?rev=34449&view=rev
Log: - Implement RamdiskAddDevice. - Fix uninitialized pointer in DriverEntry. - Add hack for ReactOS plug and play manager bug. - Fix broken assert. - Now in RamdiskPnp. Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Sat Jul 12 23:23:59 2008 @@ -8,6 +8,7 @@ /* INCLUDES *******************************************************************/ +#include <initguid.h> #include <ntddk.h> #include <ntdddisk.h> #include <scsi.h> @@ -16,11 +17,38 @@ #include <mountmgr.h> #include <helper.h> #include <ketypes.h> +#include <iotypes.h> +#include <rtlfuncs.h> #include <arc/arc.h> +#include <reactos/drivers/ntddrdsk.h> #define NDEBUG #include <debug.h> /* GLOBALS ********************************************************************/ + +typedef enum _RAMDISK_DEVICE_TYPE +{ + RamdiskFdo, + RamdiskPdo +} RAMDISK_DEVICE_TYPE; + +DEFINE_GUID(RamdiskBusInterface, + 0x5DC52DF0, + 0x2F8A, + 0x410F, + 0x80, 0xE4, 0x05, 0xF8, 0x10, 0xE7, 0xA8, 0x8A); + +typedef struct _RAMDISK_EXTENSION +{ + RAMDISK_DEVICE_TYPE Type; + PDEVICE_OBJECT DeviceObject; + PDEVICE_OBJECT PhysicalDeviceObject; + PDEVICE_OBJECT AttachedDevice; + IO_REMOVE_LOCK RemoveLock; + UNICODE_STRING SymbolicLinkName; + FAST_MUTEX DiskListLock; + LIST_ENTRY DiskListHead; +} RAMDISK_EXTENSION, *PRAMDISK_EXTENSION; ULONG MaximumViewLength; ULONG MaximumPerDiskViewLength; @@ -34,6 +62,7 @@ UNICODE_STRING DriverRegistryPath; BOOLEAN ExportBootDiskAsCd; BOOLEAN IsWinPEBoot; +PDEVICE_OBJECT RamdiskBusFdo; /* FUNCTIONS ******************************************************************/ @@ -284,9 +313,114 @@ RamdiskAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_SUCCESS; + PRAMDISK_EXTENSION DeviceExtension; + PDEVICE_OBJECT AttachedDevice; + NTSTATUS Status; + UNICODE_STRING DeviceName; + PDEVICE_OBJECT DeviceObject; + + // + // Only create the FDO once + // + if (RamdiskBusFdo) return STATUS_DEVICE_ALREADY_ATTACHED; + + // + // Create the FDO + // + RtlInitUnicodeString(&DeviceName, L"\\Device\\Ramdisk"); + Status = IoCreateDevice(DriverObject, + sizeof(RAMDISK_EXTENSION), + &DeviceName, + FILE_DEVICE_BUS_EXTENDER, + FILE_DEVICE_SECURE_OPEN, + 0, + &DeviceObject); + if (NT_SUCCESS(Status)) + { + // + // Initialize the FDO extension + // + DeviceExtension = (PRAMDISK_EXTENSION)DeviceObject->DeviceExtension; + RtlZeroMemory(DeviceObject->DeviceExtension, sizeof(RAMDISK_EXTENSION)); + + // + // Set FDO flags + // + DeviceObject->Flags |= DO_POWER_PAGABLE | DO_DIRECT_IO; + + // + // Setup the FDO extension + // + DeviceExtension->Type = RamdiskFdo; + ExInitializeFastMutex(&DeviceExtension->DiskListLock); + IoInitializeRemoveLock(&DeviceExtension->RemoveLock, + TAG('R', 'a', 'm', 'd'), + 0, + 1); + InitializeListHead(&DeviceExtension->DiskListHead); + DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject; + DeviceExtension->DeviceObject = DeviceObject; + + // + // Register the RAM disk device interface + // + Status = IoRegisterDeviceInterface(PhysicalDeviceObject, + &RamdiskBusInterface, + NULL, + &DeviceExtension->SymbolicLinkName); + if (!NT_SUCCESS(Status)) + { + // + // Fail + // + IoDeleteDevice(DeviceObject); + return Status; + } + + // + // Attach us to the device stack + // + AttachedDevice = IoAttachDeviceToDeviceStack(DeviceObject, + PhysicalDeviceObject); + DeviceExtension->AttachedDevice = AttachedDevice; + if (!AttachedDevice) + { + // + // Fail + // + IoSetDeviceInterfaceState(&DeviceExtension->SymbolicLinkName, 0); + RtlFreeUnicodeString(&DeviceExtension->SymbolicLinkName); + IoDeleteDevice(DeviceObject); + return STATUS_NO_SUCH_DEVICE; + } + + // + // FDO is initialized + // + RamdiskBusFdo = DeviceObject; + + // + // Loop for loader block + // + if (KeLoaderBlock) + { + // + // Are we being booted from setup? Not yet supported + // + ASSERT (!KeLoaderBlock->SetupLdrBlock); + } + + // + // All done + // + DeviceObject->Flags &= DO_DEVICE_INITIALIZING; + Status = STATUS_SUCCESS; + } + + // + // Return status + // + return Status; } NTSTATUS @@ -295,7 +429,7 @@ IN PUNICODE_STRING RegistryPath) { PCHAR BootDeviceName, CommandLine; - PDEVICE_OBJECT PhysicalDeviceObject; + PDEVICE_OBJECT PhysicalDeviceObject = NULL; NTSTATUS Status; // @@ -388,7 +522,7 @@ // // Installing from Ramdisk isn't supported yet // - ASSERT(KeLoaderBlock->SetupLdrBlock); + ASSERT(!KeLoaderBlock->SetupLdrBlock); // // Are we reporting the device @@ -409,6 +543,15 @@ if (NT_SUCCESS(Status)) { // + // ReactOS Fix + // The ReactOS Plug and Play Manager is broken and does not create + // the required keys when reporting a detected device. + // We hack around this ourselves. + // + RtlCreateUnicodeString(&((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension)->DeviceNode->InstancePath, + L"Root\\UNKNOWN\\0000"); + + // // Create the device object // Status = RamdiskAddDevice(DriverObject, PhysicalDeviceObject);
16 years, 5 months
1
0
0
0
[ros-arm-bringup] 34448: - Remove debug code.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 23:22:54 2008 New Revision: 34448 URL:
http://svn.reactos.org/svn/reactos?rev=34448&view=rev
Log: - Remove debug code. Modified: trunk/reactos/drivers/base/bootvid/arm/bootvid.c Modified: trunk/reactos/drivers/base/bootvid/arm/bootvid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/arm/b…
============================================================================== --- trunk/reactos/drivers/base/bootvid/arm/bootvid.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/bootvid/arm/bootvid.c [iso-8859-1] Sat Jul 12 23:22:54 2008 @@ -51,7 +51,7 @@ {0x00, 0x08, 0x08}, // Cyan {0x08, 0x00, 0x00}, // Red {0x08, 0x00, 0x08}, // Magenta - {0x08, 0x08, 0x00}, // Brown + {0x0B, 0x0D, 0x0F}, // Brown {0x10, 0x10, 0x10}, // Light Gray {0x08, 0x08, 0x08}, // Dark Gray {0x00, 0x00, 0x1F}, // Light Blue @@ -269,23 +269,6 @@ LCDCONTROL_LCDTFT | LCDCONTROL_LCDPWR | LCDCONTROL_LCDBPP(4)); - -#if DBG - // - // Draw an RGB test pattern - // - int y, x; - for (y = 0; y < 480; y += 40) - { - for (x = 0; x < 640; x++) - { - VidpSetPixel(x, y, 12); - VidpSetPixel(x, y + 10, 9); - VidpSetPixel(x, y + 20, 10); - VidpSetPixel(x, y + 30, 15); - } - } -#endif } /* PUBLIC FUNCTIONS **********************************************************/
16 years, 5 months
1
0
0
0
[ros-arm-bringup] 34447: - Add ramdisk class.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 23:22:42 2008 New Revision: 34447 URL:
http://svn.reactos.org/svn/reactos?rev=34447&view=rev
Log: - Add ramdisk class. Modified: trunk/reactos/boot/bootdata/hivesys_arm.inf Modified: trunk/reactos/boot/bootdata/hivesys_arm.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_arm.…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys_arm.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys_arm.inf [iso-8859-1] Sat Jul 12 23:22:42 2008 @@ -24,6 +24,10 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1" + +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}",,0x00000000,"Ramdisk" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Class",0x00000000,"Ramdisk" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Icon",0x00000000,"-5" ; Default computer name settings HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName",,0x00000012
16 years, 5 months
1
0
0
0
[ros-arm-bringup] 34446: - To whom it may concern: thanks for completly fucking up mkhive support with your "fix". It broken make install and livecd on i386 AND ARM. - Made the necessary changes to make it work properly by fixing mkhive and rbuild.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 21:32:24 2008 New Revision: 34446 URL:
http://svn.reactos.org/svn/reactos?rev=34446&view=rev
Log: - To whom it may concern: thanks for completly fucking up mkhive support with your "fix". It broken make install and livecd on i386 AND ARM. - Made the necessary changes to make it work properly by fixing mkhive and rbuild. Modified: trunk/reactos/tools/mkhive/mkhive.c trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp Modified: trunk/reactos/tools/mkhive/mkhive.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.c?rev=…
============================================================================== --- trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] Sat Jul 12 21:32:24 2008 @@ -88,9 +88,9 @@ char FileName[PATH_MAX]; int Param; - printf ("Binary hive maker\n"); + printf ("Binary hive maker: %s\n", argv[3]); - if (argc < 3) + if (argc < 4) { usage (); return 1; @@ -100,25 +100,33 @@ convert_path (FileName, argv[1]); strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivesys.inf"); + strcat (FileName, "hivesys_"); + strcat (FileName, argv[3]); + strcat (FileName, ".inf"); ImportRegistryFile (FileName); convert_path (FileName, argv[1]); strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivecls.inf"); + strcat (FileName, "hivecls_"); + strcat (FileName, argv[3]); + strcat (FileName, ".inf"); ImportRegistryFile (FileName); convert_path (FileName, argv[1]); strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivesft.inf"); + strcat (FileName, "hivesft_"); + strcat (FileName, argv[3]); + strcat (FileName, ".inf"); ImportRegistryFile (FileName); convert_path (FileName, argv[1]); strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "hivedef.inf"); + strcat (FileName, "hivedef_"); + strcat (FileName, argv[3]); + strcat (FileName, ".inf"); ImportRegistryFile (FileName); - for (Param = 3; Param < argc; Param++) + for (Param = 4; Param < argc; Param++) { convert_path (FileName, argv[Param]); ImportRegistryFile (FileName); Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Sat Jul 12 21:32:24 2008 @@ -1200,11 +1200,11 @@ string MingwBackend::GetRegistrySourceFiles () { - return "boot" + sSep + "bootdata" + sSep + Environment::GetArch() + sSep + "hivecls.inf " - "boot" + sSep + "bootdata" + sSep + Environment::GetArch() + sSep + "hivedef.inf " - "boot" + sSep + "bootdata" + sSep + Environment::GetArch() + sSep + "hiveinst.inf " - "boot" + sSep + "bootdata" + sSep + Environment::GetArch() + sSep + "hivesft.inf " - "boot" + sSep + "bootdata" + sSep + Environment::GetArch() + sSep + "hivesys.inf"; + return "boot" + sSep + "bootdata" + sSep + "hivecls_" + Environment::GetArch() + ".inf " + "boot" + sSep + "bootdata" + sSep + "hivedef_" + Environment::GetArch() + ".inf " + "boot" + sSep + "bootdata" + sSep + "hiveinst_" + Environment::GetArch() + ".inf " + "boot" + sSep + "bootdata" + sSep + "hivesft_" + Environment::GetArch() + ".inf " + "boot" + sSep + "bootdata" + sSep + "hivesys_" + Environment::GetArch() + ".inf "; } string @@ -1241,9 +1241,9 @@ fprintf ( fMakefile, "\t$(ECHO_MKHIVE)\n" ); fprintf ( fMakefile, - "\t$(MKHIVE_TARGET) boot%cbootdata%c$(ROS_ARCH) %s boot%cbootdata%c$(ROS_ARCH)%chiveinst.inf\n", - cSep, cSep, GetFullPath ( system32 ).c_str (), - cSep, cSep, cSep ); + "\t$(MKHIVE_TARGET) boot%cbootdata %s $(ROS_ARCH) boot%cbootdata%chiveinst_$(ROS_ARCH).inf\n", + cSep, GetFullPath ( system32 ).c_str (), + cSep, cSep ); fprintf ( fMakefile, "\n" ); }
16 years, 5 months
1
0
0
0
[ros-arm-bringup] 34445: - Only print out debug data for aborts if we can't handle them. Makes the debug log easier to read.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 20:58:23 2008 New Revision: 34445 URL:
http://svn.reactos.org/svn/reactos?rev=34445&view=rev
Log: - Only print out debug data for aborts if we can't handle them. Makes the debug log easier to read. Modified: trunk/reactos/ntoskrnl/ke/arm/trapc.c Modified: trunk/reactos/ntoskrnl/ke/arm/trapc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/trapc.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] Sat Jul 12 20:58:23 2008 @@ -437,9 +437,7 @@ NTSTATUS Status; PVOID Address = (PVOID)KeArmFaultAddressRegisterGet(); ASSERT(TrapFrame->DbgArgMark == 0xBADB0D00); - DPRINT1("[ABORT] (%x) @ %p/%p/%p\n", - KeArmFaultStatusRegisterGet(), Address, TrapFrame->SvcLr, TrapFrame->Pc); - + // // Check if this is a page fault // @@ -451,7 +449,9 @@ TrapFrame); if (Status == STATUS_SUCCESS) return Status; } - + + DPRINT1("[ABORT] (%x) @ %p/%p/%p\n", + KeArmFaultStatusRegisterGet(), Address, TrapFrame->SvcLr, TrapFrame->Pc); UNIMPLEMENTED; ASSERT(FALSE); return STATUS_SUCCESS;
16 years, 5 months
1
0
0
0
[ros-arm-bringup] 34444: - Do NOT prepend _ to ARM entrypoints. - Because of some ridiculously stupid design in LD, it seems if it cannot find a given entrypoint, it SILENTLY ASSUMES you meant "Hi LD, please use my base address as my entrypoint". - As such, all our drivers were linked with the start address as the base address... for the RAMDisk driver, this ended up being RamdiskAddDevice. - When we started implementing RamdiskAddDevice, noticed that DriverEntry wasn't actually getting called.
by ros-arm-bringup@svn.reactos.org
Author: ros-arm-bringup Date: Sat Jul 12 20:56:20 2008 New Revision: 34444 URL:
http://svn.reactos.org/svn/reactos?rev=34444&view=rev
Log: - Do NOT prepend _ to ARM entrypoints. - Because of some ridiculously stupid design in LD, it seems if it cannot find a given entrypoint, it SILENTLY ASSUMES you meant "Hi LD, please use my base address as my entrypoint". - As such, all our drivers were linked with the start address as the base address... for the RAMDisk driver, this ended up being RamdiskAddDevice. - When we started implementing RamdiskAddDevice, noticed that DriverEntry wasn't actually getting called. Adding debug prints changed which function was called. - Wasted a week, thanks LD. Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Sat Jul 12 20:56:20 2008 @@ -2641,7 +2641,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -2690,7 +2690,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -2738,7 +2738,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -2786,7 +2786,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -2911,7 +2911,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -2953,7 +2953,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -3002,7 +3002,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -3051,7 +3051,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=windows -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, @@ -3673,7 +3673,7 @@ string dependencies = linkDepsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", - module.GetEntryPoint(true).c_str (), + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters,
16 years, 5 months
1
0
0
0
[jimtabor] 34443: The rest of rev 34442.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jul 12 19:24:05 2008 New Revision: 34443 URL:
http://svn.reactos.org/svn/reactos?rev=34443&view=rev
Log: The rest of rev 34442. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Sat Jul 12 19:24:05 2008 @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Window classes @@ -1855,7 +1854,7 @@ pi); if (Class != NULL) { - Class->ClassId = SystemClasses[i].ClassId; + Class->fnID = SystemClasses[i].ClassId; ASSERT(Class->System); Class->Next = pi->SystemClassList; @@ -1985,6 +1984,111 @@ return Ret; } + +RTL_ATOM +NTAPI +NtUserRegisterClassExWOW( + WNDCLASSEXW* lpwcx, + PUNICODE_STRING ClassName, + PUNICODE_STRING ClsNVersion, + PCLSMENUNAME pClassMenuName, + DWORD fnID, + DWORD Flags, + LPDWORD pWow) +{ + WNDCLASSEXW CapturedClassInfo = {0}; + UNICODE_STRING CapturedName = {0}, ClassnametoVersion = {0}; + RTL_ATOM Ret = (RTL_ATOM)0; + + UserEnterExclusive(); + + _SEH_TRY + { + /* Probe the parameters and basic parameter checks */ + if (ProbeForReadUint(&lpwcx->cbSize) != sizeof(WNDCLASSEXW)) + { + goto InvalidParameter; + } + if (!pClassMenuName) + { + goto InvalidParameter; + } + + ProbeForRead(lpwcx, + sizeof(WNDCLASSEXW), + sizeof(ULONG)); + RtlCopyMemory(&CapturedClassInfo, + lpwcx, + sizeof(WNDCLASSEXW)); + /* + Need to watch this. When UnregisterClass is called these pointers + are freed by the caller in user space. So, we just probe the data + for now and pass it on and copy it to the shared class structure. + */ + ProbeForRead(pClassMenuName, + sizeof(CLSMENUNAME), + sizeof(ULONG)); + + CapturedName = ProbeForReadUnicodeString(ClassName); + ClassnametoVersion = ProbeForReadUnicodeString(ClsNVersion); + + if (CapturedName.Length & 1 || ClassnametoVersion.Length & 1 || + CapturedClassInfo.cbClsExtra < 0 || + CapturedClassInfo.cbClsExtra + CapturedName.Length + + ClassnametoVersion.Length + sizeof(WINDOWCLASS) < CapturedClassInfo.cbClsExtra || + CapturedClassInfo.cbWndExtra < 0 || + CapturedClassInfo.hInstance == NULL) + { + goto InvalidParameter; + } + + if (CapturedName.Length != 0) + { + ProbeForRead(CapturedName.Buffer, + CapturedName.Length, + sizeof(WCHAR)); + } + else + { + if (!IS_ATOM(CapturedName.Buffer)) + { + goto InvalidParameter; + } + } + + if (ClassnametoVersion.Length != 0) + { + ProbeForRead(ClassnametoVersion.Buffer, + ClassnametoVersion.Length, + sizeof(WCHAR)); + } + else if (ClassnametoVersion.Buffer != NULL && + !IS_INTRESOURCE(ClassnametoVersion.Buffer)) + { +InvalidParameter: + SetLastWin32Error(ERROR_INVALID_PARAMETER); + _SEH_LEAVE; + } + + /* Register the class */ +// Ret = UserRegisterClass(&CapturedClassInfo, +// &CapturedName, +// &ClassnametoVersion, +// hMenu, /* FIXME - pass pointer */ +// wpExtra, +// Flags); + + } + _SEH_HANDLE + { + SetLastNtError(_SEH_GetExceptionCode()); + } + _SEH_END; + + UserLeave(); + + return Ret; +} ULONG_PTR NTAPI @@ -2116,7 +2220,7 @@ BOOL NTAPI NtUserUnregisterClass(IN PUNICODE_STRING ClassNameOrAtom, IN HINSTANCE hInstance, - DWORD Unknown) + OUT PCLSMENUNAME pClassMenuName) { UNICODE_STRING CapturedClassName; BOOL Ret = FALSE; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Sat Jul 12 19:24:05 2008 @@ -1052,20 +1052,6 @@ END_CLEANUP; } -LRESULT STDCALL -NtUserMessageCall( - HWND hWnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam, - ULONG_PTR ResultInfo, - DWORD dwType, - BOOL Ansi) -{ - UNIMPLEMENTED - - return 0; -} static NTSTATUS FASTCALL CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEntry) @@ -1844,6 +1830,82 @@ return TRUE; } return FALSE; +} + +/* + Win32k counterpart of User DefWindowProc + */ +LRESULT FASTCALL +IntDefWindowProc( + PWINDOW_OBJECT Window, + UINT Msg, + WPARAM wParam, + LPARAM lParam) +{ + PWINDOW Wnd; + + if (Msg > WM_USER) return 0; + + Wnd = Window->Wnd; + if (!Wnd) return 0; + + switch (Msg) + { + case WM_SHOWWINDOW: + { + if ((Wnd->Style & WS_VISIBLE) && wParam) break; + if (!(Wnd->Style & WS_VISIBLE) && !wParam) break; + if (!Window->hOwner) break; + if (LOWORD(lParam)) + { + if (wParam) + { + if (!(Window->Flags & WIN_NEEDS_SHOW_OWNEDPOPUP)) break; + Window->Flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP; + } + else + Window->Flags |= WIN_NEEDS_SHOW_OWNEDPOPUP; + + co_WinPosShowWindow(Window, wParam ? SW_SHOWNOACTIVATE : SW_HIDE); + } + } + break; + } + + return 0; +} + + +LRESULT STDCALL +NtUserMessageCall( + HWND hWnd, + UINT Msg, + WPARAM wParam, + LPARAM lParam, + ULONG_PTR ResultInfo, + DWORD dwType, // fnID? + BOOL Ansi) +{ + LRESULT lResult = 0; + PWINDOW_OBJECT Window = NULL; + + UserEnterExclusive(); + + /* Validate input */ + if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd))) + { + return 0; + } + + switch(dwType) + { + case NUMC_DEFWINDOWPROC: + lResult = IntDefWindowProc(Window, Msg, wParam, lParam); + break; + } + + UserLeave(); + return lResult; } #define INFINITE 0xFFFFFFFF Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Sat Jul 12 19:24:05 2008 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Native User stubs @@ -909,22 +908,6 @@ return 0; } -/*
http://www.reactos.org/pipermail/ros-kernel/2003-November/000589.html
*/ -HWINSTA -NTAPI -NtUserRegisterClassExWOW( - CONST WNDCLASSEXW* lpwcx, - BOOL bUnicodeClass, - WNDPROC wpExtra, - DWORD dwUnknown4, - DWORD dwUnknown5, - DWORD dwUnknown6, - DWORD dwUnknown7) -{ - UNIMPLEMENTED; - return 0; -} - DWORD NTAPI NtUserRegisterUserApiHook( Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Sat Jul 12 19:24:05 2008 @@ -510,31 +510,6 @@ RETURN( (DWORD)IntShowOwnedPopups(Window, (BOOL) Param2)); } - - case TWOPARAM_ROUTINE_ROS_SHOWWINDOW: - { -#define WIN_NEEDS_SHOW_OWNEDPOPUP (0x00000040) - DPRINT1("ROS_SHOWWINDOW\n"); - - if (!(Window = UserGetWindowObject((HWND)Param1))) - { - RETURN( 1 ); - } - - if (Param2) - { - if (!(Window->Flags & WIN_NEEDS_SHOW_OWNEDPOPUP)) - { - RETURN( -1 ); - } - Window->Flags &= ~WIN_NEEDS_SHOW_OWNEDPOPUP; - } - else - Window->Flags |= WIN_NEEDS_SHOW_OWNEDPOPUP; - - DPRINT1("ROS_SHOWWINDOW ---> 0x%x\n",Window->Flags); - RETURN( 0 ); - } case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE: { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sat Jul 12 19:24:05 2008 @@ -4701,7 +4701,6 @@ END_CLEANUP; } -#define WIN_NEEDS_SHOW_OWNEDPOPUP (0x00000040) BOOL FASTCALL @@ -4711,9 +4710,9 @@ PWINDOW_OBJECT pWnd; HWND *win_array; - ASSERT(OwnerWnd); - - win_array = IntWinListChildren(OwnerWnd);//faxme: use desktop? +// ASSERT(OwnerWnd); + + win_array = IntWinListChildren(UserGetWindowObject(IntGetDesktopWindow())); if (!win_array) return TRUE;
16 years, 5 months
1
0
0
0
[jimtabor] 34442: - Started NtUserRegisterClassExWOW and now using the fnIDs. Nothing is used but the IDs. I tested with these changes for over 60 days. - Implemented NtUserMessageCall, moved our first victim over to use it. This is for bug 2451.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jul 12 19:21:51 2008 New Revision: 34442 URL:
http://svn.reactos.org/svn/reactos?rev=34442&view=rev
Log: - Started NtUserRegisterClassExWOW and now using the fnIDs. Nothing is used but the IDs. I tested with these changes for over 60 days. - Implemented NtUserMessageCall, moved our first victim over to use it. This is for bug 2451. Modified: trunk/reactos/dll/win32/user32/controls/regcontrol.c trunk/reactos/dll/win32/user32/windows/class.c trunk/reactos/dll/win32/user32/windows/defwnd.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/include/winpos.h trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/dll/win32/user32/controls/regcontrol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
============================================================================== --- trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/regcontrol.c [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -19,21 +19,21 @@ UINT ClsId; } g_SysClasses[] = { - { &DIALOG_builtin_class, CLASS_DIALOG }, - { &POPUPMENU_builtin_class, CLASS_POPUPMENU }, - { &COMBO_builtin_class, CLASS_COMBO }, - { &COMBOLBOX_builtin_class, CLASS_COMBOLBOX }, - { &DESKTOP_builtin_class, CLASS_DESKTOP }, - { &MDICLIENT_builtin_class, CLASS_MDICLIENT }, + { &DIALOG_builtin_class, FNID_DIALOG }, + { &POPUPMENU_builtin_class, FNID_MENU }, + { &COMBO_builtin_class, FNID_COMBOBOX }, + { &COMBOLBOX_builtin_class, FNID_COMBOLBOX }, + { &DESKTOP_builtin_class, FNID_DESKTOP }, + { &MDICLIENT_builtin_class, FNID_MDICLIENT }, #if 0 - { &MENU_builtin_class, CLASS_MENU }, + { &MENU_builtin_class, FNID_MENU }, #endif - { &SCROLL_builtin_class, CLASS_SCROLL }, - { &BUTTON_builtin_class, CLASS_BUTTON }, - { &LISTBOX_builtin_class, CLASS_LISTBOX }, - { &EDIT_builtin_class, CLASS_EDIT }, - { &ICONTITLE_builtin_class, CLASS_ICONTITLE }, - { &STATIC_builtin_class, CLASS_STATIC }, + { &SCROLL_builtin_class, FNID_SCROLLBAR }, + { &BUTTON_builtin_class, FNID_BUTTON }, + { &LISTBOX_builtin_class, FNID_LISTBOX }, + { &EDIT_builtin_class, FNID_EDIT }, + { &ICONTITLE_builtin_class, FNID_ICONTITLE }, + { &STATIC_builtin_class, FNID_STATIC }, }; BOOL WINAPI RegisterSystemControls(VOID) Modified: trunk/reactos/dll/win32/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * COPYRIGHT: GPL - See COPYING in the top level directory * FILE: dll/win32/user32/windows/class.c @@ -816,6 +815,17 @@ return SmallIcon; } + +ATOM STDCALL +RegisterClassExWOWW(WNDCLASSEXW *lpwcx, + LPDWORD pdwWowData, + WORD fnID, + DWORD dwFlags) +{ + RTL_ATOM Atom = 0; + return (ATOM)Atom; +} + /* * @implemented */ Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -1410,21 +1410,7 @@ case WM_SHOWWINDOW: { - LONG Style; - INT Ret = 0; - - if (!lParam) return 0; - Style = GetWindowLongW(hWnd, GWL_STYLE); - if ((Style & WS_VISIBLE) && wParam) return 0; - if (!(Style & WS_VISIBLE) && !wParam) return 0; - if (!GetWindow(hWnd, GW_OWNER)) return 0; - Ret = NtUserCallTwoParam((DWORD) hWnd, (DWORD) wParam, TWOPARAM_ROUTINE_ROS_SHOWWINDOW); - if(Ret) - { - if( Ret == -1) return 0; - return Ret; - } - ShowWindow(hWnd, wParam ? SW_SHOWNOACTIVATE : SW_HIDE); + NtUserMessageCall( hWnd, Msg, wParam, lParam, 0, NUMC_DEFWINDOWPROC, FALSE); break; } Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -22,6 +22,13 @@ UINT ClassId; } REGISTER_SYSCLASS, *PREGISTER_SYSCLASS; +typedef struct _CLSMENUNAME +{ + LPSTR pszClientAnsiMenuName; + LPWSTR pwszClientUnicodeMenuName; + PUNICODE_STRING pusMenuName; +} CLSMENUNAME, *PCLSMENUNAME; + typedef struct _USER_OBJHDR { /* This is the common header for all user handle objects */ @@ -78,7 +85,7 @@ INT ClsExtra; INT WndExtra; PVOID Dce; - DWORD fnID; + DWORD fnID; // New ClassId HINSTANCE hInstance; HANDLE hIcon; /* FIXME - Use pointer! */ HANDLE hIconSm; /* FIXME - Use pointer! */ @@ -93,23 +100,7 @@ UINT System : 1; UINT Global : 1; UINT MenuNameIsString : 1; - -#define CLASS_DEFAULT 0x0 -#define CLASS_DESKTOP 0x1 -#define CLASS_DIALOG 0x2 -#define CLASS_POPUPMENU 0x3 -#define CLASS_COMBO 0x4 -#define CLASS_COMBOLBOX 0x5 -#define CLASS_MDICLIENT 0x6 -#define CLASS_MENU 0x7 -#define CLASS_SCROLL 0x8 -#define CLASS_BUTTON 0x9 -#define CLASS_LISTBOX 0xA -#define CLASS_EDIT 0xB -#define CLASS_ICONTITLE 0xC -#define CLASS_STATIC 0xD - UINT ClassId : 4; - + UINT NotUsed : 27; } WINDOWCLASS, *PWINDOWCLASS; typedef struct _WINDOW @@ -1734,7 +1725,8 @@ UINT transType, DWORD keyboardId, HKL dwhkl ); - +// Look like fnID's +#define NUMC_DEFWINDOWPROC 0x029E #define NUMC_SENDMESSAGE 0x02B0 // Kernel has option to use TO or normal msg send, based on type of msg. #define NUMC_SENDMESSAGEWTOOPTION 0x02B1 @@ -1963,16 +1955,16 @@ UINT flags ); -HWINSTA +RTL_ATOM NTAPI NtUserRegisterClassExWOW( - CONST WNDCLASSEXW* lpwcx, - BOOL bUnicodeClass, - WNDPROC wpExtra, - DWORD dwUnknown4, + WNDCLASSEXW* lpwcx, + PUNICODE_STRING pustrClassName, + PUNICODE_STRING pustrCNVersion, + PCLSMENUNAME pClassMenuName, DWORD fnID, - DWORD dwUnknown6, - DWORD dwUnknown7); + DWORD Flags, + LPDWORD pWow); BOOL NTAPI @@ -2490,7 +2482,7 @@ NtUserUnregisterClass( PUNICODE_STRING ClassNameOrAtom, HINSTANCE hInstance, - DWORD Unknown); + PCLSMENUNAME pClassMenuName); BOOL NTAPI @@ -2668,7 +2660,6 @@ #define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0xfffd0063 #define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0xfffd0064 #define TWOPARAM_ROUTINE_GETSYSCOLORS 0xfffd0065 -#define TWOPARAM_ROUTINE_ROS_SHOWWINDOW 0x1000 #define TWOPARAM_ROUTINE_ROS_ISACTIVEICON 0x1001 #define TWOPARAM_ROUTINE_ROS_NCDESTROY 0x1002 #define TWOPARAM_ROUTINE_ROS_REGSYSCLASSES 0x1003 Modified: trunk/reactos/subsystems/win32/win32k/include/winpos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -4,6 +4,8 @@ /* Undocumented flags. */ #define SWP_NOCLIENTMOVE 0x0800 #define SWP_NOCLIENTSIZE 0x1000 + +#define WIN_NEEDS_SHOW_OWNEDPOPUP (0x00000140) #define IntPtInWindow(WndObject,x,y) \ ((x) >= (WndObject)->Wnd->WindowRect.left && \ Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Jul 12 19:21:51 2008 @@ -697,8 +697,8 @@ NtUserMenuItemInfo 5 NtUserMonitorFromPoint 3 NtUserMonitorFromRect 2 +NtUserRegisterClassEx 6 NtUserMonitorFromWindow 2 -NtUserRegisterClassEx 6 NtUserSendMessage 5 NtUserSendMessageTimeout 8 NtUserSendNotifyMessage 4
16 years, 5 months
1
0
0
0
[jimtabor] 34441: This did not fix bug 3503 but only hid the problem. Added note about Firefox, polls IsInsideMessagePumpHook when Min/Max.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jul 12 18:49:51 2008 New Revision: 34441 URL:
http://svn.reactos.org/svn/reactos?rev=34441&view=rev
Log: This did not fix bug 3503 but only hid the problem. Added note about Firefox, polls IsInsideMessagePumpHook when Min/Max. Modified: trunk/reactos/dll/win32/user32/windows/message.c Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Sat Jul 12 18:49:51 2008 @@ -1081,11 +1081,15 @@ STDCALL InSendMessage(VOID) { - PCLIENTTHREADINFO pcti = SharedPtrToUser(((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo); - + PCLIENTTHREADINFO pcti = ((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo; +// FIXME("ISM %x\n",pcti); if ( pcti ) - return (pcti->CTI_flags & CTI_INSENDMESSAGE); - else + { + if (pcti->CTI_flags & CTI_INSENDMESSAGE) + { + return TRUE; + } + } return FALSE; /* return(NtUserGetThreadState(THREADSTATE_INSENDMESSAGE) != ISMEX_NOSEND);*/ } @@ -1099,8 +1103,8 @@ InSendMessageEx( LPVOID lpReserved) { - PCLIENTTHREADINFO pcti = SharedPtrToUser(((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo); - + PCLIENTTHREADINFO pcti = ((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo; +// FIXME("ISMEX %x\n",pcti); if (pcti && !(pcti->CTI_flags & CTI_INSENDMESSAGE)) return ISMEX_NOSEND; else /* return NtUserGetThreadState(THREADSTATE_INSENDMESSAGE); */ @@ -2311,8 +2315,9 @@ DWORD gfMessagePumpHook = 0; BOOL WINAPI IsInsideMessagePumpHook() -{ +{ // Fixme: Need to fully implement this! FF uses this and polls it when Min/Max PCLIENTTHREADINFO pcti = ((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo; +// FIXME("IIMPH %x\n",pcti); return (gfMessagePumpHook && pcti && (pcti->dwcPumpHook > 0)); }
16 years, 5 months
1
0
0
0
[silverblade] 34440: Structural and formatting changes only. Moved all device-type-specific code including MME entrypoint routines into relevantly-named directories and split a few functions from files where they didn't really belong. Changed formatting of comments at top of my source and header files to be the same as described on the ReactOS wiki.
by silverblade@svn.reactos.org
Author: silverblade Date: Sat Jul 12 16:44:10 2008 New Revision: 34440 URL:
http://svn.reactos.org/svn/reactos?rev=34440&view=rev
Log: Structural and formatting changes only. Moved all device-type-specific code including MME entrypoint routines into relevantly-named directories and split a few functions from files where they didn't really belong. Changed formatting of comments at top of my source and header files to be the same as described on the ReactOS wiki. Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/auxiliary/ branches/silverblade-audio/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/capabilities.c (with props) branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/midMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/modMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mixer/ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/callback.c (with props) branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/format.c (with props) branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streamcontrol.c (with props) branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streaming.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wave.h (with props) branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/widMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c - copied, changed from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c Modified: branches/silverblade-audio/dll/win32/mmdrv/entry.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/DriverProc.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/mmebuddy.rbuild branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c Modified: branches/silverblade-audio/dll/win32/mmdrv/entry.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/dll/win32/mmd…
============================================================================== --- branches/silverblade-audio/dll/win32/mmdrv/entry.c [iso-8859-1] (original) +++ branches/silverblade-audio/dll/win32/mmdrv/entry.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,21 +1,18 @@ /* - ReactOS Sound System - Default MME Driver - - Purpose: - MME driver entry-point - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/mmdrv/entry.c + * + * PURPOSE: MME generic low-level audio device support library DriverProc + * entry-point. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> #include <mmddk.h> + #include <mmebuddy.h> -#include <debug.h> APIENTRY LONG DriverProc( @@ -28,11 +25,11 @@ switch ( message ) { case DRV_LOAD : - DPRINT("DRV_LOAD\n"); + TRACE_("DRV_LOAD\n"); return 1L; case DRV_FREE : - DPRINT("DRV_FREE\n"); + TRACE_("DRV_FREE\n"); return 1L; default : Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - Auxiliary device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/auxiliary/auxMessage.c + * + * PURPOSE: Provides the auxMessage exported function, as required by + * the MME API, for auxiliary functionality support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/capabilities.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/capabilities.c (added) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/capabilities.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,0 +1,102 @@ +/* + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/capabilities.c + * + * PURPOSE: Queries sound devices for their capabilities. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) +*/ + +#include <windows.h> +#include <mmsystem.h> +#include <ntddk.h> /* needed for ioctl stuff */ +#include <ntddsnd.h> + +#include <mmebuddy.h> + +MMRESULT +GetSoundDeviceCapabilities( + IN PSOUND_DEVICE Device, + OUT PUNIVERSAL_CAPS Capabilities) +{ + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! Capabilities ) + return MMSYSERR_INVALPARAM; + + return Device->Functions.GetCapabilities(Device, Capabilities); +} + +MMRESULT +DefaultGetSoundDeviceCapabilities( + IN PSOUND_DEVICE Device, + OUT PUNIVERSAL_CAPS Capabilities) +{ + PVOID RawCapsPtr = NULL; + ULONG CapsSize = 0; + DWORD Ioctl; + MMRESULT Result; + DWORD BytesReturned; + + ZeroMemory(Capabilities, sizeof(UNIVERSAL_CAPS)); + + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! Capabilities ) + return MMSYSERR_INVALPARAM; + + /* Select appropriate IOCTL and capabilities structure */ + switch ( Device->DeviceType ) + { + case WAVE_OUT_DEVICE_TYPE : + Ioctl = IOCTL_WAVE_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->WaveOut; + CapsSize = sizeof(WAVEOUTCAPS); + break; + + case WAVE_IN_DEVICE_TYPE : + Ioctl = IOCTL_WAVE_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->WaveIn; + CapsSize = sizeof(WAVEINCAPS); + break; + + case MIDI_OUT_DEVICE_TYPE : + Ioctl = IOCTL_MIDI_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->MidiOut; + CapsSize = sizeof(MIDIOUTCAPS); + break; + + case MIDI_IN_DEVICE_TYPE : + Ioctl = IOCTL_MIDI_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->MidiIn; + CapsSize = sizeof(MIDIINCAPS); + break; + + case MIXER_DEVICE_TYPE : + /* TODO */ + /*Ioctl = IOCTL_MIX_GET_CAPABILITIES;*/ + return MMSYSERR_NOTSUPPORTED; + + case AUX_DEVICE_TYPE : + /* TODO */ + Ioctl = IOCTL_AUX_GET_CAPABILITIES; + return MMSYSERR_NOTSUPPORTED; + + default : + return MMSYSERR_NOTSUPPORTED; + } + + /* Call the driver */ + Result = ReadSoundDevice( + Device, + Ioctl, + (LPVOID) RawCapsPtr, + CapsSize, + &BytesReturned, + NULL); + + return Result; +} Propchange: branches/silverblade-audio/lib/drivers/sound/mmebuddy/capabilities.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,19 +1,12 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Device list manager - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created - 5 July 2008 - Implemented format support - 6 July 2008 - Added default instance constructor/destructor + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/devices.c + * + * PURPOSE: Manages lists of sound devices. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ - /* TODO: @@ -335,188 +328,6 @@ /* Should these go somewhere else? */ MMRESULT -GetSoundDeviceCapabilities( - IN PSOUND_DEVICE Device, - OUT PUNIVERSAL_CAPS Capabilities) -{ - if ( ! Device ) - return MMSYSERR_INVALPARAM; - - if ( ! Capabilities ) - return MMSYSERR_INVALPARAM; - - return Device->Functions.GetCapabilities(Device, Capabilities); -} - -MMRESULT -DefaultGetSoundDeviceCapabilities( - IN PSOUND_DEVICE Device, - OUT PUNIVERSAL_CAPS Capabilities) -{ - PVOID RawCapsPtr = NULL; - ULONG CapsSize = 0; - DWORD Ioctl; - MMRESULT Result; - DWORD BytesReturned; - - ZeroMemory(Capabilities, sizeof(UNIVERSAL_CAPS)); - - if ( ! Device ) - return MMSYSERR_INVALPARAM; - - if ( ! Capabilities ) - return MMSYSERR_INVALPARAM; - - /* Select appropriate IOCTL and capabilities structure */ - switch ( Device->DeviceType ) - { - case WAVE_OUT_DEVICE_TYPE : - Ioctl = IOCTL_WAVE_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->WaveOut; - CapsSize = sizeof(WAVEOUTCAPS); - break; - - case WAVE_IN_DEVICE_TYPE : - Ioctl = IOCTL_WAVE_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->WaveIn; - CapsSize = sizeof(WAVEINCAPS); - break; - - case MIDI_OUT_DEVICE_TYPE : - Ioctl = IOCTL_MIDI_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->MidiOut; - CapsSize = sizeof(MIDIOUTCAPS); - break; - - case MIDI_IN_DEVICE_TYPE : - Ioctl = IOCTL_MIDI_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->MidiIn; - CapsSize = sizeof(MIDIINCAPS); - break; - - case MIXER_DEVICE_TYPE : - /* TODO */ - /*Ioctl = IOCTL_MIX_GET_CAPABILITIES;*/ - return MMSYSERR_NOTSUPPORTED; - - case AUX_DEVICE_TYPE : - /* TODO */ - Ioctl = IOCTL_AUX_GET_CAPABILITIES; - return MMSYSERR_NOTSUPPORTED; - - default : - return MMSYSERR_NOTSUPPORTED; - } - - /* Call the driver */ - Result = ReadSoundDevice( - Device, - Ioctl, - (LPVOID) RawCapsPtr, - CapsSize, - &BytesReturned, - NULL); - - return Result; -} - -MMRESULT -QueryWaveDeviceFormatSupport( - IN PSOUND_DEVICE Device, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - if ( ! Device ) - return MMSYSERR_INVALPARAM; - - if ( ! WaveFormat ) - return MMSYSERR_INVALPARAM; - - /* TODO: Should we check the size? */ - - return Device->Functions.QueryWaveFormat(Device, WaveFormat, WaveFormatSize); -} - -MMRESULT -DefaultQueryWaveDeviceFormatSupport( - IN PSOUND_DEVICE Device, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - MMRESULT Result; - DWORD BytesReturned = 0; - - if ( ! Device ) - return MMSYSERR_INVALPARAM; - - if ( ! WaveFormat ) - return MMSYSERR_INVALPARAM; - - /* Make sure we have a wave device */ - if ( ! IS_WAVE_DEVICE_TYPE(Device->DeviceType) ) - { - return MMSYSERR_INVALPARAM; - } - - Result = WriteSoundDevice(Device, - IOCTL_WAVE_QUERY_FORMAT, - (LPVOID) WaveFormat, - WaveFormatSize, - &BytesReturned, - NULL); - - return Result; -} - -MMRESULT -SetWaveDeviceFormat( - IN PSOUND_DEVICE_INSTANCE Instance, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - if ( ! Instance ) - return MMSYSERR_INVALPARAM; - - if ( ! WaveFormat ) - return MMSYSERR_INVALPARAM; - - /* TODO: Should we check the size? */ - - return Instance->Device->Functions.SetWaveFormat(Instance, WaveFormat, WaveFormatSize); -} - -MMRESULT -DefaultSetWaveDeviceFormat( - IN PSOUND_DEVICE_INSTANCE Instance, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - MMRESULT Result; - DWORD BytesReturned = 0; - - if ( ! Instance ) - return MMSYSERR_INVALPARAM; - - if ( ! WaveFormat ) - return MMSYSERR_INVALPARAM; - - /* Make sure we have a wave device */ - if ( ! IS_WAVE_DEVICE_TYPE(Instance->Device->DeviceType) ) - { - return MMSYSERR_INVALPARAM; - } - - Result = WriteSoundDevice(Instance->Device, - IOCTL_WAVE_SET_FORMAT, - (LPVOID) WaveFormat, - WaveFormatSize, - &BytesReturned, - NULL); - - return Result; -} - -MMRESULT DefaultInstanceConstructor( IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance) { Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,16 +1,12 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Device instance manager - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created - 6 July 2008 - Re-structured + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/instances.c + * + * PURPOSE: Handles construction/destruction of sound device instances, + * along with tracking of existing instances. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Kernel device I/O - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/kernel.c + * + * PURPOSE: Routines assisting with device I/O between user-mode and + * kernel-mode. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/midMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/midMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - MIDI Input device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/midi/midMessage.c + * + * PURPOSE: Provides the midMessage exported function, as required by + * the MME API, for MIDI input device support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/modMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/midi/modMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - MIDI Output device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/midi/modMessage.c + * + * PURPOSE: Provides the modMessage exported function, as required by + * the MME API, for MIDI output device support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - Mixer device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/mixer/mxdMessage.c + * + * PURPOSE: Provides the mxdMessage exported function, as required by + * the MME API, for mixer support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/DriverProc.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/DriverProc.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/DriverProc.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,14 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - Default DriverProc implementation - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/mme/DriverProc.c + * + * PURPOSE: Provides a default/boilerplate implementation of the DriverProc + * export function. (NOTE: This file may be fairly redundant + * because the MME API can provide default functionality anyway.) + * This file will be removed from future revisions. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/auxMessage.c (removed) @@ -1,32 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - Auxiliary device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> - -#include <mmebuddy.h> - -APIENTRY DWORD -auxMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - TRACE_("auxMessageStub called\n"); - /* TODO */ - return MMSYSERR_NOTSUPPORTED; -} Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/callback.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/callback.c (added) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/callback.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,0 +1,21 @@ +/* + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/mme/callback.c + * + * PURPOSE: Calls an MME API client application, usually to return + * buffers which have been processed etc. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) +*/ + +#include <windows.h> +#include <mmsystem.h> + +VOID +NotifySoundClient( + DWORD Message, + DWORD Parameter) +{ + /* TODO... DriverCallback */ +} Propchange: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/callback.c ------------------------------------------------------------------------------ svn:eol-style = native Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/midMessage.c (removed) @@ -1,50 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - MIDI Input device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> - -#include <mmebuddy.h> - -APIENTRY DWORD -midMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - TRACE_("midMessageStub called\n"); - - switch ( message ) - { - case MIDM_GETNUMDEVS : - return 0; - - case MIDM_GETDEVCAPS : - case MIDM_OPEN : - return MMSYSERR_BADDEVICEID; - - case MIDM_CLOSE : - case MIDM_ADDBUFFER : - case MIDM_START : - case MIDM_STOP : - case MIDM_RESET : - return MMSYSERR_INVALHANDLE; - - default : - return MMSYSERR_NOTSUPPORTED; - } -} Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/modMessage.c (removed) @@ -1,49 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - MIDI Output device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> - -#include <mmebuddy.h> - -APIENTRY DWORD -modMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - TRACE_("modMessageStub called\n"); - - switch ( message ) - { - case MODM_GETNUMDEVS : - return 0; - - case MODM_GETDEVCAPS : - case MODM_OPEN : - return MMSYSERR_BADDEVICEID; - - case MODM_CLOSE : - case MODM_DATA : - case MODM_LONGDATA : - case MODM_RESET : - return MMSYSERR_INVALHANDLE; - - default : - return MMSYSERR_NOTSUPPORTED; - } -} Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/mxdMessage.c (removed) @@ -1,32 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - Mixer device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> - -#include <mmebuddy.h> - -APIENTRY DWORD -mxdMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - TRACE_("mxdMessageStub called\n"); - /* TODO */ - return MMSYSERR_NOTSUPPORTED; -} Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c (removed) @@ -1,49 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - Wave input device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> -#include <ntddsnd.h> - -#include <mmebuddy.h> - -APIENTRY DWORD -widMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - TRACE_("widMessageStub called\n"); - - switch ( message ) - { - case WIDM_GETNUMDEVS : - return GetSoundDeviceCount(WAVE_IN_DEVICE_TYPE); - - case WIDM_GETDEVCAPS : - case WIDM_OPEN : - return MMSYSERR_BADDEVICEID; - - case WIDM_CLOSE : - case WIDM_START : - case WIDM_RESET : - return MMSYSERR_INVALHANDLE; - - default : - return MMSYSERR_NOTSUPPORTED; - } -} Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c (removed) @@ -1,142 +1,0 @@ -/* - ReactOS Sound System - MME Interface - - Purpose: - Wave output device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -#include <windows.h> -#include <mmsystem.h> -#include <mmddk.h> - -#include <ntddsnd.h> -#include <mmebuddy.h> - -APIENTRY DWORD -wodMessage( - DWORD device_id, - DWORD message, - DWORD private_handle, - DWORD parameter1, - DWORD parameter2) -{ - MMRESULT Result = MMSYSERR_NOERROR; - PSOUND_DEVICE Device = NULL; - PSOUND_DEVICE_INSTANCE Instance = - (PSOUND_DEVICE_INSTANCE)private_handle; - - TRACE_("wodMessageStub called\n"); - - switch ( message ) - { - case WODM_GETNUMDEVS : - return GetSoundDeviceCount(WAVE_OUT_DEVICE_TYPE); - - case WODM_GETDEVCAPS : - { - UNIVERSAL_CAPS Capabilities; - - if ( parameter2 < sizeof(WAVEOUTCAPS) ) - return MMSYSERR_INVALPARAM; - - Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, device_id, &Device); - if ( Result != MMSYSERR_NOERROR ) - return Result; - - Result = GetSoundDeviceCapabilities(Device, &Capabilities); - if ( Result != MMSYSERR_NOERROR ) - return Result; - - CopyMemory((LPWAVEOUTCAPS)parameter1, &Capabilities.WaveOut, parameter2); - - return Result; - } - - case WODM_OPEN : - { - WAVEOPENDESC* OpenParameters = (WAVEOPENDESC*) parameter1; - - TRACE_("In WODM_OPEN\n"); - Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, device_id, &Device); - if ( Result != MMSYSERR_NOERROR ) - return Result; - - if ( parameter2 & WAVE_FORMAT_QUERY ) - { - Result = QueryWaveDeviceFormatSupport(Device, - OpenParameters->lpFormat, - sizeof(WAVEFORMATEX)); - - return Result; - } - - ASSERT(private_handle != 0); - - Result = CreateSoundDeviceInstance(Device, &Instance); - if ( Result != MMSYSERR_NOERROR ) - return Result; - - Result = SetWaveDeviceFormat(Instance, - OpenParameters->lpFormat, - sizeof(WAVEFORMATEX)); - - if ( Result != MMSYSERR_NOERROR ) - { - DestroySoundDeviceInstance(Instance); - return Result; - } - - /* Provide winmm with instance handle */ - *((PSOUND_DEVICE_INSTANCE*)private_handle) = Instance; - - /* TODO: Send callback... */ - - return MMSYSERR_NOERROR; - } - - case WODM_CLOSE : - { - //SOUND_DEBUG_HEX(Instance); - ASSERT(Instance != NULL); - - /* TODO: Ensure its OK to close */ - - Result = DestroySoundDeviceInstance(Instance); - /*SOUND_DEBUG_HEX(Result);*/ - - /* TODO: When do we send the callback? */ - - return Result; - /* CloseSoundDevice() */ - } - - case WODM_WRITE : - { - ASSERT(Instance != NULL); - ASSERT(parameter1 != 0); - - return QueueWaveDeviceBuffer(Instance, (PWAVEHDR) parameter1); - } - - case WODM_PAUSE : - case WODM_RESTART : - case WODM_RESET : - case WODM_BREAKLOOP : - return MMSYSERR_INVALHANDLE; - - /* Let WINMM take care of these */ - case WODM_PREPARE : - case WODM_UNPREPARE : - return MMSYSERR_NOTSUPPORTED; - - default : - return MMSYSERR_NOTSUPPORTED; - } -} Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/mmebuddy.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mmebuddy.rbuild [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/mmebuddy.rbuild [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -2,24 +2,31 @@ <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> <module name="mmebuddy" type="staticlibrary" allowwarnings="false" unicode="yes"> <include base="ReactOS">include/reactos/libs/sound</include> + <file>kernel.c</file> + <file>nt4.c</file> <file>devices.c</file> <file>instances.c</file> - <file>kernel.c</file> - <file>nt4.c</file> + <file>capabilities.c</file> + <file>thread.c</file> <file>utility.c</file> - <file>thread.c</file> <directory name="mme"> <file>DriverProc.c</file> + </directory> + <directory name="wave"> <file>wodMessage.c</file> <file>widMessage.c</file> + <file>format.c</file> + <file>streaming.c</file> + <file>streamcontrol.c</file> + </directory> + <directory name="midi"> <file>modMessage.c</file> <file>midMessage.c</file> + </directory> + <directory name="mixer"> <file>mxdMessage.c</file> + </directory> + <directory name="auxiliary"> <file>auxMessage.c</file> </directory> - <directory name="wave"> - <file>wavethread.c</file> - </directory> - <directory name="midi"> - </directory> </module> Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,20 +1,14 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Legacy (NT4) sound device support - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created -*/ - -/* - A better way of detecting sound devices... - Search the appropriate registry key! + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/nt4.c + * + * PURPOSE: Assists in locating Windows NT4 compatible sound devices, + * which mostly use the same device naming convention and/or + * store their created device names within their service key + * within the registry. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,18 +1,11 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Sound device processing thread - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created - 5 July 2008 - Implemented basic request processing - 6 July 2008 - Added I/O completion handling - 9 July 2008 - Rewritten to have a single streaming thread + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/thread.c + * + * PURPOSE: Manages a thread to assist with the streaming of sound data. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/utility.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,11 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Utility functions - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/utility.c + * + * PURPOSE: Provides utility functions used by the library. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/format.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/format.c (added) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/format.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,0 +1,112 @@ +/* + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/format.c + * + * PURPOSE: Queries/sets format for wave audio devices. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) +*/ + +#include <windows.h> +#include <mmsystem.h> +#include <ntddk.h> /* for IOCTL stuff */ +#include <ntddsnd.h> + +#include <mmebuddy.h> + +MMRESULT +QueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* TODO: Should we check the size? */ + + return Device->Functions.QueryWaveFormat(Device, WaveFormat, WaveFormatSize); +} + +MMRESULT +DefaultQueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + MMRESULT Result; + DWORD BytesReturned = 0; + + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* Make sure we have a wave device */ + if ( ! IS_WAVE_DEVICE_TYPE(Device->DeviceType) ) + { + return MMSYSERR_INVALPARAM; + } + + Result = WriteSoundDevice(Device, + IOCTL_WAVE_QUERY_FORMAT, + (LPVOID) WaveFormat, + WaveFormatSize, + &BytesReturned, + NULL); + + return Result; +} + +MMRESULT +SetWaveDeviceFormat( + IN PSOUND_DEVICE_INSTANCE Instance, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + if ( ! Instance ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* TODO: Should we check the size? */ + + return Instance->Device->Functions.SetWaveFormat(Instance, WaveFormat, WaveFormatSize); +} + +MMRESULT +DefaultSetWaveDeviceFormat( + IN PSOUND_DEVICE_INSTANCE Instance, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + MMRESULT Result; + DWORD BytesReturned = 0; + + if ( ! Instance ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* Make sure we have a wave device */ + if ( ! IS_WAVE_DEVICE_TYPE(Instance->Device->DeviceType) ) + { + return MMSYSERR_INVALPARAM; + } + + Result = WriteSoundDevice(Instance->Device, + IOCTL_WAVE_SET_FORMAT, + (LPVOID) WaveFormat, + WaveFormatSize, + &BytesReturned, + NULL); + + return Result; +} Propchange: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/format.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streamcontrol.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streamcontrol.c (added) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streamcontrol.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,0 +1,45 @@ +/* + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/streamcontrol.c + * + * PURPOSE: Controls the wave streaming thread. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) +*/ + +#include <windows.h> +#include <mmsystem.h> + +#include <mmebuddy.h> +#include "wave.h" + +MMRESULT +QueueWaveDeviceBuffer( + IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, + IN PWAVEHDR BufferHeader) +{ + if ( ! SoundDeviceInstance ) + return MMSYSERR_INVALPARAM; + + if ( ! BufferHeader ) + return MMSYSERR_INVALPARAM; + + if ( ! BufferHeader->lpData ) + return MMSYSERR_INVALPARAM; + + if ( ! BufferHeader->dwBufferLength ) + return MMSYSERR_INVALPARAM; + + if ( ! (BufferHeader->dwFlags & WHDR_PREPARED ) ) + return WAVERR_UNPREPARED; + + /* TODO: WHDR_INQUEUE */ + + BufferHeader->dwFlags &= ~WHDR_DONE; + BufferHeader->lpNext = NULL; + + return CallUsingSoundThread(SoundDeviceInstance, + QueueBuffer_Request, + BufferHeader); +} Propchange: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streamcontrol.c ------------------------------------------------------------------------------ svn:eol-style = native Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streaming.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/streaming.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,19 +1,12 @@ /* - ReactOS Sound System - MME Driver Helper - - Purpose: - Wave thread operations - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created - 6 July 2008 - Restructured to hide some of the low-level threading - - TODO: - Track if a buffer has already been inserted? + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/streaming.c + * + * PURPOSE: Streams wave audio data to/from a sound driver, within + * a separate thread. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> @@ -227,34 +220,3 @@ return MMSYSERR_NOERROR; } - - -MMRESULT -QueueWaveDeviceBuffer( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PWAVEHDR BufferHeader) -{ - if ( ! SoundDeviceInstance ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader->lpData ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader->dwBufferLength ) - return MMSYSERR_INVALPARAM; - - if ( ! (BufferHeader->dwFlags & WHDR_PREPARED ) ) - return WAVERR_UNPREPARED; - - /* TODO: WHDR_INQUEUE */ - - BufferHeader->dwFlags &= ~WHDR_DONE; - BufferHeader->lpNext = NULL; - - return CallUsingSoundThread(SoundDeviceInstance, - QueueBuffer_Request, - BufferHeader); -} Added: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wave.h URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wave.h (added) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wave.h [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,0 +1,20 @@ +/* + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/wave.h + * + * PURPOSE: Provides prototypes and structures relevant to the internal + * implementation of the MME wave device support functions. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) +*/ + +#ifndef ROS_MMEBUDDY_WAVE_H +#define ROS_MMEBUDDY_WAVE_H + +MMRESULT +QueueBuffer_Request( + IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, + IN PVOID Parameter); + +#endif Propchange: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wave.h ------------------------------------------------------------------------------ svn:eol-style = native Removed: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c (removed) @@ -1,260 +1,0 @@ -/* - ReactOS Sound System - MME Driver Helper - - Purpose: - Wave thread operations - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created - 6 July 2008 - Restructured to hide some of the low-level threading - - TODO: - Track if a buffer has already been inserted? -*/ - -#include <windows.h> -#include <mmsystem.h> - -#include <mmebuddy.h> - - -/* - How much we can feed to the driver at a time. For example, 2 buffers - of 65536 would mean we can send 65536 bytes in a single I/O operation, - and a total of 2 buffers (not necessarily full). - - If a single WAVEHDR is larger than MAX_SOUND_BUFFER_SIZE then a second - buffer will be used. -*/ -#define MAX_SOUND_BUFFER_SIZE 65536 -#define MAX_SOUND_BUFFERS 2 - -VOID -CompleteWaveBuffer( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PVOID Parameter, - IN DWORD BytesWritten); - -BOOLEAN -StreamReadyForData( - IN PWAVE_STREAM_INFO StreamInfo) -{ - ASSERT(StreamInfo); - - return (StreamInfo->BuffersOutstanding < MAX_SOUND_BUFFERS); -} - -BOOLEAN -StreamHasBuffersQueued( - IN PWAVE_STREAM_INFO StreamInfo) -{ - ASSERT(StreamInfo); - - return (StreamInfo->CurrentBuffer != NULL); -} - -DWORD -PerformWaveIo( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance) -{ - PWAVE_STREAM_INFO StreamInfo; - DWORD BytesToStream, BytesStreamed = 0; - - TRACE_("PerformWaveIo\n"); - - ASSERT(SoundDeviceInstance); - - StreamInfo = &SoundDeviceInstance->Streaming.Wave; - - /* If we're out of buffers, mark stream as stopped and do nothing */ - if ( ! StreamInfo->CurrentBuffer ) - { - TRACE_("*** NOTHING TO DO ***\n"); - return 0; - } - - /* Work out how much buffer can be submitted */ - BytesToStream = MinimumOf(StreamInfo->CurrentBuffer->dwBufferLength - - StreamInfo->CurrentBuffer->reserved, - MAX_SOUND_BUFFER_SIZE); - - TRACE_("About to report what I'm about to write...\n"); - - TRACE_("Writing %p + %d (%d bytes) - buffer length is %d bytes\n", - StreamInfo->CurrentBuffer->lpData, - (int) StreamInfo->CurrentBuffer->reserved, - (int) BytesToStream, - (int) StreamInfo->CurrentBuffer->dwBufferLength); - - /* TODO: Error checking */ - OverlappedSoundDeviceIo(SoundDeviceInstance, - (PCHAR) StreamInfo->CurrentBuffer->lpData + - StreamInfo->CurrentBuffer->reserved, - BytesToStream, - CompleteWaveBuffer, - (PVOID) StreamInfo->CurrentBuffer); - - /* FIXME? - find out how much was actually sent? */ - BytesStreamed = BytesToStream; - - /* Advance the offset */ - StreamInfo->CurrentBuffer->reserved += BytesStreamed; - - /* If we've hit the end of the buffer, move to the next one */ - if ( StreamInfo->CurrentBuffer->reserved == - StreamInfo->CurrentBuffer->dwBufferLength ) - { - TRACE_("Advancing to next buffer\n"); - StreamInfo->CurrentBuffer = StreamInfo->CurrentBuffer->lpNext; - } - - /* Increase the number of outstanding buffers */ - ++ StreamInfo->BuffersOutstanding; - - return BytesStreamed; -} - -MMRESULT -StreamWaveBuffers( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance) -{ - PWAVE_STREAM_INFO StreamInfo; - ASSERT(SoundDeviceInstance); - - StreamInfo = &SoundDeviceInstance->Streaming.Wave; - - TRACE_("<== Streaming wave I/O ==>\n"); - while ( StreamReadyForData(StreamInfo) && - StreamHasBuffersQueued(StreamInfo) ) - { - TRACE_("Performing wave I/O ...\n"); - PerformWaveIo(SoundDeviceInstance); - } - TRACE_("<== Done streaming ==>\n"); - - return MMSYSERR_NOERROR; -} - -VOID -CompleteWaveBuffer( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PVOID Parameter, - IN DWORD BytesWritten) -{ - PWAVE_STREAM_INFO StreamInfo; - - TRACE_("CompleteWaveBuffer(%p, %p, %d)\n", - SoundDeviceInstance, - Parameter, - (int) BytesWritten); - - ASSERT(SoundDeviceInstance); - - StreamInfo = &SoundDeviceInstance->Streaming.Wave; - - /* Decrease the number of outstanding buffers */ - ASSERT(StreamInfo->BuffersOutstanding > 0); - -- StreamInfo->BuffersOutstanding; - - PerformWaveIo(SoundDeviceInstance); - - TRACE_("Wave completion routine done\n"); -} - -MMRESULT -QueueBuffer_Request( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PVOID Parameter) -{ - PWAVEHDR WaveHeader = (PWAVEHDR) Parameter; - PWAVE_STREAM_INFO StreamInfo; - - if ( ! SoundDeviceInstance ) - return MMSYSERR_INVALPARAM; - - if ( ! WaveHeader ) - return MMSYSERR_INVALPARAM; - - /* To avoid stupidly long variable names we alias this */ - StreamInfo = &SoundDeviceInstance->Streaming.Wave; - - TRACE_("QueueBuffer_Request\n"); - - /* Initialise fields of interest to us */ - WaveHeader->lpNext = NULL; - WaveHeader->reserved = 0; - - /* - Is this the first buffer being queued? Streaming only needs to be - done here if there's nothing else playing. - */ - if ( ! StreamInfo->BufferQueueHead ) - { - TRACE_("This is the first buffer being queued\n"); - - /* Set head, tail and current to this buffer */ - StreamInfo->BufferQueueHead = WaveHeader; - StreamInfo->BufferQueueTail = WaveHeader; - StreamInfo->CurrentBuffer = WaveHeader; - - /* Initialise the stream state */ - //StreamInfo->BufferOffset = 0; - //StreamInfo->BytesOutstanding = 0; - StreamInfo->BuffersOutstanding = 0; - - /* Get the streaming started */ - StreamWaveBuffers(SoundDeviceInstance); - } - else - { - TRACE_("This is not the first buffer being queued\n"); - - /* Point the existing tail to the new buffer */ - StreamInfo->BufferQueueTail->lpNext = WaveHeader; - /* ...and set the buffer as the new tail */ - StreamInfo->BufferQueueTail = WaveHeader; - - if ( ! StreamInfo->CurrentBuffer ) - { - /* All buffers so far have been committed to the sound driver */ - StreamInfo->CurrentBuffer = WaveHeader; - } - } - - return MMSYSERR_NOERROR; -} - - -MMRESULT -QueueWaveDeviceBuffer( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PWAVEHDR BufferHeader) -{ - if ( ! SoundDeviceInstance ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader->lpData ) - return MMSYSERR_INVALPARAM; - - if ( ! BufferHeader->dwBufferLength ) - return MMSYSERR_INVALPARAM; - - if ( ! (BufferHeader->dwFlags & WHDR_PREPARED ) ) - return WAVERR_UNPREPARED; - - /* TODO: WHDR_INQUEUE */ - - BufferHeader->dwFlags &= ~WHDR_DONE; - BufferHeader->lpNext = NULL; - - return CallUsingSoundThread(SoundDeviceInstance, - QueueBuffer_Request, - BufferHeader); -} Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/widMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/widMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/widMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - Wave input device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/widMessage.c + * + * PURPOSE: Provides the widMessage exported function, as required by + * the MME API, for wave input device support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h> Copied: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c (from r34432, branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c) URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/mme/wodMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] Sat Jul 12 16:44:10 2008 @@ -1,15 +1,12 @@ /* - ReactOS Sound System - MME Interface - - Purpose: - Wave output device message handler - - Author: - Andrew Greenwood (silverblade(a)reactos.org) - - History: - 4 July 2008 - Created + * PROJECT: ReactOS Sound System "MME Buddy" Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/sound/mmebuddy/wave/wodMessage.c + * + * PURPOSE: Provides the wodMessage exported function, as required by + * the MME API, for wave output device support. + * + * PROGRAMMERS: Andrew Greenwood (silverblade(a)reactos.org) */ #include <windows.h>
16 years, 5 months
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
77
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
Results per page:
10
25
50
100
200