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
2025
January
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
November 2005
----- 2025 -----
January 2025
----- 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
27 participants
875 discussions
Start a n
N
ew thread
[jimtabor] 19512: PortCls.sys, Port Class functions for audio drivers.
by jimtabor@svn.reactos.com
PortCls.sys, Port Class functions for audio drivers. Added: trunk/reactos/drivers/dd/portcls/portcls.c Added: trunk/reactos/drivers/dd/portcls/portcls.def Added: trunk/reactos/drivers/dd/portcls/portcls.h Added: trunk/reactos/drivers/dd/portcls/portcls.rc Added: trunk/reactos/drivers/dd/portcls/portcls.xml _____ Added: trunk/reactos/drivers/dd/portcls/portcls.c --- trunk/reactos/drivers/dd/portcls/portcls.c 2005-11-24 01:03:27 UTC (rev 19511) +++ trunk/reactos/drivers/dd/portcls/portcls.c 2005-11-24 01:05:58 UTC (rev 19512) @@ -0,0 +1,505 @@ +/* + * ReactOS PortCls Driver + * Copyright (C) 2005 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Sound System + * PURPOSE: Audio Port Class Functions + * FILE: drivers/dd/sound/portcls/portcls.c + * PROGRAMMERS: + * + * REVISION HISTORY: + * 21 November 2005 Created James Tabor + */ +#include <windows.h> +#include "portcls.h" + + +#define NDEBUG +#include <debug.h> + + +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath) +{ + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +DWORD STDCALL +DllInitialize(DWORD Unknown) +{ + return 0; +} + +/* + * @implemented + */ +DWORD STDCALL +DllUnload(VOID) +{ + return 0; +} + + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcAddAdapterDevice( + DWORD DriverObject, + DWORD PhysicalDeviceObject, + DWORD StartDevice, + DWORD MaxObjects, + DWORD DeviceExtensionSize +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcAddContentHandlers( + DWORD ContentId, + DWORD paHandlers, + DWORD NumHandlers +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCompleteIrp( + DWORD DeviceObject, + DWORD Irp, + DWORD Status +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCompletePendingPropertyRequest( + DWORD PropertyRequest, + DWORD NtStatus +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCreateContentMixed( + DWORD paContentId, + DWORD cContentId, + DWORD pMixedContentId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcDestroyContent( + DWORD ContentId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcDispatchIrp( + DWORD DeviceObject, + DWORD Irp +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToDeviceObject( + DWORD ContentId, + DWORD Reserved, + DWORD DrmForward +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToFileObject( + DWORD ContentId, + DWORD FileObject +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToInterface( + DWORD ContentId, + DWORD Unknown, + DWORD NumMethods +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardIrpSynchronous( + DWORD DeviceObject, + DWORD Irp +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcGetContentRights( + DWORD ContentId, + DWORD DrmRights +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcGetDeviceProperty( + DWORD DeviceObject, + DWORD DeviceProperty, + DWORD BufferLength, + DWORD PropertyBuffer, + DWORD ResultLength +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +ULONGLONG STDCALL +PcGetTimeInterval( + ULONGLONG Timei +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcInitializeAdapterDriver( + DWORD DriverObject, + DWORD RegistryPathName, + DWORD AddDevice +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewDmaChannel( + DWORD OutDmaChannel, + DWORD Unknown, + DWORD PoolType, + DWORD DeviceDescription, + DWORD DeviceObject +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewInterruptSync( + DWORD OutInterruptSync, + DWORD Unknown, + DWORD ResourceList, + DWORD ResourceIndex, + DWORD Mode +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewMiniport( + DWORD OutMiniport, + DWORD ClassId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewPort( + DWORD OutPort, + DWORD ClassId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewRegistryKey( + DWORD OutRegistryKey, + DWORD Unknown, + DWORD RegistryKeyType, + DWORD DesiredAccess, + DWORD DeviceObject, + DWORD SubDevice, + DWORD ObjectAttributes, + DWORD CreateOptions, + DWORD Disposition +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewResourceList( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD TranslatedResources, + DWORD UntranslatedResources +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewResourceSublist( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD ParentList, + DWORD MaximumEntries +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewServiceGroup( + DWORD OutServiceGroup, + DWORD Unknown +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterAdapterPowerManagement( + DWORD Unknown, + DWORD pvContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnection( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnectionFromExternal( + DWORD DeviceObject, + DWORD FromString, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnectionToExternal( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToString, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterSubdevice( + DWORD DeviceObject, + DWORD SubdevName, + DWORD Unknown +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRequestNewPowerState( + DWORD pDeviceObject, + DWORD RequestedNewState +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcUnregisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + _____ Added: trunk/reactos/drivers/dd/portcls/portcls.def --- trunk/reactos/drivers/dd/portcls/portcls.def 2005-11-24 01:03:27 UTC (rev 19511) +++ trunk/reactos/drivers/dd/portcls/portcls.def 2005-11-24 01:05:58 UTC (rev 19512) @@ -0,0 +1,36 @@ +; +; Exports definition file for portcls.sys +; +EXPORTS +PcAddAdapterDevice@20 +PcAddContentHandlers@12 +PcCompleteIrp@12 +PcCompletePendingPropertyRequest@8 +PcCreateContentMixed@12 +PcDestroyContent@4 +PcDispatchIrp@8 +PcForwardContentToDeviceObject@12 +PcForwardContentToFileObject@8 +PcForwardContentToInterface@12 +PcForwardIrpSynchronous@8 +PcGetContentRights@8 +PcGetDeviceProperty@20 +PcGetTimeInterval@8 +PcInitializeAdapterDriver@12 +PcNewDmaChannel@20 +PcNewInterruptSync@20 +PcNewMiniport@8 +PcNewPort@8 +PcNewRegistryKey@36 +PcNewResourceList@20 +PcNewResourceSublist@20 +PcNewServiceGroup@8 +PcRegisterAdapterPowerManagement@8 +PcRegisterIoTimeout@12 +PcRegisterPhysicalConnection@20 +PcRegisterPhysicalConnectionFromExternal@20 +PcRegisterPhysicalConnectionToExternal@20 +PcRegisterSubdevice@12 +PcRequestNewPowerState@8 +PcUnregisterIoTimeout@12 + _____ Added: trunk/reactos/drivers/dd/portcls/portcls.h --- trunk/reactos/drivers/dd/portcls/portcls.h 2005-11-24 01:03:27 UTC (rev 19511) +++ trunk/reactos/drivers/dd/portcls/portcls.h 2005-11-24 01:05:58 UTC (rev 19512) @@ -0,0 +1,252 @@ +/* + + Move to w32api when it is ready. + + */ +#ifndef _PORTCLS_H +#define _PORTCLS_H +#if __GNUC__ >=3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include <windef.h> +#include <ddk/ntddk.h> + +#define PORTCLASSAPI extern + +PORTCLASSAPI NTSTATUS STDCALL +PcAddAdapterDevice( + DWORD DriverObject, + DWORD PhysicalDeviceObject, + DWORD StartDevice, + DWORD MaxObjects, + DWORD DeviceExtensionSize +); + +PORTCLASSAPI NTSTATUS STDCALL +PcAddContentHandlers( + DWORD ContentId, + DWORD paHandlers, + DWORD NumHandlers +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCompleteIrp( + DWORD DeviceObject, + DWORD Irp, + DWORD Status +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCompletePendingPropertyRequest( + DWORD PropertyRequest, + DWORD NtStatus +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCreateContentMixed( + DWORD paContentId, + DWORD cContentId, + DWORD pMixedContentId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcDestroyContent( + DWORD ContentId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcDispatchIrp( + DWORD DeviceObject, + DWORD Irp +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToDeviceObject( + DWORD ContentId, + DWORD Reserved, + DWORD DrmForward +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToFileObject( + DWORD ContentId, + DWORD FileObject +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToInterface( + DWORD ContentId, + DWORD Unknown, + DWORD NumMethods +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardIrpSynchronous( + DWORD DeviceObject, + DWORD Irp +); + +PORTCLASSAPI NTSTATUS STDCALL +PcGetContentRights( + DWORD ContentId, + DWORD DrmRights +); + +PORTCLASSAPI NTSTATUS STDCALL +PcGetDeviceProperty( + DWORD DeviceObject, + DWORD DeviceProperty, + DWORD BufferLength, + DWORD PropertyBuffer, + DWORD ResultLength +); + +PORTCLASSAPI ULONGLONG STDCALL +PcGetTimeInterval( + ULONGLONG Timei +); + +PORTCLASSAPI NTSTATUS STDCALL +PcInitializeAdapterDriver( + DWORD DriverObject, + DWORD RegistryPathName, + DWORD AddDevice +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewDmaChannel( + DWORD OutDmaChannel, + DWORD Unknown, + DWORD PoolType, + DWORD DeviceDescription, + DWORD DeviceObject +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewInterruptSync( + DWORD OutInterruptSync, + DWORD Unknown, + DWORD ResourceList, + DWORD ResourceIndex, + DWORD Mode +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewMiniport( + DWORD OutMiniport, + DWORD ClassId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewPort( + DWORD OutPort, + DWORD ClassId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewRegistryKey( + DWORD OutRegistryKey, + DWORD Unknown, + DWORD RegistryKeyType, + DWORD DesiredAccess, + DWORD DeviceObject, + DWORD SubDevice, + DWORD ObjectAttributes, + DWORD CreateOptions, + DWORD Disposition +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewResourceList( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD TranslatedResources, + DWORD UntranslatedResources +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewResourceSublist( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD ParentList, + DWORD MaximumEntries +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewServiceGroup( + DWORD OutServiceGroup, + DWORD Unknown +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterAdapterPowerManagement( + DWORD Unknown, + DWORD pvContext +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnection( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnectionFromExternal( + DWORD DeviceObject, + DWORD FromString, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnectionToExternal( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToString, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterSubdevice( + DWORD DeviceObject, + DWORD SubdevName, + DWORD Unknown +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRequestNewPowerState( + DWORD pDeviceObject, + DWORD RequestedNewState +); + +PORTCLASSAPI NTSTATUS STDCALL +PcUnregisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +); + +#ifdef __cplusplus +} +#endif + +#endif _____ Added: trunk/reactos/drivers/dd/portcls/portcls.rc --- trunk/reactos/drivers/dd/portcls/portcls.rc 2005-11-24 01:03:27 UTC (rev 19511) +++ trunk/reactos/drivers/dd/portcls/portcls.rc 2005-11-24 01:05:58 UTC (rev 19512) @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "PORTCLS Port Class Driver API\0" +#define REACTOS_STR_INTERNAL_NAME "portcls\0" +#define REACTOS_STR_ORIGINAL_FILENAME "portcls.sys\0" +#include <reactos/version.rc> _____ Added: trunk/reactos/drivers/dd/portcls/portcls.xml --- trunk/reactos/drivers/dd/portcls/portcls.xml 2005-11-24 01:03:27 UTC (rev 19511) +++ trunk/reactos/drivers/dd/portcls/portcls.xml 2005-11-24 01:05:58 UTC (rev 19512) @@ -0,0 +1,8 @@ +<module name="portcls" type="kernelmodedriver" installbase="system32/drivers" installname="portcls.sys"> + <importlibrary definition="portcls.def" /> + <define name="__USE_W32API" /> + <library>ntoskrnl</library> + <library>hal</library> + <file>portcls.c</file> + <file>portcls.rc</file> +</module>
19 years, 1 month
1
0
0
0
[jimtabor] 19511: PortCls.sys, Port Class functions for audio drivers.
by jimtabor@svn.reactos.com
PortCls.sys, Port Class functions for audio drivers. Added: trunk/reactos/drivers/dd/portcls/
19 years, 1 month
1
0
0
0
[jimtabor] 19510: PortCls.sys, Port Class functions for audio drivers.
by jimtabor@svn.reactos.com
PortCls.sys, Port Class functions for audio drivers. Added: trunk/reactos/drivers/dd/portcls.c Added: trunk/reactos/drivers/dd/portcls.def Added: trunk/reactos/drivers/dd/portcls.h Added: trunk/reactos/drivers/dd/portcls.rc Added: trunk/reactos/drivers/dd/portcls.xml _____ Added: trunk/reactos/drivers/dd/portcls.c --- trunk/reactos/drivers/dd/portcls.c 2005-11-24 00:21:42 UTC (rev 19509) +++ trunk/reactos/drivers/dd/portcls.c 2005-11-24 00:58:47 UTC (rev 19510) @@ -0,0 +1,505 @@ +/* + * ReactOS PortCls Driver + * Copyright (C) 2005 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Sound System + * PURPOSE: Audio Port Class Functions + * FILE: drivers/dd/sound/portcls/portcls.c + * PROGRAMMERS: + * + * REVISION HISTORY: + * 21 November 2005 Created James Tabor + */ +#include <windows.h> +#include "portcls.h" + + +#define NDEBUG +#include <debug.h> + + +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath) +{ + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +DWORD STDCALL +DllInitialize(DWORD Unknown) +{ + return 0; +} + +/* + * @implemented + */ +DWORD STDCALL +DllUnload(VOID) +{ + return 0; +} + + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcAddAdapterDevice( + DWORD DriverObject, + DWORD PhysicalDeviceObject, + DWORD StartDevice, + DWORD MaxObjects, + DWORD DeviceExtensionSize +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcAddContentHandlers( + DWORD ContentId, + DWORD paHandlers, + DWORD NumHandlers +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCompleteIrp( + DWORD DeviceObject, + DWORD Irp, + DWORD Status +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCompletePendingPropertyRequest( + DWORD PropertyRequest, + DWORD NtStatus +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcCreateContentMixed( + DWORD paContentId, + DWORD cContentId, + DWORD pMixedContentId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcDestroyContent( + DWORD ContentId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcDispatchIrp( + DWORD DeviceObject, + DWORD Irp +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToDeviceObject( + DWORD ContentId, + DWORD Reserved, + DWORD DrmForward +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToFileObject( + DWORD ContentId, + DWORD FileObject +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardContentToInterface( + DWORD ContentId, + DWORD Unknown, + DWORD NumMethods +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcForwardIrpSynchronous( + DWORD DeviceObject, + DWORD Irp +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcGetContentRights( + DWORD ContentId, + DWORD DrmRights +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcGetDeviceProperty( + DWORD DeviceObject, + DWORD DeviceProperty, + DWORD BufferLength, + DWORD PropertyBuffer, + DWORD ResultLength +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +ULONGLONG STDCALL +PcGetTimeInterval( + ULONGLONG Timei +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcInitializeAdapterDriver( + DWORD DriverObject, + DWORD RegistryPathName, + DWORD AddDevice +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewDmaChannel( + DWORD OutDmaChannel, + DWORD Unknown, + DWORD PoolType, + DWORD DeviceDescription, + DWORD DeviceObject +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewInterruptSync( + DWORD OutInterruptSync, + DWORD Unknown, + DWORD ResourceList, + DWORD ResourceIndex, + DWORD Mode +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewMiniport( + DWORD OutMiniport, + DWORD ClassId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewPort( + DWORD OutPort, + DWORD ClassId +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewRegistryKey( + DWORD OutRegistryKey, + DWORD Unknown, + DWORD RegistryKeyType, + DWORD DesiredAccess, + DWORD DeviceObject, + DWORD SubDevice, + DWORD ObjectAttributes, + DWORD CreateOptions, + DWORD Disposition +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewResourceList( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD TranslatedResources, + DWORD UntranslatedResources +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewResourceSublist( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD ParentList, + DWORD MaximumEntries +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcNewServiceGroup( + DWORD OutServiceGroup, + DWORD Unknown +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterAdapterPowerManagement( + DWORD Unknown, + DWORD pvContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnection( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnectionFromExternal( + DWORD DeviceObject, + DWORD FromString, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterPhysicalConnectionToExternal( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToString, + DWORD ToPin +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRegisterSubdevice( + DWORD DeviceObject, + DWORD SubdevName, + DWORD Unknown +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcRequestNewPowerState( + DWORD pDeviceObject, + DWORD RequestedNewState +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS STDCALL +PcUnregisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL; +} + _____ Added: trunk/reactos/drivers/dd/portcls.def --- trunk/reactos/drivers/dd/portcls.def 2005-11-24 00:21:42 UTC (rev 19509) +++ trunk/reactos/drivers/dd/portcls.def 2005-11-24 00:58:47 UTC (rev 19510) @@ -0,0 +1,36 @@ +; +; Exports definition file for portcls.sys +; +EXPORTS +PcAddAdapterDevice@20 +PcAddContentHandlers@12 +PcCompleteIrp@12 +PcCompletePendingPropertyRequest@8 +PcCreateContentMixed@12 +PcDestroyContent@4 +PcDispatchIrp@8 +PcForwardContentToDeviceObject@12 +PcForwardContentToFileObject@8 +PcForwardContentToInterface@12 +PcForwardIrpSynchronous@8 +PcGetContentRights@8 +PcGetDeviceProperty@20 +PcGetTimeInterval@8 +PcInitializeAdapterDriver@12 +PcNewDmaChannel@20 +PcNewInterruptSync@20 +PcNewMiniport@8 +PcNewPort@8 +PcNewRegistryKey@36 +PcNewResourceList@20 +PcNewResourceSublist@20 +PcNewServiceGroup@8 +PcRegisterAdapterPowerManagement@8 +PcRegisterIoTimeout@12 +PcRegisterPhysicalConnection@20 +PcRegisterPhysicalConnectionFromExternal@20 +PcRegisterPhysicalConnectionToExternal@20 +PcRegisterSubdevice@12 +PcRequestNewPowerState@8 +PcUnregisterIoTimeout@12 + _____ Added: trunk/reactos/drivers/dd/portcls.h --- trunk/reactos/drivers/dd/portcls.h 2005-11-24 00:21:42 UTC (rev 19509) +++ trunk/reactos/drivers/dd/portcls.h 2005-11-24 00:58:47 UTC (rev 19510) @@ -0,0 +1,252 @@ +/* + + Move to w32api when it is ready. + + */ +#ifndef _PORTCLS_H +#define _PORTCLS_H +#if __GNUC__ >=3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include <windef.h> +#include <ddk/ntddk.h> + +#define PORTCLASSAPI extern + +PORTCLASSAPI NTSTATUS STDCALL +PcAddAdapterDevice( + DWORD DriverObject, + DWORD PhysicalDeviceObject, + DWORD StartDevice, + DWORD MaxObjects, + DWORD DeviceExtensionSize +); + +PORTCLASSAPI NTSTATUS STDCALL +PcAddContentHandlers( + DWORD ContentId, + DWORD paHandlers, + DWORD NumHandlers +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCompleteIrp( + DWORD DeviceObject, + DWORD Irp, + DWORD Status +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCompletePendingPropertyRequest( + DWORD PropertyRequest, + DWORD NtStatus +); + +PORTCLASSAPI NTSTATUS STDCALL +PcCreateContentMixed( + DWORD paContentId, + DWORD cContentId, + DWORD pMixedContentId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcDestroyContent( + DWORD ContentId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcDispatchIrp( + DWORD DeviceObject, + DWORD Irp +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToDeviceObject( + DWORD ContentId, + DWORD Reserved, + DWORD DrmForward +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToFileObject( + DWORD ContentId, + DWORD FileObject +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardContentToInterface( + DWORD ContentId, + DWORD Unknown, + DWORD NumMethods +); + +PORTCLASSAPI NTSTATUS STDCALL +PcForwardIrpSynchronous( + DWORD DeviceObject, + DWORD Irp +); + +PORTCLASSAPI NTSTATUS STDCALL +PcGetContentRights( + DWORD ContentId, + DWORD DrmRights +); + +PORTCLASSAPI NTSTATUS STDCALL +PcGetDeviceProperty( + DWORD DeviceObject, + DWORD DeviceProperty, + DWORD BufferLength, + DWORD PropertyBuffer, + DWORD ResultLength +); + +PORTCLASSAPI ULONGLONG STDCALL +PcGetTimeInterval( + ULONGLONG Timei +); + +PORTCLASSAPI NTSTATUS STDCALL +PcInitializeAdapterDriver( + DWORD DriverObject, + DWORD RegistryPathName, + DWORD AddDevice +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewDmaChannel( + DWORD OutDmaChannel, + DWORD Unknown, + DWORD PoolType, + DWORD DeviceDescription, + DWORD DeviceObject +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewInterruptSync( + DWORD OutInterruptSync, + DWORD Unknown, + DWORD ResourceList, + DWORD ResourceIndex, + DWORD Mode +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewMiniport( + DWORD OutMiniport, + DWORD ClassId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewPort( + DWORD OutPort, + DWORD ClassId +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewRegistryKey( + DWORD OutRegistryKey, + DWORD Unknown, + DWORD RegistryKeyType, + DWORD DesiredAccess, + DWORD DeviceObject, + DWORD SubDevice, + DWORD ObjectAttributes, + DWORD CreateOptions, + DWORD Disposition +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewResourceList( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD TranslatedResources, + DWORD UntranslatedResources +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewResourceSublist( + DWORD OutResourceList, + DWORD Unknown, + DWORD PoolType, + DWORD ParentList, + DWORD MaximumEntries +); + +PORTCLASSAPI NTSTATUS STDCALL +PcNewServiceGroup( + DWORD OutServiceGroup, + DWORD Unknown +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterAdapterPowerManagement( + DWORD Unknown, + DWORD pvContext +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnection( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnectionFromExternal( + DWORD DeviceObject, + DWORD FromString, + DWORD FromPin, + DWORD ToUnknown, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterPhysicalConnectionToExternal( + DWORD DeviceObject, + DWORD FromUnknown, + DWORD FromPin, + DWORD ToString, + DWORD ToPin +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRegisterSubdevice( + DWORD DeviceObject, + DWORD SubdevName, + DWORD Unknown +); + +PORTCLASSAPI NTSTATUS STDCALL +PcRequestNewPowerState( + DWORD pDeviceObject, + DWORD RequestedNewState +); + +PORTCLASSAPI NTSTATUS STDCALL +PcUnregisterIoTimeout( + DWORD pDeviceObject, + DWORD pTimerRoutine, + DWORD pContext +); + +#ifdef __cplusplus +} +#endif + +#endif _____ Added: trunk/reactos/drivers/dd/portcls.rc --- trunk/reactos/drivers/dd/portcls.rc 2005-11-24 00:21:42 UTC (rev 19509) +++ trunk/reactos/drivers/dd/portcls.rc 2005-11-24 00:58:47 UTC (rev 19510) @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "PORTCLS Port Class Driver API\0" +#define REACTOS_STR_INTERNAL_NAME "portcls\0" +#define REACTOS_STR_ORIGINAL_FILENAME "portcls.sys\0" +#include <reactos/version.rc> _____ Added: trunk/reactos/drivers/dd/portcls.xml --- trunk/reactos/drivers/dd/portcls.xml 2005-11-24 00:21:42 UTC (rev 19509) +++ trunk/reactos/drivers/dd/portcls.xml 2005-11-24 00:58:47 UTC (rev 19510) @@ -0,0 +1,8 @@ +<module name="portcls" type="kernelmodedriver" installbase="system32/drivers" installname="portcls.sys"> + <importlibrary definition="portcls.def" /> + <define name="__USE_W32API" /> + <library>ntoskrnl</library> + <library>hal</library> + <file>portcls.c</file> + <file>portcls.rc</file> +</module>
19 years, 1 month
1
0
0
0
[gedmurphy] 19509: only display host info once when more than one adapter is present.
by gedmurphy@svn.reactos.com
only display host info once when more than one adapter is present. Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c _____ Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c --- trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-11-23 23:02:35 UTC (rev 19508) +++ trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-11-24 00:21:42 UTC (rev 19509) @@ -149,23 +149,25 @@ _tprintf(_T("\nReactOS IP Configuration\n\n")); + + if (bAll) + { + _tprintf(_T("\tHost Name . . . . . . . . . . . . : %s\n"), pFixedInfo->HostName); + _tprintf(_T("\tPrimary DNS Suffix. . . . . . . . : \n")); + _tprintf(_T("\tNode Type . . . . . . . . . . . . : %s\n"), GetNodeTypeName(pFixedInfo->NodeType)); + if (pFixedInfo->EnableRouting) + _tprintf(_T("\tIP Routing Enabled. . . . . . . . : Yes\n")); + else + _tprintf(_T("\tIP Routing Enabled. . . . . . . . : No\n")); + if (pAdapter->HaveWins) + _tprintf(_T("\tWINS Proxy enabled. . . . . . . . : Yes\n")); + else + _tprintf(_T("\tWINS Proxy enabled. . . . . . . . : No\n")); + _tprintf(_T("\tDNS Suffix Search List. . . . . . : %s\n"), pFixedInfo->DomainName); + } + while (pAdapter) { - if (bAll) - { - _tprintf(_T("\tHost Name . . . . . . . . . . . . : %s\n"), pFixedInfo->HostName); - _tprintf(_T("\tPrimary DNS Suffix. . . . . . . . : \n")); - _tprintf(_T("\tNode Type . . . . . . . . . . . . : %s\n"), GetNodeTypeName(pFixedInfo->NodeType)); - if (pFixedInfo->EnableRouting) - _tprintf(_T("\tIP Routing Enabled. . . . . . . . : Yes\n")); - else - _tprintf(_T("\tIP Routing Enabled. . . . . . . . : No\n")); - if (pAdapter->HaveWins) - _tprintf(_T("\tWINS Proxy enabled. . . . . . . . : Yes\n")); - else - _tprintf(_T("\tWINS Proxy enabled. . . . . . . . : No\n")); - _tprintf(_T("\tDNS Suffix Search List. . . . . . : %s\n"), pFixedInfo->DomainName); - } _tprintf(_T("\n%s ...... : \n\n"), GetInterfaceTypeName(pAdapter->Type));
19 years, 1 month
1
0
0
0
[weiden] 19508: added an initial mmsys.cpl. not added to the build system because w32api lacks a devguid.h
by weiden@svn.reactos.com
added an initial mmsys.cpl. not added to the build system because w32api lacks a devguid.h Modified: trunk/reactos/baseaddress.xml Added: trunk/reactos/lib/cpl/mmsys/ Added: trunk/reactos/lib/cpl/mmsys/En.rc Added: trunk/reactos/lib/cpl/mmsys/mmsys.c Added: trunk/reactos/lib/cpl/mmsys/mmsys.def Added: trunk/reactos/lib/cpl/mmsys/mmsys.h Added: trunk/reactos/lib/cpl/mmsys/mmsys.rc Added: trunk/reactos/lib/cpl/mmsys/mmsys.xml Added: trunk/reactos/lib/cpl/mmsys/resource.h Added: trunk/reactos/lib/cpl/mmsys/resources/ Added: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico _____ Modified: trunk/reactos/baseaddress.xml --- trunk/reactos/baseaddress.xml 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/baseaddress.xml 2005-11-23 23:02:35 UTC (rev 19508) @@ -4,6 +4,7 @@ <property name="BASEADDRESS_REGTESTS" value="0x07000000" /> <property name="BASEADDRESS_NOTIFYHOOK" value="0x08000000" /> <property name="BASEADDRESS_DEVENUM" value="0x35680000" /> +<property name="BASEADDRESS_MMSYS" value="0x588A0000" /> <property name="BASEADDRESS_UXTHEME" value="0x5AD70000" /> <property name="BASEADDRESS_VDMDBG" value="0x5B0D0000" /> <property name="BASEADDRESS_OBJSEL" value="0x5B400000" /> Property changes on: trunk/reactos/lib/cpl/mmsys ___________________________________________________________________ Name: svn:ignore + *.coff *.cpl *.d *.a *.o *.sym *.map *.tmp GNUmakefile _____ Added: trunk/reactos/lib/cpl/mmsys/En.rc --- trunk/reactos/lib/cpl/mmsys/En.rc 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/En.rc 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,14 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +IDD_HARDWARE DIALOGEX 0, 0, 246, 228 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg" +BEGIN +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Sound and Audio Devices" + IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the settings for your speakers and recording devices." +END \ No newline at end of file Property changes on: trunk/reactos/lib/cpl/mmsys/En.rc ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/mmsys.c --- trunk/reactos/lib/cpl/mmsys/mmsys.c 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/mmsys.c 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,187 @@ +/* + * ReactOS + * Copyright (C) 2005 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $ + * + * PROJECT: ReactOS Multimedia Control Panel + * FILE: lib/cpl/mmsys/mmsys.c + * PURPOSE: ReactOS Multimedia Control Panel + * PROGRAMMER: Thoams Weidenmueller <w3seek(a)reactos.com> + * UPDATE HISTORY: + * 2005/11/23 Created + */ +#include <windows.h> +#include <commctrl.h> +#include <initguid.h> +#include <cfgmgr32.h> +#include <setupapi.h> +#include <devguid.h> +#include <cpl.h> + +#include "mmsys.h" +#include "resource.h" + +HWND WINAPI +DeviceCreateHardwarePageEx(HWND hWndParent, + LPGUID lpGuids, + UINT uNumberOfGuids, + UINT Unknown); + +#define NUM_APPLETS (1) + + +HINSTANCE hApplet = 0; + +/* Applets */ +const APPLET Applets[NUM_APPLETS] = +{ + {IDI_CPLICON, IDS_CPLNAME, IDS_CPLDESCRIPTION, MmSysApplet}, +}; + +/* Hardware property page dialog callback */ +static INT_PTR CALLBACK +HardwareDlgProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + { + GUID Guids[] = { + GUID_DEVCLASS_CDROM, + GUID_DEVCLASS_MEDIA, + }; + + /* create the hardware page */ + DeviceCreateHardwarePageEx(hwndDlg, + Guids, + sizeof(Guids) / sizeof(Guids[0]), + 1); + break; + } + } + + return FALSE; +} + +LONG APIENTRY +MmSysApplet(HWND hwnd, + UINT uMsg, + LONG wParam, + LONG lParam) +{ + PROPSHEETPAGE psp[1]; + PROPSHEETHEADER psh = {0}; + TCHAR Caption[256]; + + LoadString(hApplet, + IDS_CPLNAME, + Caption, + sizeof(Caption) / sizeof(TCHAR)); + + psh.dwSize = sizeof(PROPSHEETHEADER); + psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE; + psh.hwndParent = NULL; + psh.hInstance = hApplet; + psh.hIcon = LoadIcon(hApplet, + MAKEINTRESOURCE(IDI_CPLICON)); + psh.pszCaption = Caption; + psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); + psh.nStartPage = 0; + psh.ppsp = psp; + + InitPropSheetPage(&psp[0], + IDD_HARDWARE, + HardwareDlgProc); + + return (LONG)(PropertySheet(&psh) != -1); +} + +VOID +InitPropSheetPage(PROPSHEETPAGE *psp, + WORD idDlg, + DLGPROC DlgProc) +{ + ZeroMemory(psp, sizeof(PROPSHEETPAGE)); + psp->dwSize = sizeof(PROPSHEETPAGE); + psp->dwFlags = PSP_DEFAULT; + psp->hInstance = hApplet; + psp->pszTemplate = MAKEINTRESOURCE(idDlg); + psp->pfnDlgProc = DlgProc; +} + + +/* Control Panel Callback */ +LONG CALLBACK +CPlApplet(HWND hwndCpl, + UINT uMsg, + LPARAM lParam1, + LPARAM lParam2) +{ + switch(uMsg) + { + case CPL_INIT: + return TRUE; + + case CPL_GETCOUNT: + return NUM_APPLETS; + + case CPL_INQUIRE: + { + CPLINFO *CPlInfo = (CPLINFO*)lParam2; + UINT uAppIndex = (UINT)lParam1; + + CPlInfo->lData = 0; + CPlInfo->idIcon = Applets[uAppIndex].idIcon; + CPlInfo->idName = Applets[uAppIndex].idName; + CPlInfo->idInfo = Applets[uAppIndex].idDescription; + break; + } + + case CPL_DBLCLK: + { + UINT uAppIndex = (UINT)lParam1; + Applets[uAppIndex].AppletProc(hwndCpl, + uMsg, + lParam1, + lParam2); + break; + } + } + + return FALSE; +} + + +BOOL STDCALL +DllMain(HINSTANCE hinstDLL, + DWORD dwReason, + LPVOID lpReserved) +{ + switch(dwReason) + { + case DLL_PROCESS_ATTACH: + hApplet = hinstDLL; + DisableThreadLibraryCalls(hinstDLL); + break; + } + + return TRUE; +} Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.c ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/mmsys.def --- trunk/reactos/lib/cpl/mmsys/mmsys.def 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/mmsys.def 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,6 @@ +LIBRARY mmsys.cpl + +EXPORTS +CPlApplet@16 + +; EOF Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.def ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/mmsys.h --- trunk/reactos/lib/cpl/mmsys/mmsys.h 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/mmsys.h 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,32 @@ +#ifndef __CPL_MMSYS_H +#define __CPL_MMSYS_H + +//typedef LONG (CALLBACK *APPLET_PROC)(VOID); + +typedef struct _APPLET +{ + UINT idIcon; + UINT idName; + UINT idDescription; + APPLET_PROC AppletProc; +} APPLET, *PAPPLET; + +extern HINSTANCE hApplet; + + +/* main.c */ + +VOID +InitPropSheetPage(PROPSHEETPAGE *psp, + WORD idDlg, + DLGPROC DlgProc); + +LONG APIENTRY +MmSysApplet(HWND hwnd, + UINT uMsg, + LONG wParam, + LONG lParam); + +#endif /* __CPL_MMSYS_H */ + +/* EOF */ Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.h ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/mmsys.rc --- trunk/reactos/lib/cpl/mmsys/mmsys.rc 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/mmsys.rc 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,13 @@ +#include <windows.h> +#include "resource.h" + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Multimedia Control Panel\0" +#define REACTOS_STR_INTERNAL_NAME "mmsys\0" +#define REACTOS_STR_ORIGINAL_FILENAME "mmsys.cpl\0" +#include <reactos/version.rc> + + +IDI_CPLICON ICON "resources/mmsys.ico" + +#include "En.rc" Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.rc ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/mmsys.xml --- trunk/reactos/lib/cpl/mmsys/mmsys.xml 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/mmsys.xml 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,16 @@ +<module name="mmsys" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MMSYS}" installbase="system32" installname="mmsys.cpl"> + <importlibrary definition="mmsys.def" /> + <include base="mmsys">.</include> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="__REACTOS__" /> + <define name="__USE_W32API" /> + <define name="_WIN32_IE">0x600</define> + <define name="_WIN32_WINNT">0x501</define> + <library>kernel32</library> + <library>user32</library> + <library>comctl32</library> + <library>devmgr</library> + <file>mmsys.c</file> + <file>mmsys.rc</file> +</module> Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.xml ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/resource.h --- trunk/reactos/lib/cpl/mmsys/resource.h 2005-11-23 22:16:21 UTC (rev 19507) +++ trunk/reactos/lib/cpl/mmsys/resource.h 2005-11-23 23:02:35 UTC (rev 19508) @@ -0,0 +1,15 @@ +#ifndef __CPL_RESOURCE_H +#define __CPL_RESOURCE_H + + +#define IDI_CPLICON 1 + +#define IDD_HARDWARE 100 + +#define IDS_CPLNAME 1000 +#define IDS_CPLDESCRIPTION 1001 + + +#endif /* __CPL_RESOURCE_H */ + +/* EOF */ Property changes on: trunk/reactos/lib/cpl/mmsys/resource.h ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico (Binary files differ) Property changes on: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
19 years, 1 month
1
0
0
0
[hbirr] 19507: Used the size of the data cell instead of the previous data length to check if enough space is available (in NtSetValueKey).
by hbirr@svn.reactos.com
Used the size of the data cell instead of the previous data length to check if enough space is available (in NtSetValueKey). Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c _____ Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c --- trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-11-23 22:10:30 UTC (rev 19506) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-11-23 22:16:21 UTC (rev 19507) @@ -1902,10 +1902,10 @@ BLOCK_OFFSET ValueCellOffset; PDATA_CELL DataCell; PDATA_CELL NewDataCell; - PHBIN pBin; ULONG DesiredAccess; REG_SET_VALUE_KEY_INFORMATION SetValueKeyInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo; + ULONG DataCellSize; PAGED_CODE(); @@ -1979,14 +1979,25 @@ DPRINT("ValueCell %p\n", ValueCell); DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize); + if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) && + (ValueCell->DataSize & REG_DATA_SIZE_MASK) != 0) + { + DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset, NULL); + DataCellSize = (DataCell->CellSize < 0 ? -DataCell->CellSize : DataCell->CellSize) - sizeof(CELL_HEADER); + } + else + { + DataCell = NULL; + DataCellSize = 0; + } + + if (DataSize <= sizeof(BLOCK_OFFSET)) { /* If data size <= sizeof(BLOCK_OFFSET) then store data in the data offset */ DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize); - if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) && - (ValueCell->DataSize & REG_DATA_SIZE_MASK) != 0) + if (DataCell) { - DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset, NULL); CmiDestroyCell(RegistryHive, DataCell, ValueCell->DataOffset); } @@ -1995,59 +2006,47 @@ ValueCell->DataType = Type; CmiMarkBlockDirty(RegistryHive, ValueCellOffset); } - else if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) && - (DataSize <= (ValueCell->DataSize & REG_DATA_SIZE_MASK))) + else { - /* If new data size is <= current then overwrite current data */ - DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset,&pBin); - RtlZeroMemory(DataCell->Data, ValueCell->DataSize); - RtlCopyMemory(DataCell->Data, Data, DataSize); - ValueCell->DataSize = DataSize; - ValueCell->DataType = Type; - CmiMarkBlockDirty(RegistryHive, ValueCell->DataOffset); - CmiMarkBlockDirty(RegistryHive, ValueCellOffset); - } - else - { - /* - * New data size is larger than the current, destroy current - * data block and allocate a new one. - */ - BLOCK_OFFSET NewOffset; + if (DataSize > DataCellSize) + { + /* + * New data size is larger than the current, destroy current + * data block and allocate a new one. + */ + BLOCK_OFFSET NewOffset; - DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize); + DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize); - if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) && - (ValueCell->DataSize & REG_DATA_SIZE_MASK) != 0) - { - DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset, NULL); - CmiDestroyCell(RegistryHive, DataCell, ValueCell->DataOffset); - ValueCell->DataSize = 0; - ValueCell->DataType = 0; - ValueCell->DataOffset = (BLOCK_OFFSET)-1; - } + Status = CmiAllocateCell (RegistryHive, + sizeof(CELL_HEADER) + DataSize, + (PVOID *)&NewDataCell, + &NewOffset); + if (!NT_SUCCESS(Status)) + { + DPRINT("CmiAllocateBlock() failed (Status %lx)\n", Status); - Status = CmiAllocateCell (RegistryHive, - sizeof(CELL_HEADER) + DataSize, - (PVOID *)&NewDataCell, - &NewOffset); - if (!NT_SUCCESS(Status)) - { - DPRINT("CmiAllocateBlock() failed (Status %lx)\n", Status); + ExReleaseResourceLite(&CmiRegistryLock); + KeLeaveCriticalRegion(); + PostOperationInfo.Status = Status; + CmiCallRegisteredCallbacks(RegNtPostSetValueKey, &PostOperationInfo); + ObDereferenceObject(KeyObject); - ExReleaseResourceLite(&CmiRegistryLock); - KeLeaveCriticalRegion(); - PostOperationInfo.Status = Status; - CmiCallRegisteredCallbacks(RegNtPostSetValueKey, &PostOperationInfo); - ObDereferenceObject(KeyObject); + return Status; + } - return Status; - } + if (DataCell) + { + CmiDestroyCell(RegistryHive, DataCell, ValueCell->DataOffset); + } - RtlCopyMemory(&NewDataCell->Data[0], Data, DataSize); + ValueCell->DataOffset = NewOffset; + DataCell = NewDataCell; + } + + RtlCopyMemory(DataCell->Data, Data, DataSize); ValueCell->DataSize = DataSize & REG_DATA_SIZE_MASK; ValueCell->DataType = Type; - ValueCell->DataOffset = NewOffset; CmiMarkBlockDirty(RegistryHive, ValueCell->DataOffset); CmiMarkBlockDirty(RegistryHive, ValueCellOffset); }
19 years, 1 month
1
0
0
0
[hbirr] 19506: Get the cursor keys on the numpad working (patch by tinus).
by hbirr@svn.reactos.com
Get the cursor keys on the numpad working (patch by tinus). Modified: trunk/reactos/subsys/system/usetup/keytrans.c _____ Modified: trunk/reactos/subsys/system/usetup/keytrans.c --- trunk/reactos/subsys/system/usetup/keytrans.c 2005-11-23 22:01:38 UTC (rev 19505) +++ trunk/reactos/subsys/system/usetup/keytrans.c 2005-11-23 22:10:30 UTC (rev 19506) @@ -53,11 +53,11 @@ VK_F2, VK_F3, VK_F4, VK_F5, /* 0x40 */ VK_F6, VK_F7, VK_F8, VK_F9, - VK_F10, VK_NUMLOCK, VK_SCROLL, VK_NUMPAD7, - VK_NUMPAD8, VK_NUMPAD9, VK_SUBTRACT, VK_NUMPAD4, - VK_NUMPAD5, VK_NUMPAD6, VK_ADD, VK_NUMPAD1, + VK_F10, VK_NUMLOCK, VK_SCROLL, VK_HOME, + VK_UP, VK_PRIOR, VK_SUBTRACT, VK_LEFT, + 0, VK_RIGHT, VK_ADD, VK_END, /* 0x50 */ - VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD0, VK_SEPARATOR, + VK_DOWN, VK_NEXT, VK_INSERT, VK_DELETE, 0, 0, 0, VK_F11, VK_F12, 0, 0, 0, 0, 0, 0, 0, @@ -116,6 +116,56 @@ 0, 0, 0, 0 }; +/* + * Note how the keyboard lights are not handled, so while NUMLOCK_ON can + * be on, the light will never be. If this starts to be a problem it can be + * fixed, but it's too much work for too little gain to do now. + * Look in win32k/ntuser/input.c for an example. + */ + +static WORD KeyTableNumlock[] = { +/* 0x00 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x10 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x20 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x30 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x40 */ + 0, 0, 0, 0, + 0, 0, 0, VK_NUMPAD7, + VK_NUMPAD8, VK_NUMPAD9, 0, VK_NUMPAD4, + VK_NUMPAD5, VK_NUMPAD6, 0, VK_NUMPAD1, +/* 0x50 */ + VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x60 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 0x70 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0 +}; + typedef struct _SCANTOASCII { USHORT ScanCode; USHORT Enhanced; @@ -225,6 +275,11 @@ Value = LEFT_ALT_PRESSED; break; + case 0x45: + Value = NUMLOCK_ON; + if (!(InputData->Flags & KEY_BREAK)) + *State ^= Value; + return; default: return; } @@ -253,6 +308,12 @@ IntVKFromKbdInput(PKEYBOARD_INPUT_DATA InputData, DWORD KeyState) { if (!(KeyState & ENHANCED_KEY)) { + if ((KeyState & NUMLOCK_ON) && + KeyTableNumlock[InputData->MakeCode & 0x7f]) { + DPRINT("Numlock, using %x\n", + InputData->MakeCode & 0x7f); + return KeyTableNumlock[InputData->MakeCode & 0x7f]; + } DPRINT("Not enhanced, using %x\n", InputData->MakeCode & 0x7f); return KeyTable[InputData->MakeCode & 0x7f]; }
19 years, 1 month
1
0
0
0
[hbirr] 19505: Use the correct read length in ConReadConsoleInput.
by hbirr@svn.reactos.com
Use the correct read length in ConReadConsoleInput. Modified: trunk/reactos/subsys/system/usetup/console.c _____ Modified: trunk/reactos/subsys/system/usetup/console.c --- trunk/reactos/subsys/system/usetup/console.c 2005-11-23 21:59:34 UTC (rev 19504) +++ trunk/reactos/subsys/system/usetup/console.c 2005-11-23 22:01:38 UTC (rev 19505) @@ -199,8 +199,7 @@ NULL, &Iosb, &InputData, -// &Buffer->Event.KeyEvent, - sizeof(KEY_EVENT_RECORD), + sizeof(KEYBOARD_INPUT_DATA), NULL, 0);
19 years, 1 month
1
0
0
0
[hbirr] 19504: Don't return from inside an exception handler.
by hbirr@svn.reactos.com
Don't return from inside an exception handler. Modified: trunk/reactos/subsys/win32k/ntuser/message.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/message.c --- trunk/reactos/subsys/win32k/ntuser/message.c 2005-11-23 21:19:00 UTC (rev 19503) +++ trunk/reactos/subsys/win32k/ntuser/message.c 2005-11-23 21:59:34 UTC (rev 19504) @@ -113,24 +113,25 @@ CREATESTRUCTW *Cs; PUNICODE_STRING WindowName; PUNICODE_STRING ClassName; - UINT Size; + UINT Size = 0; - _SEH_TRY { + _SEH_TRY + { if (MMS_SIZE_WPARAM == MsgMemoryEntry->Size) - { - return (UINT) wParam; + { + Size = (UINT)wParam; } else if (MMS_SIZE_WPARAMWCHAR == MsgMemoryEntry->Size) - { - return (UINT) (wParam * sizeof(WCHAR)); + { + Size = (UINT) (wParam * sizeof(WCHAR)); } else if (MMS_SIZE_LPARAMSZ == MsgMemoryEntry->Size) - { - return (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR)); + { + Size = (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR)); } else if (MMS_SIZE_SPECIAL == MsgMemoryEntry->Size) - { - switch(MsgMemoryEntry->Message) + { + switch(MsgMemoryEntry->Message) { case WM_CREATE: case WM_NCCREATE: @@ -146,31 +147,34 @@ { Size += sizeof(WCHAR) + ClassName->Length + sizeof(WCHAR); } - return Size; break; case WM_NCCALCSIZE: - return wParam ? sizeof(NCCALCSIZE_PARAMS) + sizeof(WINDOWPOS) : sizeof(RECT); + Size = wParam ? sizeof(NCCALCSIZE_PARAMS) + sizeof(WINDOWPOS) : sizeof(RECT); break; case WM_COPYDATA: - return sizeof(COPYDATASTRUCT) + ((PCOPYDATASTRUCT)lParam)->cbData; + Size = sizeof(COPYDATASTRUCT) + ((PCOPYDATASTRUCT)lParam)->cbData; + break; default: assert(FALSE); - return 0; + Size = 0; break; } } else { - return MsgMemoryEntry->Size; + Size = MsgMemoryEntry->Size; } - } _SEH_HANDLE { - + } + _SEH_HANDLE + { DPRINT1("Exception caught in MsgMemorySize()! Status: 0x%x\n", _SEH_GetExceptionCode()); - } _SEH_END; - return 0; + Size = 0; + } + _SEH_END; + return Size; } static FASTCALL NTSTATUS
19 years, 1 month
1
0
0
0
[hbirr] 19503: Fixed FormatMessageA/W.
by hbirr@svn.reactos.com
Fixed FormatMessageA/W. Modified: trunk/reactos/lib/kernel32/misc/errormsg.c _____ Modified: trunk/reactos/lib/kernel32/misc/errormsg.c --- trunk/reactos/lib/kernel32/misc/errormsg.c 2005-11-23 21:17:11 UTC (rev 19502) +++ trunk/reactos/lib/kernel32/misc/errormsg.c 2005-11-23 21:19:00 UTC (rev 19503) @@ -267,18 +267,19 @@ else argliststart=(*(DWORD**)args)+insertnr-1; - /* FIXME: precision and width components are not handled correctly */ - if ( (strcmp(fmtstr, "%ls") == 0) || (strcmp(fmtstr,"%S") == 0) ) { - sz = WideCharToMultiByte( CP_ACP, 0, *(WCHAR**)argliststart, -1, NULL, 0, NULL, NULL); + b = NULL; + sz = 0; + do { + if (b) { + HeapFree(GetProcessHeap(), 0, b); + } + sz += 256; b = HeapAlloc(GetProcessHeap(), 0, sz); - WideCharToMultiByte( CP_ACP, 0, *(WCHAR**)argliststart, -1, b, sz, NULL, NULL); - } else { - b = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz = 1000); /* CMF - This makes a BIG assumption about va_list */ - TRACE("A BIG assumption\n"); - _vsnprintf(b, sz, fmtstr, (va_list) argliststart); - } - for (x=b; *x; x++) ADD_TO_T(*x); + } while (0 > _vsnprintf(b, sz, fmtstr, (va_list) argliststart)); + x=b; + while(*x) + ADD_TO_T(*x++); HeapFree(GetProcessHeap(),0,b); } else { @@ -378,7 +379,7 @@ #if defined(__i386__) || defined(__sparc__) /* This implementation is completely dependent on the format of the va_list on x86 CPUs */ LPWSTR target,t; - DWORD talloced; + DWORD talloced,len; LPWSTR from,f; DWORD width = dwFlags & FORMAT_MESSAGE_MAX_WIDTH_MASK; BOOL eos = FALSE; @@ -411,6 +412,7 @@ return 0; } } + target = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 100 * sizeof(WCHAR) ); t = target; talloced= 100; @@ -434,10 +436,11 @@ while (*f && !eos) { if (*f=='%') { int insertnr; - WCHAR *fmtstr,*sprintfbuf,*x; + WCHAR *fmtstr,*sprintfbuf,*x,*lastf; DWORD *argliststart; fmtstr = NULL; + lastf = f; f++; if (!*f) { ADD_TO_T('%'); @@ -477,32 +480,38 @@ fmtstr = HeapAlloc( GetProcessHeap(),0,3*sizeof(WCHAR)); strcpyW( fmtstr, FMTWSTR ); } - if (dwFlags & FORMAT_MESSAGE_ARGUMENT_ARRAY) - argliststart=args+insertnr-1; - else - argliststart=(*(DWORD**)args)+insertnr-1; - if (fmtstr[strlenW(fmtstr)-1]=='s' && argliststart[0]) { - DWORD xarr[3]; + if (args) { + if (dwFlags & FORMAT_MESSAGE_ARGUMENT_ARRAY) + argliststart=args+insertnr-1; + else + argliststart=(*(DWORD**)args)+insertnr-1; - xarr[0]=*(argliststart+0); - /* possible invalid pointers */ - xarr[1]=*(argliststart+1); - xarr[2]=*(argliststart+2); - sprintfbuf=HeapAlloc(GetProcessHeap(),0,(strlenW((LPWSTR)argliststart[0] )*2+1)*sizeof(WCHAR)); - /* CMF - This makes a BIG assumption about va_list */ - _vsnwprintf(sprintfbuf,(strlenW((LPWSTR)argliststart[0])*2+1)*sizeof(WCH AR), fmtstr, (va_list) xarr); + len = 0; + sprintfbuf = NULL; + do { + if (sprintfbuf) { + HeapFree(GetProcessHeap(),0,sprintfbuf); + } + len += 256; + sprintfbuf=HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); + /* CMF - This makes a BIG assumption about va_list */ + } while (0 > _vsnwprintf(sprintfbuf, len, fmtstr, (va_list) argliststart)); + x=sprintfbuf; + while (*x) { + ADD_TO_T(*x++); + } + HeapFree(GetProcessHeap(),0,sprintfbuf); + } else { - sprintfbuf=HeapAlloc(GetProcessHeap(),0,100); + /* NULL args - copy formatstr + * (probably wrong) + */ + while ((lastf<f)&&(*lastf)) { + ADD_TO_T(*lastf++); + } + } - /* CMF - This makes a BIG assumption about va_list */ - _vsnwprintf(sprintfbuf,(strlenW((LPWSTR)argliststart[0])*2+1)*sizeof(WCH AR), fmtstr, (va_list) argliststart); - } - x=sprintfbuf; - while (*x) { - ADD_TO_T(*x++); - } - HeapFree(GetProcessHeap(),0,sprintfbuf); HeapFree(GetProcessHeap(),0,fmtstr); break; case 'n':
19 years, 1 month
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200