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
February 2012
----- 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
22 participants
577 discussions
Start a n
N
ew thread
[janderwald] 55567: [USBEHCI] - Print capabilities
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 12 17:50:31 2012 New Revision: 55567 URL:
http://svn.reactos.org/svn/reactos?rev=55567&view=rev
Log: [USBEHCI] - Print capabilities Modified: branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp [iso-8859-1] Sun Feb 12 17:50:31 2012 @@ -89,6 +89,7 @@ // local BOOLEAN InterruptService(); + VOID PrintCapabilities(); // friend function friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext); @@ -292,6 +293,49 @@ WRITE_REGISTER_ULONG((PULONG)((ULONG)m_Base + Offset), Value); } +VOID +CUSBHardwareDevice::PrintCapabilities() +{ + if (m_Capabilities.HCSParams.PortPowerControl) + { + DPRINT1("Controler EHCI has Port Power Control\n"); + } + + DPRINT1("Controller Port Routing Rules %d\n", m_Capabilities.HCSParams.PortRouteRules); + DPRINT1("Number of Ports per Companion Controller %d\n", m_Capabilities.HCSParams.PortPerCHC); + DPRINT1("Number of Companion Controller %d\n", m_Capabilities.HCSParams.CHCCount); + + if (m_Capabilities.HCSParams.PortIndicator) + { + DPRINT1("Controller has Port Indicators Support\n"); + } + + if (m_Capabilities.HCSParams.DbgPortNum) + { + DPRINT1("Controller has Debug Port Support At Port %x\n", m_Capabilities.HCSParams.DbgPortNum); + } + + if (m_Capabilities.HCCParams.EECPCapable) + { + DPRINT1("Controller has Extended Capabilities Support\n"); + } + + if (m_Capabilities.HCCParams.ParkMode) + { + DPRINT1("Controller supports Asynchronous Schedule Park\n"); + } + + if (m_Capabilities.HCCParams.VarFrameList) + { + DPRINT1("Controller supports Programmable Frame List Size\n"); + } + + if (m_Capabilities.HCCParams.CurAddrBits) + { + DPRINT1("Controller uses 64-Bit Addressing\n"); + } +} + NTSTATUS CUSBHardwareDevice::PnpStart( PCM_RESOURCE_LIST RawResources, @@ -368,31 +412,15 @@ m_Capabilities.HCCParamsLong = READ_REGISTER_ULONG((PULONG)((ULONG)ResourceBase + EHCI_HCCPARAMS)); DPRINT1("Controller has %d Length\n", m_Capabilities.Length); - DPRINT1("Controller has %d Ports\n", m_Capabilities.HCSParams.PortCount); DPRINT1("Controller EHCI Version %x\n", m_Capabilities.HCIVersion); DPRINT1("Controler EHCI Caps HCSParamsLong %x\n", m_Capabilities.HCSParamsLong); DPRINT1("Controler EHCI Caps HCCParamsLong %x\n", m_Capabilities.HCCParamsLong); - DPRINT1("Controler EHCI Caps PowerControl %x\n", m_Capabilities.HCSParams.PortPowerControl); - - if (m_Capabilities.HCCParams.EECPCapable) - { - DPRINT1("Controller has Extended Capabilities Support\n"); - } - - if (m_Capabilities.HCCParams.ParkMode) - { - DPRINT1("Controller supports Asynchronous Schedule Park\n"); - } - - if (m_Capabilities.HCCParams.VarFrameList) - { - DPRINT1("Controller supports Programmable Frame List Size\n"); - } - - if (m_Capabilities.HCCParams.CurAddrBits) - { - DPRINT1("Controller uses 64-Bit Addressing\n"); - } + DPRINT1("Controller has %d Ports\n", m_Capabilities.HCSParams.PortCount); + + // + // print capabilities + // + PrintCapabilities(); if (m_Capabilities.HCSParams.PortRouteRules) {
12 years, 10 months
1
0
0
0
[janderwald] 55566: [HIDPARSER] - Fix build
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 12 16:59:55 2012 New Revision: 55566 URL:
http://svn.reactos.org/svn/reactos?rev=55566&view=rev
Log: [HIDPARSER] - Fix build Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/lib/drivers/h…
============================================================================== --- branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h [iso-8859-1] Sun Feb 12 16:59:55 2012 @@ -15,7 +15,6 @@ #include <ntddk.h> #include <hidpddi.h> #include <hidpi.h> -#define NDEBUG #include <debug.h> //
12 years, 10 months
1
0
0
0
[janderwald] 55564: [USBEHCI] - Add 64-bit data structures - Print message when controller is using 64-Bit Addressing - Should fix Host System Error when controller is operating in 64-Bit mode
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 12 16:10:58 2012 New Revision: 55564 URL:
http://svn.reactos.org/svn/reactos?rev=55564&view=rev
Log: [USBEHCI] - Add 64-bit data structures - Print message when controller is using 64-Bit Addressing - Should fix Host System Error when controller is operating in 64-Bit mode Modified: branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.h Modified: branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.cpp [iso-8859-1] Sun Feb 12 16:10:58 2012 @@ -374,6 +374,26 @@ DPRINT1("Controler EHCI Caps HCCParamsLong %x\n", m_Capabilities.HCCParamsLong); DPRINT1("Controler EHCI Caps PowerControl %x\n", m_Capabilities.HCSParams.PortPowerControl); + if (m_Capabilities.HCCParams.EECPCapable) + { + DPRINT1("Controller has Extended Capabilities Support\n"); + } + + if (m_Capabilities.HCCParams.ParkMode) + { + DPRINT1("Controller supports Asynchronous Schedule Park\n"); + } + + if (m_Capabilities.HCCParams.VarFrameList) + { + DPRINT1("Controller supports Programmable Frame List Size\n"); + } + + if (m_Capabilities.HCCParams.CurAddrBits) + { + DPRINT1("Controller uses 64-Bit Addressing\n"); + } + if (m_Capabilities.HCSParams.PortRouteRules) { Count = 0; Modified: branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci/hardware.h [iso-8859-1] Sun Feb 12 16:10:58 2012 @@ -145,14 +145,15 @@ ULONG DWord; } Token; ULONG BufferPointer[5]; - + ULONG ExtendedBufferPointer[5]; + //Software ULONG PhysicalAddr; LIST_ENTRY DescriptorEntry; ULONG TotalBytesToTransfer; } QUEUE_TRANSFER_DESCRIPTOR, *PQUEUE_TRANSFER_DESCRIPTOR; -C_ASSERT(FIELD_OFFSET(QUEUE_TRANSFER_DESCRIPTOR, PhysicalAddr) == 0x20); +C_ASSERT(FIELD_OFFSET(QUEUE_TRANSFER_DESCRIPTOR, PhysicalAddr) == 0x34); // // EndPointSpeeds Flags and END_POINT_CHARACTERISTICS @@ -212,6 +213,7 @@ ULONG DWord; } Token; ULONG BufferPointer[5]; + ULONG ExtendedBufferPointer[5]; //Software ULONG PhysicalAddr; @@ -231,7 +233,7 @@ C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, AlternateNextPointer) == 0x14); C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, Token) == 0x18); C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, BufferPointer) == 0x1C); -C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, PhysicalAddr) == 0x30); +C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, PhysicalAddr) == 0x44); //
12 years, 10 months
1
0
0
0
[pschweitzer] 55563: [PSDK] Add mmcobj.idl
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 12 14:50:03 2012 New Revision: 55563 URL:
http://svn.reactos.org/svn/reactos?rev=55563&view=rev
Log: [PSDK] Add mmcobj.idl Added: branches/iut-mmc/include/psdk/mmcobj.idl (with props) Modified: branches/iut-mmc/include/psdk/CMakeLists.txt branches/iut-mmc/include/psdk/psdk.rbuild Modified: branches/iut-mmc/include/psdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/CMakeLists…
============================================================================== --- branches/iut-mmc/include/psdk/CMakeLists.txt [iso-8859-1] (original) +++ branches/iut-mmc/include/psdk/CMakeLists.txt [iso-8859-1] Sun Feb 12 14:50:03 2012 @@ -47,6 +47,7 @@ mimeole.idl mlang.idl mmc.idl + mmcobj.idl mscoree.idl msctf.idl msdadc.idl Added: branches/iut-mmc/include/psdk/mmcobj.idl URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/mmcobj.idl…
============================================================================== --- branches/iut-mmc/include/psdk/mmcobj.idl (added) +++ branches/iut-mmc/include/psdk/mmcobj.idl [iso-8859-1] Sun Feb 12 14:50:03 2012 @@ -1,0 +1,764 @@ +cpp_quote("#ifndef MMC_VER") +cpp_quote("#define MMC_VER 0x0200") +cpp_quote("#endif") + +cpp_quote("#if (MMC_VER >= 0x0200)") + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +#endif + +interface _Application; +interface Column; +interface Columns; +interface ContextMenu; +interface Document; +interface Frame; +interface ISnapinProperties; +interface ISnapinPropertiesCallback; +interface MenuItem; +interface Node; +interface Nodes; +interface Properties; +interface Property; +interface ScopeNamespace; +interface SnapIn; +interface SnapIns; +interface Extension; +interface Extensions; +interface View; +interface Views; + +typedef _Application* PAPPLICATION; +typedef _Application** PPAPPLICATION; +typedef Column* PCOLUMN; +typedef Column** PPCOLUMN; +typedef Columns* PCOLUMNS; +typedef Columns** PPCOLUMNS; +typedef ContextMenu* PCONTEXTMENU; +typedef ContextMenu** PPCONTEXTMENU; +typedef Document* PDOCUMENT; +typedef Document** PPDOCUMENT; +typedef Frame* PFRAME; +typedef Frame** PPFRAME; +typedef MenuItem* PMENUITEM; +typedef MenuItem** PPMENUITEM; +typedef Node* PNODE; +typedef Node** PPNODE; +typedef Nodes* PNODES; +typedef Nodes** PPNODES; +typedef Properties* PPROPERTIES; +typedef Properties** PPPROPERTIES; +typedef Property* PPROPERTY; +typedef Property** PPPROPERTY; +typedef ScopeNamespace* PSCOPENAMESPACE; +typedef ScopeNamespace** PPSCOPENAMESPACE; +typedef SnapIn* PSNAPIN; +typedef SnapIn** PPSNAPIN; +typedef SnapIns* PSNAPINS; +typedef SnapIns** PPSNAPINS; +typedef Extension* PEXTENSION; +typedef Extension** PPEXTENSION; +typedef Extensions* PEXTENSIONS; +typedef Extensions** PPEXTENSIONS; +typedef View* PVIEW; +typedef View** PPVIEW; +typedef Views* PVIEWS; +typedef Views** PPVIEWS; +typedef ISnapinProperties* LPSNAPINPROPERTIES; +typedef ISnapinPropertiesCallback* LPSNAPINPROPERTIESCALLBACK; + +typedef BOOL* PBOOL; +typedef int* PINT; +typedef BSTR* PBSTR; +typedef VARIANT* PVARIANT; +typedef long* PLONG; +typedef IDispatch* PDISPATCH; +typedef IDispatch** PPDISPATCH; + +[ + object, + uuid(F7889DA9-4A02-4837-BF89-1A6F2A021010), + pointer_default(unique) +] +interface ISnapinProperties : IUnknown +{ + typedef enum _MMC_PROPERTY_ACTION + { + MMC_PROPACT_DELETING = 1, + MMC_PROPACT_CHANGING, + MMC_PROPACT_INITIALIZED + } MMC_PROPERTY_ACTION; + + typedef struct _MMC_SNAPIN_PROPERTY + { + LPCOLESTR pszPropName; + VARIANT varValue; + MMC_PROPERTY_ACTION eAction; + } MMC_SNAPIN_PROPERTY; + + HRESULT Initialize([in] Properties* pProperties); + HRESULT QueryPropertyNames([in] ISnapinPropertiesCallback* pCallback); + HRESULT PropertiesChanged([in] long cProperties, [in, size_is(cProperties)] MMC_SNAPIN_PROPERTY* pProperties); +}; + +[ + object, + uuid(A50FA2E5-7E61-45EB-A8D4-9A07B3E851A8), + pointer_default(unique) +] +interface ISnapinPropertiesCallback : IUnknown +{ + const DWORD MMC_PROP_CHANGEAFFECTSUI = 0x00000001; + const DWORD MMC_PROP_MODIFIABLE = 0x00000002; + const DWORD MMC_PROP_REMOVABLE = 0x00000004; + const DWORD MMC_PROP_PERSIST = 0x00000008; + + HRESULT AddPropertyName([in] LPCOLESTR pszPropName, [in] DWORD dwFlags); +}; + +[ + uuid(8E80422B-CAC4-472b-B272-9635F1DFEF3B), + version(1.0) +] +library MMC20 +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + typedef enum DocumentMode + { + DocumentMode_Author, + DocumentMode_User, + DocumentMode_User_MDI, + DocumentMode_User_SDI + } _DocumentMode; + typedef enum DocumentMode DOCUMENTMODE; + typedef enum DocumentMode *PDOCUMENTMODE; + typedef enum DocumentMode **PPDOCUMENTMODE; + + typedef enum ListViewMode + { + ListMode_Small_Icons, + ListMode_Large_Icons, + ListMode_List, + ListMode_Detail, + ListMode_Filtered + } _ListViewMode; + typedef enum ListViewMode LISTVIEWMODE; + typedef enum ListViewMode *PLISTVIEWMODE; + typedef enum ListViewMode **PPLISTVIEWMODE; + + typedef enum ViewOptions + { + ViewOption_Default = 0x0000, + ViewOption_ScopeTreeHidden = 0x0001, + ViewOption_NoToolBars = 0x0002, + ViewOption_NotPersistable = 0x0004, + ViewOption_ActionPaneHidden = 0x0008 + } _ViewOptions; + typedef enum ViewOptions VIEWOPTIONS; + typedef enum ViewOptions *PVIEWOPTIONS; + typedef enum ViewOptions **PPVIEWOPTIONS; + + typedef enum ExportListOptions + { + ExportListOptions_Default = 0x0000, + ExportListOptions_Unicode = 0x0001, + ExportListOptions_TabDelimited = 0x0002, + ExportListOptions_SelectedItemsOnly = 0x0004 + } _ExportListOptions; + typedef enum ExportListOptions EXPORTLISTOPTIONS; + + [ + oleautomation, + dual, + nonextensible, + uuid(A3AFB9CC-B653-4741-86AB-F0470EC1384C) , + dual + ] + interface _Application : IDispatch + { + [id(2)] + void Help(); + [id(3)] + void Quit(); + [id(4)] + HRESULT Document([out,retval] PPDOCUMENT Document); + [id(5)] + HRESULT Load([in] BSTR Filename); + [id(6)] + HRESULT Frame([out, retval] PPFRAME Frame); + [id(7)] + HRESULT Visible([out, retval] PBOOL Visible); + [id(8)] + HRESULT Show(); + [id(9)] + HRESULT Hide(); + [id(10), propget] + HRESULT UserControl([out, retval] PBOOL UserControl); + [id(10), propput] + HRESULT UserControl([in] BOOL UserControl); + [id(11), propget] + HRESULT VersionMajor([out, retval] PLONG VersionMajor); + [id(12), propget] + HRESULT VersionMinor([out, retval] PLONG VersionMinor); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(DE46CBDD-53F5-4635-AF54-4FE71E923D3F), + dual + ] + interface _AppEvents : IDispatch + { + [id(1)] + HRESULT OnQuit([in] PAPPLICATION Application); + [id(2)] + HRESULT OnDocumentOpen([in] PDOCUMENT Document, [in] BOOL New); + [id(3)] + HRESULT OnDocumentClose([in] PDOCUMENT Document); + [id(4)] + HRESULT OnSnapInAdded([in] PDOCUMENT Document, [in] PSNAPIN SnapIn); + [id(5)] + HRESULT OnSnapInRemoved([in] PDOCUMENT Document, [in] PSNAPIN SnapIn); + [id(6)] + HRESULT OnNewView([in] PVIEW View); + [id(7)] + HRESULT OnViewClose([in] PVIEW View); + [id(8)] + HRESULT OnViewChange([in] PVIEW View, [in] PNODE NewOwnerNode); + [id(9)] + HRESULT OnSelectionChange([in] PVIEW View, [in] PNODES NewNodes); + [id(11)] + HRESULT OnContextMenuExecuted([in] PMENUITEM MenuItem); + [id(12)] + HRESULT OnToolbarButtonClicked(); + [id(13)] + HRESULT OnListUpdated([in] PVIEW View); + }; + + [ + uuid(FC7A4252-78AC-4532-8C5A-563CFE138863) + ] + dispinterface AppEvents + { + interface _AppEvents; + }; + + [ + uuid(49B2791A-B1AE-4C90-9B8E-E860BA07F889) + ] + coclass Application + { + [default] interface _Application; + [default, source] dispinterface AppEvents; + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(C0BCCD30-DE44-4528-8403-A05A6A1CC8EA) , + dual + ] + interface _EventConnector : IDispatch + { + [id(1)] + HRESULT ConnectTo([in] PAPPLICATION Application); + [id(2)] + HRESULT Disconnect(); + }; + + [ + uuid(ADE6444B-C91F-4e37-92A4-5BB430A33340), + ] + coclass AppEventsDHTMLConnector + { + [default] interface _EventConnector; + [default, source] dispinterface AppEvents; + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(E5E2D970-5BB3-4306-8804-B0968A31C8E6), + dual + ] + + interface Frame : IDispatch + { + [id(1)] + HRESULT Maximize(); + [id(2)] + HRESULT Minimize(); + [id(3)] + HRESULT Restore(); + [id(4), propget] + HRESULT Top([out, retval] PINT Top); + [id(4), propput] + HRESULT Top([in] int top); + [id(5), propget] + HRESULT Bottom([out, retval] PINT Bottom); + [id(5), propput] + HRESULT Bottom([in] int bottom); + [id(6), propget] + HRESULT Left([out, retval] PINT Left); + [id(6), propput] + HRESULT Left([in] int left); + [id(7), propget] + HRESULT Right([out, retval] PINT Right); + [id(7), propput] + HRESULT Right([in] int right); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(F81ED800-7839-4447-945D-8E15DA59CA55), + dual + ] + interface Node : IDispatch + { + [id(1)] + HRESULT Name([out, retval] PBSTR Name); + [id(2)] + HRESULT Property([in] BSTR PropertyName, [out, retval] PBSTR PropertyValue); + [id(3)] + HRESULT Bookmark([out, retval] PBSTR Bookmark); + [id(4)] + HRESULT IsScopeNode([out, retval]PBOOL IsScopeNode); + [id(5)] + HRESULT Nodetype([out, retval] PBSTR Nodetype); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(EBBB48DC-1A3B-4D86-B786-C21B28389012), + dual + ] + + interface ScopeNamespace : IDispatch + { + [id(1)] + HRESULT GetParent([in] PNODE Node, [out, retval] PPNODE Parent); + [id(2)] + HRESULT GetChild([in] PNODE Node, [out, retval] PPNODE Child); + [id(3)] + HRESULT GetNext([in] PNODE Node, [out, retval] PPNODE Next); + [id(4)] + HRESULT GetRoot([out, retval] PPNODE Root); + [id(5)] + HRESULT Expand([in] PNODE Node); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(225120D6-1E0F-40A3-93FE-1079E6A8017B), + dual + ] + + interface Document : IDispatch + { + [id(1)] + HRESULT Save(); + [id(2)] + HRESULT SaveAs([in] BSTR Filename); + [id(3)] + HRESULT Close([in] BOOL SaveChanges); + [id(4), propget] + HRESULT Views([out, retval] PPVIEWS Views); + [id(5), propget] + HRESULT SnapIns([out, retval] PPSNAPINS SnapIns); + [id(6), propget] + HRESULT ActiveView([out, retval] PPVIEW View); + [id(7), propget] + HRESULT Name([out, retval] PBSTR Name); + [id(7), propput] + HRESULT Name([in] BSTR Name); + [id(8), propget] + HRESULT Location([out, retval] PBSTR Location); + [id(9), propget] + HRESULT IsSaved([out, retval] PBOOL IsSaved); + [id(10), propget] + HRESULT Mode([out, retval] PDOCUMENTMODE Mode); + [id(10), propput] + HRESULT Mode([in] DOCUMENTMODE Mode); + [id(11), propget] + HRESULT RootNode([out, retval] PPNODE Node); + [id(12), propget] + HRESULT ScopeNamespace([out, retval] PPSCOPENAMESPACE ScopeNamespace); + [id(13)] + HRESULT CreateProperties([out, retval] PPPROPERTIES Properties); + [id(20), propget] + HRESULT Application([out, retval] PPAPPLICATION Application); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(3BE910F6-3459-49C6-A1BB-41E6BE9DF3EA), + dual + ] + interface SnapIn : IDispatch + { + [id(1), propget] + HRESULT Name([out, retval] PBSTR Name); + [id(2), propget] + HRESULT Vendor([out, retval] PBSTR Vendor); + [id(3), propget] + HRESULT Version([out, retval] PBSTR Version); + [id(4), propget] + HRESULT Extensions([out, retval] PPEXTENSIONS Extensions); + [id(5), propget] + HRESULT SnapinCLSID([out, retval] PBSTR SnapinCLSID); + [id(6), propget] + HRESULT Properties([out, retval] PPPROPERTIES Properties); + [id(7)] + HRESULT EnableAllExtensions([in] BOOL Enable); + } + + [ + oleautomation, + dual, + nonextensible, + uuid(2EF3DE1D-B12A-49D1-92C5-0B00798768F1), + dual + ] + interface SnapIns : IDispatch + { + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + [id(DISPID_VALUE)] + HRESULT Item([in] long Index, [out, retval] PPSNAPIN SnapIn); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + [id(2)] + HRESULT Add([in] BSTR SnapinNameOrCLSID, [in, optional] VARIANT ParentSnapin, + [in, optional] VARIANT Properties, [out, retval] PPSNAPIN SnapIn); + [id(3)] + HRESULT Remove([in] PSNAPIN SnapIn); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(AD4D6CA6-912F-409b-A26E-7FD234AEF542), + dual + ] + interface Extension : IDispatch + { + [id(1), propget] + HRESULT Name([out, retval] PBSTR Name); + [id(2), propget] + HRESULT Vendor([out, retval] PBSTR Vendor); + [id(3), propget] + HRESULT Version([out, retval] PBSTR Version); + [id(4), propget] + HRESULT Extensions([out, retval] PPEXTENSIONS Extensions); + [id(5), propget] + HRESULT SnapinCLSID([out, retval] PBSTR SnapinCLSID); + [id(6)] + HRESULT EnableAllExtensions([in] BOOL Enable); + [id(7)] + HRESULT Enable([in] BOOL Enable); + } + + [ + oleautomation, + dual, + nonextensible, + uuid(82DBEA43-8CA4-44bc-A2CA-D18741059EC8), + dual + ] + interface Extensions : IDispatch + { + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + [id(DISPID_VALUE)] + HRESULT Item([in] long Index, [out, retval] PPEXTENSION Extension); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(383D4D97-FC44-478B-B139-6323DC48611C), + dual + ] + interface Columns : IDispatch + { + [id(DISPID_VALUE)] + HRESULT Item([in] long Index, [out, retval] PPCOLUMN Column); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(FD1C5F63-2B16-4D06-9AB3-F45350B940AB), + dual + ] + interface Column : IDispatch + { + typedef enum ColumnSortOrder + { + SortOrder_Ascending, + SortOrder_Descending + } _ColumnSortOrder; + typedef enum ColumnSortOrder COLUMNSORTORDER; + + [id(DISPID_VALUE)] + HRESULT Name([out, retval] BSTR *Name); + [id(1), propget] + HRESULT Width([out, retval] PLONG Width); + [id(1), propput] + HRESULT Width([in] long Width); + [id(2), propget] + HRESULT DisplayPosition([out, retval] PLONG DisplayPosition); + [id(2), propput] + HRESULT DisplayPosition([in] long Index); + [id(3), propget] + HRESULT Hidden([out, retval] PBOOL Hidden); + [id(3), propput] + HRESULT Hidden([in] BOOL Hidden); + [id(4)] + HRESULT SetAsSortColumn([in] COLUMNSORTORDER SortOrder); + [id(5)] + HRESULT IsSortColumn([out, retval] PBOOL IsSortColumn); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(D6B8C29D-A1FF-4D72-AAB0-E381E9B9338D), + dual + ] + interface Views : IDispatch + { + [id(DISPID_VALUE)] + HRESULT Item([in] long Index, [out, retval] PPVIEW View); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + [id(2)] + HRESULT Add([in] PNODE Node, [in, defaultvalue(ViewOption_Default)] VIEWOPTIONS viewOptions); + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(6EFC2DA2-B38C-457E-9ABB-ED2D189B8C38), + dual + ] + interface View : IDispatch + { + [id(1), propget] + HRESULT ActiveScopeNode([out, retval] PPNODE Node); + [id(1), propput] + HRESULT ActiveScopeNode([in] PNODE Node); + [id(2), propget] + HRESULT Selection([out, retval] PPNODES Nodes); + [id(3), propget] + HRESULT ListItems([out, retval] PPNODES Nodes); + [id(4)] + HRESULT SnapinScopeObject([in, optional] VARIANT ScopeNode, [out, retval] PPDISPATCH ScopeNodeObject); + [id(5)] + HRESULT SnapinSelectionObject([out, retval] PPDISPATCH SelectionObject); + [id(9)] + HRESULT Is([in] PVIEW View, [out, retval] VARIANT_BOOL *TheSame); + [id(10), propget] + HRESULT Document([out, retval] PPDOCUMENT Document); + [id(20)] + HRESULT SelectAll(); + [id(21)] + HRESULT Select([in] PNODE Node); + [id(22)] + HRESULT Deselect([in] PNODE Node); + [id(23)] + HRESULT IsSelected([in] PNODE Node, [out, retval] PBOOL IsSelected); + [id(40)] + HRESULT DisplayScopeNodePropertySheet([in, optional] VARIANT ScopeNode); + [id(41)] + HRESULT DisplaySelectionPropertySheet(); + [id(42)] + HRESULT CopyScopeNode([in, optional] VARIANT ScopeNode); + [id(43)] + HRESULT CopySelection(); + [id(44)] + HRESULT DeleteScopeNode([in, optional] VARIANT ScopeNode); + [id(45)] + HRESULT DeleteSelection(); + [id(46)] + HRESULT RenameScopeNode([in] BSTR NewName, [in, optional] VARIANT ScopeNode); + [id(47)] + HRESULT RenameSelectedItem([in] BSTR NewName); + [id(48), propget] + HRESULT ScopeNodeContextMenu([in, optional] VARIANT ScopeNode, [out, retval] PPCONTEXTMENU ContextMenu); + [id(49), propget] + HRESULT SelectionContextMenu([out, retval] PPCONTEXTMENU ContextMenu); + [id(50)] + HRESULT RefreshScopeNode([in, optional] VARIANT ScopeNode); + [id(51)] + HRESULT RefreshSelection(); + [id(52)] + HRESULT ExecuteSelectionMenuItem([in] BSTR MenuItemPath); + [id(53)] + HRESULT ExecuteScopeNodeMenuItem([in] BSTR MenuItemPath, [in, optional] VARIANT ScopeNode); + [id(54)] + HRESULT ExecuteShellCommand([in] BSTR Command, [in] BSTR Directory, [in] BSTR Parameters, [in] BSTR WindowState); + [id(60), propget] + HRESULT Frame([out, retval] PPFRAME Frame); + [id(61)] + HRESULT Close(); + [id(62), propget] + HRESULT ScopeTreeVisible([out, retval] PBOOL Visible); + [id(62), propput] + HRESULT ScopeTreeVisible([in] BOOL Visible); + [id(66)] + HRESULT Back(); + [id(67)] + HRESULT Forward(); + [id(68), propput] + HRESULT StatusBarText([in] BSTR StatusBarText); + [id(69), propget] + HRESULT Memento([out, retval] PBSTR Memento); + [id(70)] + HRESULT ViewMemento([in] BSTR Memento); + [id(80), propget] + HRESULT Columns([out, retval] PPCOLUMNS Columns); + [id(81), propget] + HRESULT CellContents([in] PNODE Node, [in] long Column, [out, retval] PBSTR CellContents); + [id(82)] + HRESULT ExportList([in] BSTR File, [in, defaultvalue(ExportListOptions_Default)] EXPORTLISTOPTIONS exportoptions); + [id(83), propget] + HRESULT ListViewMode([out, retval] PLISTVIEWMODE Mode); + [id(83), propput] + HRESULT ListViewMode([in] LISTVIEWMODE mode); + [id(100), propget] + HRESULT ControlObject([out, retval] PPDISPATCH Control); + +#if MMC_PERF_BUILD + [id(90)] + HRESULT SelectResultNodes([in] long count); + [id(91)] + HRESULT SelectChildNodes ([in] PNODE Node, [in] long count); +#endif + + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(313B01DF-B22F-4D42-B1B8-483CDCF51D35), + dual + ] + interface Nodes : IDispatch + { + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + [id(DISPID_VALUE)] + HRESULT Item([in] long Index, [out, retval] PPNODE Node); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(DAB39CE0-25E6-4E07-8362-BA9C95706545), + dual + ] + interface ContextMenu : IDispatch + { + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + [id(DISPID_VALUE), propget] + HRESULT Item([in] VARIANT IndexOrPath, [out, retval] PPMENUITEM MenuItem); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + }; + + [ + oleautomation, + dual, + nonextensible, + uuid(0178FAD1-B361-4B27-96AD-67C57EBF2E1D), + dual + ] + interface MenuItem : IDispatch + { + [id(1), propget] + HRESULT DisplayName([out, retval] PBSTR DisplayName); + [id(2), propget] + HRESULT LanguageIndependentName([out, retval] PBSTR LanguageIndependentName); + [id(3), propget] + HRESULT Path([out, retval] PBSTR Path); + [id(4), propget] + HRESULT LanguageIndependentPath([out, retval] PBSTR LanguageIndependentPath); + [id(5)] + HRESULT Execute(); + [id(6), propget] + HRESULT Enabled([out, retval] PBOOL Enabled); + } + + [ + oleautomation, + dual, + nonextensible, + uuid(2886ABC2-A425-42b2-91C6-E25C0E04581C), + dual + ] + interface Properties : IDispatch + { + [id(DISPID_NEWENUM), propget] + HRESULT _NewEnum([out, retval] IUnknown** retval); + [id(DISPID_VALUE)] + HRESULT Item([in] BSTR Name, [out, retval] PPPROPERTY Property); + [id(1), propget] + HRESULT Count([out, retval] PLONG Count); + [id(2)] + HRESULT Remove([in] BSTR Name); + } + + [ + oleautomation, + dual, + nonextensible, + uuid(4600C3A5-E301-41d8-B6D0-EF2E4212E0CA), + dual + ] + interface Property : IDispatch + { + [id(DISPID_VALUE), propget] + HRESULT Value([out, retval] PVARIANT Value); + [id(DISPID_VALUE), propput] + HRESULT Value([in] VARIANT Value); + [id(1), propget] + HRESULT Name([out, retval] PBSTR Name); + } +}; + + +cpp_quote("#endif // MMC_VER >= 0x0200") Propchange: branches/iut-mmc/include/psdk/mmcobj.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/iut-mmc/include/psdk/psdk.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/psdk.rbuil…
============================================================================== --- branches/iut-mmc/include/psdk/psdk.rbuild [iso-8859-1] (original) +++ branches/iut-mmc/include/psdk/psdk.rbuild [iso-8859-1] Sun Feb 12 14:50:03 2012 @@ -29,6 +29,7 @@ <file>mimeinfo.idl</file> <file>mlang.idl</file> <file>mmc.idl</file> + <file>mmcobj.idl</file> <file>msctf.idl</file> <file>msdadc.idl</file> <file>mshtml.idl</file>
12 years, 10 months
1
0
0
0
[khornicek] 55562: [WIN32K] Fix a potential memory leak. Spotted by Samuel Serapion.
by khornicek@svn.reactos.org
Author: khornicek Date: Sun Feb 12 14:40:25 2012 New Revision: 55562 URL:
http://svn.reactos.org/svn/reactos?rev=55562&view=rev
Log: [WIN32K] Fix a potential memory leak. Spotted by Samuel Serapion. Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Sun Feb 12 14:40:25 2012 @@ -1349,6 +1349,7 @@ error = FT_Glyph_To_Bitmap(&GlyphCopy, RenderMode, 0, 1); if (error) { + FT_Done_Glyph(GlyphCopy); DPRINT1("Failure rendering glyph.\n"); return NULL; };
12 years, 10 months
1
0
0
0
[pschweitzer] 55561: [PSDK] Add mmc.idl
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 12 14:09:40 2012 New Revision: 55561 URL:
http://svn.reactos.org/svn/reactos?rev=55561&view=rev
Log: [PSDK] Add mmc.idl Added: branches/iut-mmc/include/psdk/mmc.idl (with props) Modified: branches/iut-mmc/include/psdk/CMakeLists.txt branches/iut-mmc/include/psdk/psdk.rbuild Modified: branches/iut-mmc/include/psdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/CMakeLists…
============================================================================== --- branches/iut-mmc/include/psdk/CMakeLists.txt [iso-8859-1] (original) +++ branches/iut-mmc/include/psdk/CMakeLists.txt [iso-8859-1] Sun Feb 12 14:09:40 2012 @@ -46,6 +46,7 @@ mimeinfo.idl mimeole.idl mlang.idl + mmc.idl mscoree.idl msctf.idl msdadc.idl Added: branches/iut-mmc/include/psdk/mmc.idl URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/mmc.idl?re…
============================================================================== --- branches/iut-mmc/include/psdk/mmc.idl (added) +++ branches/iut-mmc/include/psdk/mmc.idl [iso-8859-1] Sun Feb 12 14:09:40 2012 @@ -1,0 +1,1535 @@ +cpp_quote("#ifndef MMC_VER") +cpp_quote("#define MMC_VER 0x0210") +cpp_quote("#endif") + +#ifndef DO_NO_IMPORTS +import "basetsd.h"; +import "oaidl.idl"; +#endif + +/* Interfaces implemented by mmcndmgr.dll */ +interface IConsole; +interface IHeaderCtrl; +interface IToolbar; +interface IImageList; +interface IResultData; +interface IConsoleNameSpace; +interface IPropertySheetProvider; +interface IPropertySheetCallback; +interface IContextMenuProvider; +interface IContextMenuCallback; +interface IControlbar; +interface IConsoleVerb; +interface IMenuButton; + +cpp_quote("#if (MMC_VER >= 0x0110)") +interface IConsole2; +interface IHeaderCtrl2; +interface IConsoleNameSpace2; +interface IDisplayHelp; +interface IStringTable; +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#if (MMC_VER >= 0x0120)") +interface IColumnData; +cpp_quote("#endif // MMC_VER >= 0x0120") + +cpp_quote("#if (MMC_VER >= 0x0200)") +interface IConsole3; +interface IConsolePower; +interface INodeProperties; +interface IResultData2; +cpp_quote("#endif // MMC_VER >= 0x0200") + +/* Interfaces implemented by the MMC snap-ins */ +interface IComponent; +interface IComponentData; +interface IExtendPropertySheet; +interface IExtendContextMenu; +interface IExtendControlbar; +interface IResultDataCompare; +interface ISnapinAbout; +interface IResultOwnerData; +interface ISnapinHelp; + +cpp_quote("#if (MMC_VER >= 0x0110)") +interface IEnumTASK; +interface IExtendPropertySheet2; +interface ISnapinHelp2; +interface IExtendTaskPad; +interface IRequiredExtensions; +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#if (MMC_VER >= 0x0120)") +interface IResultDataCompareEx; +cpp_quote("#endif // MMC_VER >= 0x0120") + +cpp_quote("#if (MMC_VER >= 0x0200)") +interface IComponent2; +interface IComponentData2; +interface IExtendView; +interface IViewExtensionCallback; +interface IConsolePowerSink; +interface IConsole3; +interface INodeProperties; +interface IResultData2; +cpp_quote("#endif // MMC_VER >= 0x0200") + +typedef IConsole* LPCONSOLE; +typedef IHeaderCtrl* LPHEADERCTRL; +typedef IToolbar* LPTOOLBAR; +typedef IImageList* LPIMAGELIST; +typedef IResultData* LPRESULTDATA; +typedef IConsoleNameSpace* LPCONSOLENAMESPACE; +typedef IPropertySheetProvider* LPPROPERTYSHEETPROVIDER; +typedef IPropertySheetCallback* LPPROPERTYSHEETCALLBACK; +typedef IContextMenuProvider* LPCONTEXTMENUPROVIDER; +typedef IContextMenuCallback* LPCONTEXTMENUCALLBACK; +typedef IControlbar* LPCONTROLBAR; +typedef IConsoleVerb* LPCONSOLEVERB; +typedef IMenuButton* LPMENUBUTTON; + +cpp_quote("#if (MMC_VER >= 0x0110)") +typedef IConsole2* LPCONSOLE2; +typedef IHeaderCtrl2* LPHEADERCTRL2; +typedef IConsoleNameSpace2* LPCONSOLENAMESPACE2; +typedef IDisplayHelp* LPDISPLAYHELP; +typedef IStringTable* LPSTRINGTABLE; +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#if (MMC_VER >= 0x0120)") +typedef IColumnData* LPCOLUMNDATA; +typedef IResultDataCompareEx* LPRESULTDATACOMPAREEX; +cpp_quote("#endif // MMC_VER >= 0x0120") + +typedef IComponent* LPCOMPONENT; +typedef IComponentData* LPCOMPONENTDATA; +typedef IExtendPropertySheet* LPEXTENDPROPERTYSHEET; +typedef IExtendContextMenu* LPEXTENDCONTEXTMENU; +typedef IExtendControlbar* LPEXTENDCONTROLBAR; +typedef IResultDataCompare* LPRESULTDATACOMPARE; +typedef IResultOwnerData* LPRESULTOWNERDATA; +typedef ISnapinAbout* LPSNAPABOUT; +typedef ISnapinAbout* LPSNAPINABOUT; +typedef ISnapinHelp* LPSNAPHELP; +typedef ISnapinHelp* LPSNAPINHELP; + +cpp_quote("#if (MMC_VER >= 0x0110)") +typedef IEnumTASK* LPENUMTASK; +typedef IExtendPropertySheet2* LPEXTENDPROPERTYSHEET2; +typedef ISnapinHelp2* LPSNAPINHELP2; +typedef IExtendTaskPad* LPEXTENDTASKPAD; +typedef IRequiredExtensions* LPREQUIREDEXTENSIONS; +cpp_quote("#endif // MMC_VER >= 0x0110") + + +cpp_quote("#if (MMC_VER >= 0x0200)") +typedef IComponent2* LPCOMPONENT2; +typedef IComponentData2* LPCOMPONENTDATA2; +typedef IExtendView* LPEXTENDVIEW; +typedef IViewExtensionCallback* LPVIEWEXTENSIONCALLBACK; +typedef IConsolePower* LPCONSOLEPOWER; +typedef IConsolePowerSink* LPCONSOLEPOWERSINK; +typedef IConsole3* LPCONSOLE3; +typedef INodeProperties* LPNODEPROPERTIES; +typedef IResultData2* LPRESULTDATA2; +cpp_quote("#endif // MMC_VER >= 0x0200") + +typedef BSTR* PBSTR; + +#define LVS_ICON 0x0000 +#define LVS_REPORT 0x0001 +#define LVS_SMALLICON 0x0002 +#define LVS_LIST 0x0003 +#define LVSICF_NOINVALIDATEALL 0x00000001 +#define LVSICF_NOSCROLL 0x00000002 + +const long MMCLV_AUTO = -1; +const long MMCLV_NOPARAM = -2; +const long MMCLV_NOICON = -1; + +const long MMCLV_VIEWSTYLE_ICON = LVS_ICON; +const long MMCLV_VIEWSTYLE_SMALLICON = LVS_SMALLICON; +const long MMCLV_VIEWSTYLE_LIST = LVS_LIST; +const long MMCLV_VIEWSTYLE_REPORT = LVS_REPORT; +const long MMCLV_VIEWSTYLE_FILTERED = 0x0004; + +const void* MMCLV_NOPTR = 0x0; +const long MMCLV_UPDATE_NOINVALIDATEALL = LVSICF_NOINVALIDATEALL; +const long MMCLV_UPDATE_NOSCROLL = LVSICF_NOSCROLL; + +static unsigned short* MMC_CALLBACK = ((unsigned short *)(-1)); +cpp_quote("#if (MMC_VER >= 0x0120)") +cpp_quote("#define MMC_IMAGECALLBACK (-1)") +cpp_quote("#define MMC_TEXTCALLBACK MMC_CALLBACK") +cpp_quote("#endif // MMC_VER >= 0x0120") + +typedef LONG_PTR HSCOPEITEM; +typedef long COMPONENTID; +typedef LONG_PTR HRESULTITEM; + +const DWORD RDI_STR = 0x0002; +const DWORD RDI_IMAGE = 0x0004; +const DWORD RDI_STATE = 0x0008; +const DWORD RDI_PARAM = 0x0010; +const DWORD RDI_INDEX = 0x0020; +const DWORD RDI_INDENT = 0x0040; + +cpp_quote("typedef enum _MMC_RESULT_VIEW_STYLE ") +cpp_quote("{ ") +cpp_quote(" MMC_SINGLESEL = 0x0001, ") +cpp_quote(" MMC_SHOWSELALWAYS = 0x0002, ") +cpp_quote(" MMC_NOSORTHEADER = 0x0004, ") +cpp_quote("#if (MMC_VER >= 0x0120) ") +cpp_quote(" MMC_ENSUREFOCUSVISIBLE = 0x0008 ") +cpp_quote("#endif // MMC_VER >= 0x0120 ") +cpp_quote("} MMC_RESULT_VIEW_STYLE; ") + +cpp_quote("#if 0") +typedef enum _MMC_RESULT_VIEW_STYLE +{ + _MMC_VIEW_STYLE__dummy_ +} MMC_RESULT_VIEW_STYLE; +cpp_quote("#endif") + + +const long MMC_VIEW_OPTIONS_NONE = 0x00000000; +const long MMC_VIEW_OPTIONS_NOLISTVIEWS = 0x00000001; +const long MMC_VIEW_OPTIONS_MULTISELECT = 0x00000002; +const long MMC_VIEW_OPTIONS_OWNERDATALIST = 0x00000004; +const long MMC_VIEW_OPTIONS_FILTERED = 0x00000008; +const long MMC_VIEW_OPTIONS_CREATENEW = 0x00000010; + +cpp_quote("#if (MMC_VER >= 0x0110)") +const long MMC_VIEW_OPTIONS_USEFONTLINKING = 0x00000020; +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#if (MMC_VER >= 0x0120)") +const long MMC_VIEW_OPTIONS_EXCLUDE_SCOPE_ITEMS_FROM_LIST = 0x00000040; +const long MMC_VIEW_OPTIONS_LEXICAL_SORT = 0x00000080; +cpp_quote("#endif // MMC_VER >= 0x0120") + +const DWORD MMC_PSO_NOAPPLYNOW = 0x00000001; +const DWORD MMC_PSO_HASHELP = 0x00000002; +const DWORD MMC_PSO_NEWWIZARDTYPE = 0x00000004; +const DWORD MMC_PSO_NO_PROPTITLE = 0x00000008; + +typedef enum _MMC_CONTROL_TYPE +{ + TOOLBAR, + MENUBUTTON, + COMBOBOXBAR +} MMC_CONTROL_TYPE; + +cpp_quote("typedef enum _MMC_CONSOLE_VERB ") +cpp_quote("{ ") +cpp_quote(" MMC_VERB_NONE = 0x0000, ") +cpp_quote(" MMC_VERB_OPEN = 0x8000, ") +cpp_quote(" MMC_VERB_COPY = 0x8001, ") +cpp_quote(" MMC_VERB_PASTE = 0x8002, ") +cpp_quote(" MMC_VERB_DELETE = 0x8003, ") +cpp_quote(" MMC_VERB_PROPERTIES = 0x8004, ") +cpp_quote(" MMC_VERB_RENAME = 0x8005, ") +cpp_quote(" MMC_VERB_REFRESH = 0x8006, ") +cpp_quote(" MMC_VERB_PRINT = 0x8007, ") +cpp_quote("#if (MMC_VER >= 0x0110) ") +cpp_quote(" MMC_VERB_CUT = 0x8008, // Used only to explicitly disable/hide") +cpp_quote(" // the cut verb, when copy & paste are enabled.") +cpp_quote(" ") +cpp_quote(" // must be last ") +cpp_quote(" MMC_VERB_MAX, ") +cpp_quote(" MMC_VERB_FIRST = MMC_VERB_OPEN, ") +cpp_quote(" MMC_VERB_LAST = MMC_VERB_MAX - 1 ") +cpp_quote("#endif // MMC_VER >= 0x0110 ") +cpp_quote("} MMC_CONSOLE_VERB; ") + +cpp_quote("#if 0") +typedef enum _MMC_CONSOLE_VERB +{ + MMC_VERB__dummy_ +} MMC_CONSOLE_VERB; +cpp_quote("#endif") + +cpp_quote("#include <pshpack8.h>") +typedef struct _MMCButton +{ + int nBitmap; + int idCommand; + BYTE fsState; + BYTE fsType; + LPOLESTR lpButtonText; + LPOLESTR lpTooltipText; + +} MMCBUTTON, *LPMMCBUTTON; +cpp_quote("#include <poppack.h>") + +typedef enum _MMC_BUTTON_STATE +{ + ENABLED = 0x01, + CHECKED = 0x02, + HIDDEN = 0x04, + INDETERMINATE = 0x08, + BUTTONPRESSED = 0x10, + +} MMC_BUTTON_STATE; + +typedef struct _RESULTDATAITEM +{ + DWORD mask; + BOOL bScopeItem; + HRESULTITEM itemID; + int nIndex; + int nCol; + LPOLESTR str; + int nImage; + UINT nState; + LPARAM lParam; + int iIndent; +} RESULTDATAITEM, *LPRESULTDATAITEM; + +const DWORD RFI_PARTIAL = 0x0001; +const DWORD RFI_WRAP = 0x0002; + +typedef struct _RESULTFINDINFO +{ + LPOLESTR psz; + int nStart; + DWORD dwOptions; +} RESULTFINDINFO, *LPRESULTFINDINFO; + +const DWORD RSI_DESCENDING = 0x0001; +const DWORD RSI_NOSORTICON = 0x0002; + +const DWORD SDI_STR = 0x00002; +const DWORD SDI_IMAGE = 0x00004; +const DWORD SDI_OPENIMAGE = 0x00008; +const DWORD SDI_STATE = 0x00010; +const DWORD SDI_PARAM = 0x00020; +const DWORD SDI_CHILDREN = 0x00040; + +const DWORD SDI_PARENT = 0x00000000; +const DWORD SDI_PREVIOUS = 0x10000000; +const DWORD SDI_NEXT = 0x20000000; +const DWORD SDI_FIRST = 0x08000000; + +typedef struct _SCOPEDATAITEM +{ + DWORD mask; + LPOLESTR displayname; + int nImage; + int nOpenImage; + UINT nState; + int cChildren; + LPARAM lParam; + HSCOPEITEM relativeID; + HSCOPEITEM ID; +} SCOPEDATAITEM, *LPSCOPEDATAITEM; + +typedef enum _MMC_SCOPE_ITEM_STATE +{ + MMC_SCOPE_ITEM_STATE_NORMAL = 0x0001, + MMC_SCOPE_ITEM_STATE_BOLD = 0x0002, + MMC_SCOPE_ITEM_STATE_EXPANDEDONCE = 0x0003, + +} MMC_SCOPE_ITEM_STATE; + +typedef struct _CONTEXTMENUITEM +{ + LPWSTR strName; + LPWSTR strStatusBarText; + LONG lCommandID; + LONG lInsertionPointID; + LONG fFlags; + LONG fSpecialFlags; +} CONTEXTMENUITEM, *LPCONTEXTMENUITEM; + +typedef enum _MMC_MENU_COMMAND_IDS +{ + MMCC_STANDARD_VIEW_SELECT = -1 +} MMC_MENU_COMMAND_IDS; + +typedef struct _MENUBUTTONDATA +{ + int idCommand; + int x; + int y; +} MENUBUTTONDATA, *LPMENUBUTTONDATA; + +typedef LONG_PTR MMC_COOKIE; + +const MMC_COOKIE MMC_MULTI_SELECT_COOKIE = -2; +const MMC_COOKIE MMC_WINDOW_COOKIE = -3; + +cpp_quote("#if (MMC_VER >= 0x0110)") +const MMC_COOKIE SPECIAL_COOKIE_MIN = -10; +const MMC_COOKIE SPECIAL_COOKIE_MAX = -1; + +#define HDFT_ISSTRING 0x0000 +#define HDFT_ISNUMBER 0x0001 +#define HDFT_HASNOVALUE 0x8000 + +typedef enum _MMC_FILTER_TYPE +{ + MMC_STRING_FILTER = HDFT_ISSTRING, + MMC_INT_FILTER = HDFT_ISNUMBER, + MMC_FILTER_NOVALUE= HDFT_HASNOVALUE +} MMC_FILTER_TYPE; + +typedef struct _MMC_FILTERDATA +{ + LPOLESTR pszText; + INT cchTextMax; + LONG lValue; +} MMC_FILTERDATA; + +typedef enum _MMC_FILTER_CHANGE_CODE +{ + MFCC_DISABLE = 0, + MFCC_ENABLE = 1, + MFCC_VALUE_CHANGE = 2 +} MMC_FILTER_CHANGE_CODE; + +typedef struct _MMC_RESTORE_VIEW +{ + DWORD dwSize; + MMC_COOKIE cookie; + LPOLESTR pViewType; + long lViewOptions; +} MMC_RESTORE_VIEW; + +typedef struct _MMC_EXPANDSYNC_STRUCT +{ + BOOL bHandled; + BOOL bExpanding; + HSCOPEITEM hItem; +} MMC_EXPANDSYNC_STRUCT; +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#if (MMC_VER >= 0x0120)") +typedef struct _MMC_VISIBLE_COLUMNS +{ + INT nVisibleColumns; + INT rgVisibleCols[1]; +} MMC_VISIBLE_COLUMNS; +cpp_quote("#endif // MMC_VER >= 0x0120") + +cpp_quote("typedef enum _MMC_NOTIFY_TYPE ") +cpp_quote("{ ") +cpp_quote(" MMCN_ACTIVATE = 0x8001, ") +cpp_quote(" MMCN_ADD_IMAGES = 0x8002, ") +cpp_quote(" MMCN_BTN_CLICK = 0x8003, ") +cpp_quote(" MMCN_CLICK = 0x8004, // NOT USED ") +cpp_quote(" MMCN_COLUMN_CLICK = 0x8005, ") +cpp_quote(" MMCN_CONTEXTMENU = 0x8006, // NOT USED ") +cpp_quote(" MMCN_CUTORMOVE = 0x8007, ") +cpp_quote(" MMCN_DBLCLICK = 0x8008, ") +cpp_quote(" MMCN_DELETE = 0x8009, ") +cpp_quote(" MMCN_DESELECT_ALL = 0x800A, ") +cpp_quote(" MMCN_EXPAND = 0x800B, ") +cpp_quote(" MMCN_HELP = 0x800C, // NOT USED ") +cpp_quote(" MMCN_MENU_BTNCLICK = 0x800D, ") +cpp_quote(" MMCN_MINIMIZED = 0x800E, ") +cpp_quote(" MMCN_PASTE = 0x800F, ") +cpp_quote(" MMCN_PROPERTY_CHANGE = 0x8010, ") +cpp_quote(" MMCN_QUERY_PASTE = 0x8011, ") +cpp_quote(" MMCN_REFRESH = 0x8012, ") +cpp_quote(" MMCN_REMOVE_CHILDREN = 0x8013, ") +cpp_quote(" MMCN_RENAME = 0x8014, ") +cpp_quote(" MMCN_SELECT = 0x8015, ") +cpp_quote(" MMCN_SHOW = 0x8016, ") +cpp_quote(" MMCN_VIEW_CHANGE = 0x8017, ") +cpp_quote(" MMCN_SNAPINHELP = 0x8018, ") +cpp_quote(" MMCN_CONTEXTHELP = 0x8019, ") +cpp_quote(" MMCN_INITOCX = 0x801A, ") +cpp_quote("#if (MMC_VER >= 0x0110) ") +cpp_quote(" MMCN_FILTER_CHANGE = 0x801B, ") +cpp_quote(" MMCN_FILTERBTN_CLICK = 0x801C, ") +cpp_quote(" MMCN_RESTORE_VIEW = 0x801D, ") +cpp_quote(" MMCN_PRINT = 0x801E, ") +cpp_quote(" MMCN_PRELOAD = 0x801F, ") +cpp_quote(" MMCN_LISTPAD = 0x8020, ") +cpp_quote(" MMCN_EXPANDSYNC = 0x8021, ") +cpp_quote("#if (MMC_VER >= 0x0120) ") +cpp_quote(" MMCN_COLUMNS_CHANGED = 0x8022, ") +cpp_quote("#if (MMC_VER >= 0x0200) ") +cpp_quote(" MMCN_CANPASTE_OUTOFPROC = 0x8023, ") +cpp_quote("#endif // MMC_VER >= 0x0200 ") +cpp_quote("#endif // MMC_VER >= 0x0120 ") +cpp_quote("#endif // MMC_VER >= 0x0110 ") +cpp_quote("} MMC_NOTIFY_TYPE; ") + +cpp_quote("#if 0") +typedef enum _MMC_NOTIFY_TYPE +{ + MMCN__dummy_ +} MMC_NOTIFY_TYPE; +cpp_quote("#endif") + +typedef enum _DATA_OBJECT_TYPES +{ + CCT_SCOPE = 0x8000, + CCT_RESULT = 0x8001, + CCT_SNAPIN_MANAGER = 0x8002, + CCT_UNINITIALIZED = 0xFFFF, +} DATA_OBJECT_TYPES; + +const unsigned long MMC_NW_OPTION_NONE = 0x0000; +const unsigned long MMC_NW_OPTION_NOSCOPEPANE = 0x0001; +const unsigned long MMC_NW_OPTION_NOTOOLBARS = 0x0002; +const unsigned long MMC_NW_OPTION_SHORTTITLE = 0x0004; +const unsigned long MMC_NW_OPTION_CUSTOMTITLE = 0x0008; +const unsigned long MMC_NW_OPTION_NOPERSIST = 0x0010; +const unsigned long MMC_NW_OPTION_NOACTIONPANE = 0x0020; + +const wchar_t* CCF_NODETYPE = L"CCF_NODETYPE"; +const wchar_t* CCF_SZNODETYPE = L"CCF_SZNODETYPE"; +const wchar_t* CCF_DISPLAY_NAME = L"CCF_DISPLAY_NAME"; +const wchar_t* CCF_SNAPIN_CLASSID = L"CCF_SNAPIN_CLASSID"; + +cpp_quote("#if (MMC_VER >= 0x0210)") +const wchar_t* CCF_SNAPIN_CLASS = L"CCF_SNAPIN_CLASS"; +cpp_quote("#endif // MMC_VER >= 0x0210") + +const wchar_t* CCF_WINDOW_TITLE = L"CCF_WINDOW_TITLE"; +const wchar_t* CCF_MMC_MULTISELECT_DATAOBJECT = L"CCF_MMC_MULTISELECT_DATAOBJECT"; + +typedef struct _SMMCDataObjects +{ + DWORD count; + LPDATAOBJECT lpDataObject[1]; + +} SMMCDataObjects; +const wchar_t* CCF_MULTI_SELECT_SNAPINS = L"CCF_MULTI_SELECT_SNAPINS"; + +typedef struct _SMMCObjectTypes +{ + DWORD count; + GUID guid[1]; + +} SMMCObjectTypes; + +const wchar_t* CCF_OBJECT_TYPES_IN_MULTI_SELECT = L"CCF_OBJECT_TYPES_IN_MULTI_SELECT"; + +cpp_quote("#if (MMC_VER >= 0x0110)") +typedef SMMCObjectTypes SMMCDynamicExtensions; + +const wchar_t* CCF_MMC_DYNAMIC_EXTENSIONS = L"CCF_MMC_DYNAMIC_EXTENSIONS"; +const wchar_t* CCF_SNAPIN_PRELOADS = L"CCF_SNAPIN_PRELOADS"; + +typedef struct _SNodeID +{ + DWORD cBytes; + BYTE id[1]; +} SNodeID; + + +cpp_quote("#if (MMC_VER >= 0x0120)") +typedef struct _SNodeID2 +{ + DWORD dwFlags; + DWORD cBytes; + BYTE id[1]; +} SNodeID2; + +const DWORD MMC_NODEID_SLOW_RETRIEVAL = 0x01; + +const wchar_t* CCF_NODEID2 = L"CCF_NODEID2"; +cpp_quote("#endif // MMC_VER >= 0x0120") + +const wchar_t* CCF_NODEID = L"CCF_NODEID"; + + +cpp_quote("#if (MMC_VER >= 0x0120)") +typedef struct _SColumnSetID +{ + DWORD dwFlags; + DWORD cBytes; + BYTE id[1]; +} SColumnSetID; + +const wchar_t* CCF_COLUMN_SET_ID = L"CCF_COLUMN_SET_ID"; +cpp_quote("#endif // MMC_VER >= 0x0120") +cpp_quote("#endif // MMC_VER >= 0x0110") + +/* From mmc.lib */ +cpp_quote("STDAPI MMCPropertyChangeNotify(LONG_PTR lNotifyHandle, LPARAM param);") +cpp_quote("#if (MMC_VER >= 0x0110)") +cpp_quote("STDAPI MMCPropertyHelp(LPOLESTR pszHelpTopic);") +cpp_quote("#endif // MMC_VER >= 0x0110") +cpp_quote("STDAPI MMCFreeNotifyHandle(LONG_PTR lNotifyHandle);") +cpp_quote("// MMCPropPageCallback is only available in mmc.lib. See MMCAfxPropPageCallback if linking against mmcutil.lib.") +cpp_quote("STDAPI MMCPropPageCallback(void* vpsp);") +cpp_quote("EXTERN_C const CLSID CLSID_NodeManager;") + +cpp_quote("#if (MMC_VER >= 0x0120)") +cpp_quote("EXTERN_C const CLSID CLSID_MessageView;") +cpp_quote("#endif // MMC_VER >= 0x0120") + +cpp_quote("#if (MMC_VER >= 0x0210)") +cpp_quote("// Snap-in implemented callback responsible for calling AFX_MANAGE_STATE() for the snapin-in's module.") +cpp_quote("typedef void (STDAPICALLTYPE *PFNAfxManageStateCallback)();") +cpp_quote("// Sets up a PROPSHEETPAGE structure for calling the snap-in's PFNAfxManageStateCallback.") +cpp_quote("// MMCAfxPropPageCallback is available in both mmc.lib and mmcutil.lib.") +cpp_quote("// Returns:") +cpp_quote("// S_OK - success") +cpp_quote("// E_POINTER - vpsp or pfnCallback is null") +cpp_quote("// E_INVALIDARG - vpsp->pfnCallback must be the same for all property pages") +cpp_quote("// E_INVALIDARG - pfnManageStateCallback must be the same for all property pages") +cpp_quote("// E_UNEXPECTED - vpsp has already been passed to MMCAfxPropPageCallback") +cpp_quote("STDAPI MMCAfxPropPageCallback(void* vpsp, PFNAfxManageStateCallback pfnManageStateCallback);") +cpp_quote("#endif // MMC_VER >= 0x0210") + +cpp_quote("#define DOBJ_NULL (LPDATAOBJECT) 0") +cpp_quote("#define DOBJ_CUSTOMOCX (LPDATAOBJECT) -1") +cpp_quote("#define DOBJ_CUSTOMWEB (LPDATAOBJECT) -2") +cpp_quote("#if (MMC_VER >= 0x0110)") +cpp_quote("#if (MMC_VER >= 0x0120)") +cpp_quote("#define DOBJ_NOCONSOLE (LPDATAOBJECT) -3") +cpp_quote("#endif // MMC_VER >= 0x0120") +cpp_quote("#define SPECIAL_DOBJ_MIN -10") +cpp_quote("#define SPECIAL_DOBJ_MAX 0") +cpp_quote("#endif // MMC_VER >= 0x0110") + +cpp_quote("#define IS_SPECIAL_DATAOBJECT(d) (((LONG_PTR)(d) >= SPECIAL_DOBJ_MIN) && ((LONG_PTR)(d) <= SPECIAL_DOBJ_MAX))") +cpp_quote("#define IS_SPECIAL_COOKIE(c) (((c) >= SPECIAL_COOKIE_MIN) && ((c) <= SPECIAL_COOKIE_MAX))") + + [ + object, + uuid(955AB28A-5218-11D0-A985-00C04FD8D565), + pointer_default(unique) + ] + interface IComponentData : IUnknown + { + HRESULT Initialize([in] LPUNKNOWN pUnknown); + HRESULT CreateComponent([out] LPCOMPONENT* ppComponent); + HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event, + [in] LPARAM arg, [in] LPARAM param); + HRESULT Destroy(); + HRESULT QueryDataObject([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type, + [out] LPDATAOBJECT* ppDataObject); + HRESULT GetDisplayInfo([in,out] SCOPEDATAITEM* pScopeDataItem); + HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB); + }; + + [ + object, + uuid(43136EB2-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IComponent : IUnknown + { + HRESULT Initialize([in] LPCONSOLE lpConsole); + HRESULT Notify([in] LPDATAOBJECT lpDataObject, [in] MMC_NOTIFY_TYPE event, + [in] LPARAM arg, [in] LPARAM param); + HRESULT Destroy([in] MMC_COOKIE cookie); + HRESULT QueryDataObject([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type, + [out] LPDATAOBJECT* ppDataObject); + HRESULT GetResultViewType([in] MMC_COOKIE cookie, [out] LPOLESTR* ppViewType, + [out] long* pViewOptions); + HRESULT GetDisplayInfo([in,out] RESULTDATAITEM* pResultDataItem); + HRESULT CompareObjects([in] LPDATAOBJECT lpDataObjectA, [in] LPDATAOBJECT lpDataObjectB); + }; + + [ + object, + uuid(E8315A52-7A1A-11D0-A2D2-00C04FD909DD), + pointer_default(unique) + ] + interface IResultDataCompare : IUnknown + { + HRESULT Compare([in] LPARAM lUserParam, [in] MMC_COOKIE cookieA, + [in] MMC_COOKIE cookieB, [in, out] int* pnResult); + } + + [ + object, + uuid(9CB396D8-EA83-11d0-AEF1-00C04FB6DD2C), + pointer_default(unique) + ] + interface IResultOwnerData : IUnknown + { + HRESULT FindItem([in] LPRESULTFINDINFO pFindInfo, [out] int* pnFoundIndex); + HRESULT CacheHint ([in] int nStartIndex, [in] int nEndIndex); + HRESULT SortItems([in] int nColumn, [in] DWORD dwSortOptions, [in] LPARAM lUserParam); + } + + [ + object, + uuid(43136EB1-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IConsole : IUnknown + { + HRESULT SetHeader([in] LPHEADERCTRL pHeader); + HRESULT SetToolbar([in] LPTOOLBAR pToolbar); + HRESULT QueryResultView([out] LPUNKNOWN* pUnknown); + HRESULT QueryScopeImageList([out] LPIMAGELIST* ppImageList); + HRESULT QueryResultImageList([out] LPIMAGELIST* ppImageList); + HRESULT UpdateAllViews([in] LPDATAOBJECT lpDataObject, + [in] LPARAM data, [in] LONG_PTR hint); + HRESULT MessageBox([in] LPCWSTR lpszText, [in] LPCWSTR lpszTitle, + [in] UINT fuStyle, [out] int* piRetval); + HRESULT QueryConsoleVerb([out] LPCONSOLEVERB * ppConsoleVerb); + HRESULT SelectScopeItem([in] HSCOPEITEM hScopeItem); + HRESULT GetMainWindow([out] HWND* phwnd); + HRESULT NewWindow([in] HSCOPEITEM hScopeItem, [in] unsigned long lOptions); + + }; + + [ + object, + uuid(43136EB3-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IHeaderCtrl : IUnknown + { + const int AUTO_WIDTH = -1; +cpp_quote("#if (MMC_VER >= 0x0120)") + const int HIDE_COLUMN = -4; +cpp_quote("#endif // MMC_VER >= 0x0120") + + HRESULT InsertColumn([in] int nCol, [in,] LPCWSTR title, [in] int nFormat, [in] int nWidth); + HRESULT DeleteColumn([in] int nCol); + HRESULT SetColumnText([in] int nCol, [in] LPCWSTR title); + HRESULT GetColumnText([in] int nCol, [out] LPOLESTR* pText); + HRESULT SetColumnWidth([in] int nCol, [in] int nWidth); + HRESULT GetColumnWidth([in] int nCol, [out] int* pWidth); + }; + +enum +{ + CCM_INSERTIONPOINTID_MASK_SPECIAL = 0xFFFF0000, + CCM_INSERTIONPOINTID_MASK_SHARED = 0x80000000, + CCM_INSERTIONPOINTID_MASK_CREATE_PRIMARY = 0x40000000, + CCM_INSERTIONPOINTID_MASK_ADD_PRIMARY = 0x20000000, + CCM_INSERTIONPOINTID_MASK_ADD_3RDPARTY = 0x10000000, + CCM_INSERTIONPOINTID_MASK_RESERVED = 0x0FFF0000, + CCM_INSERTIONPOINTID_MASK_FLAGINDEX = 0x0000001F, + + CCM_INSERTIONPOINTID_PRIMARY_TOP = 0xA0000000, + CCM_INSERTIONPOINTID_PRIMARY_NEW = 0xA0000001, + CCM_INSERTIONPOINTID_PRIMARY_TASK = 0xA0000002, + CCM_INSERTIONPOINTID_PRIMARY_VIEW = 0xA0000003, + CCM_INSERTIONPOINTID_PRIMARY_HELP = 0xA0000004, + CCM_INSERTIONPOINTID_3RDPARTY_NEW = 0x90000001, + CCM_INSERTIONPOINTID_3RDPARTY_TASK = 0x90000002, + CCM_INSERTIONPOINTID_ROOT_MENU = 0x80000000 +}; + +#define INSERTALLOWED_FLAG(insertionID) \ + (1L << (insertionID & CCM_INSERTIONPOINTID_MASK_FLAGINDEX)) +enum +{ + CCM_INSERTIONALLOWED_TOP = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TOP), + CCM_INSERTIONALLOWED_NEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_NEW), + CCM_INSERTIONALLOWED_TASK = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_TASK), + CCM_INSERTIONALLOWED_VIEW = INSERTALLOWED_FLAG(CCM_INSERTIONPOINTID_PRIMARY_VIEW) +}; + + +enum +{ + CCM_COMMANDID_MASK_RESERVED = 0xFFFF0000 +}; + +enum +{ + CCM_SPECIAL_SEPARATOR = 0x0001, + CCM_SPECIAL_SUBMENU = 0x0002, + CCM_SPECIAL_DEFAULT_ITEM = 0x0004, + CCM_SPECIAL_INSERTION_POINT = 0x0008, + CCM_SPECIAL_TESTONLY = 0x0010 +}; + + [ + object, + uuid(43136EB7-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IContextMenuCallback : IUnknown + { + HRESULT AddItem([in] CONTEXTMENUITEM* pItem); + }; + + [ + object, + uuid(43136EB6-D36C-11CF-ADBC-00AA00A80033), + object, + pointer_default(unique) + ] + + interface IContextMenuProvider : IContextMenuCallback + { + HRESULT EmptyMenuList(); + HRESULT AddPrimaryExtensionItems([in] LPUNKNOWN piExtension, [in] LPDATAOBJECT piDataObject); + HRESULT AddThirdPartyExtensionItems([in] LPDATAOBJECT piDataObject); + HRESULT ShowContextMenu([in] HWND hwndParent, [in] long xPos, [in] long yPos, [out,retval] long* plSelected); + }; + + [ + object, + uuid(4F3B7A4F-CFAC-11CF-B8E3-00C04FD8D5B0), + pointer_default(unique) + ] + interface IExtendContextMenu : IUnknown + { + HRESULT AddMenuItems([in] LPDATAOBJECT piDataObject, [in] LPCONTEXTMENUCALLBACK piCallback, + [in,out] long *pInsertionAllowed); + HRESULT Command([in] long lCommandID, [in] LPDATAOBJECT piDataObject); + }; + + +cpp_quote("#if (MMC_VER >= 0x0120)") +cpp_quote("#define ILSIF_LEAVE_LARGE_ICON 0x40000000") +cpp_quote("#define ILSIF_LEAVE_SMALL_ICON 0x20000000") +cpp_quote("#define ILSIF_LEAVE_MASK (ILSIF_LEAVE_LARGE_ICON | ILSIF_LEAVE_SMALL_ICON)") + +cpp_quote("#define ILSI_LARGE_ICON(nLoc) (nLoc | ILSIF_LEAVE_SMALL_ICON)") +cpp_quote("#define ILSI_SMALL_ICON(nLoc) (nLoc | ILSIF_LEAVE_LARGE_ICON)") +cpp_quote("#endif // MMC_VER >= 0x0120") + + [ + object, + uuid(43136EB8-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IImageList : IUnknown + { + HRESULT ImageListSetIcon([in] LONG_PTR* pIcon, [in] long nLoc); + HRESULT ImageListSetStrip([in] LONG_PTR* pBMapSm, [in] LONG_PTR* pBMapLg, + [in] long nStartLoc, [in] COLORREF cMask); + }; + + [ + object, + uuid(31DA5FA0-E0EB-11cf-9F21-00AA003CA9F6), + pointer_default(unique) + ] + interface IResultData : IUnknown + { + HRESULT InsertItem([in,out] LPRESULTDATAITEM item); + HRESULT DeleteItem([in] HRESULTITEM itemID, [in] int nCol); + HRESULT FindItemByLParam([in] LPARAM lParam, [out] HRESULTITEM *pItemID); + HRESULT DeleteAllRsltItems(); + HRESULT SetItem([in] LPRESULTDATAITEM item); + HRESULT GetItem([in,out] LPRESULTDATAITEM item); + HRESULT GetNextItem([in,out] LPRESULTDATAITEM item); + HRESULT ModifyItemState([in] int nIndex, [in] HRESULTITEM itemID, + [in] UINT uAdd, [in] UINT uRemove); + HRESULT ModifyViewStyle([in] MMC_RESULT_VIEW_STYLE add, + [in] MMC_RESULT_VIEW_STYLE remove); + HRESULT SetViewMode([in] long lViewMode); + HRESULT GetViewMode([out] long* lViewMode); + HRESULT UpdateItem([in] HRESULTITEM itemID); + HRESULT Sort([in] int nColumn, [in] DWORD dwSortOptions, [in] LPARAM lUserParam); + HRESULT SetDescBarText([in] LPOLESTR DescText); + HRESULT SetItemCount([in] int nItemCount, [in] DWORD dwOptions); + + }; + + [ + object, + uuid(BEDEB620-F24D-11cf-8AFC-00AA003CA9F6), + pointer_default(unique) + ] + interface IConsoleNameSpace : IUnknown + { + import "oaidl.idl"; + HRESULT InsertItem([in,out] LPSCOPEDATAITEM item); + HRESULT DeleteItem([in] HSCOPEITEM hItem, [in] long fDeleteThis); + HRESULT SetItem([in] LPSCOPEDATAITEM item); + HRESULT GetItem([in,out] LPSCOPEDATAITEM item); + HRESULT GetChildItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemChild, + [out] MMC_COOKIE* pCookie); + HRESULT GetNextItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemNext, + [out] MMC_COOKIE* pCookie); + HRESULT GetParentItem([in] HSCOPEITEM item, [out] HSCOPEITEM* pItemParent, + [out] MMC_COOKIE* pCookie); + }; + + [ + object, + uuid(255F18CC-65DB-11D1-A7DC-00C04FD8D565), + pointer_default(unique) + ] + interface IConsoleNameSpace2 : IConsoleNameSpace + { + HRESULT Expand([in] HSCOPEITEM hItem); + HRESULT AddExtension([in] HSCOPEITEM hItem, [in] LPCLSID lpClsid); + }; + +struct _PSP; +typedef struct _PSP * HPROPSHEETPAGE; + + [ + local, + object, + uuid(85DE64DD-EF21-11cf-A285-00C04FD8DBE6), + pointer_default(unique) + ] + interface IPropertySheetCallback : IUnknown + { + HRESULT AddPage([in] HPROPSHEETPAGE hPage); + HRESULT RemovePage([in] HPROPSHEETPAGE hPage); + }; + + [ + object, + uuid(85DE64DE-EF21-11cf-A285-00C04FD8DBE6), + pointer_default(unique) + ] + interface IPropertySheetProvider : IUnknown + { + HRESULT CreatePropertySheet([in] LPCWSTR title, [in] boolean type, + [in] MMC_COOKIE cookie, [in] LPDATAOBJECT pIDataObjectm, + [in] DWORD dwOptions); + HRESULT FindPropertySheet([in] HSCOPEITEM hItem, [in] LPCOMPONENT lpComponent, [in] LPDATAOBJECT lpDataObject); + HRESULT AddPrimaryPages(LPUNKNOWN lpUnknown, BOOL bCreateHandle, HWND hNotifyWindow, BOOL bScopePane); + HRESULT AddExtensionPages(); + HRESULT Show([in] LONG_PTR window, [in] int page); + }; + + [ + object, + uuid(85DE64DC-EF21-11cf-A285-00C04FD8DBE6), + pointer_default(unique) + ] + interface IExtendPropertySheet : IUnknown + { + HRESULT CreatePropertyPages([in] LPPROPERTYSHEETCALLBACK lpProvider, + [in] LONG_PTR handle, [in] LPDATAOBJECT lpIDataObject); + HRESULT QueryPagesFor([in] LPDATAOBJECT lpDataObject); + }; + + [ + object, + uuid(69FB811E-6C1C-11D0-A2CB-00C04FD909DD), + pointer_default(unique) + ] + interface IControlbar : IUnknown + { + HRESULT Create([in] MMC_CONTROL_TYPE nType, [in] LPEXTENDCONTROLBAR pExtendControlbar, + [out] LPUNKNOWN* ppUnknown); + HRESULT Attach([in] MMC_CONTROL_TYPE nType, [in] LPUNKNOWN lpUnknown); + HRESULT Detach([in] LPUNKNOWN lpUnknown); + }; + + [ + object, + uuid(49506520-6F40-11D0-A98B-00C04FD8D565), + pointer_default(unique) + ] + interface IExtendControlbar : IUnknown + { + HRESULT SetControlbar([in] LPCONTROLBAR pControlbar); + HRESULT ControlbarNotify([in] MMC_NOTIFY_TYPE event, [in] LPARAM arg, [in] LPARAM param); + }; + + [ + object, + uuid(43136EB9-D36C-11CF-ADBC-00AA00A80033), + pointer_default(unique) + ] + interface IToolbar : IUnknown + { + HRESULT AddBitmap([in] int nImages, [in] HBITMAP hbmp, [in] int cxSize, [in] int cySize, [in] COLORREF crMask ); + HRESULT AddButtons([in] int nButtons, [in] LPMMCBUTTON lpButtons); + HRESULT InsertButton([in] int nIndex, [in] LPMMCBUTTON lpButton); + HRESULT DeleteButton([in] int nIndex); + HRESULT GetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState); + HRESULT SetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [in] BOOL bState); + }; + + [ + object, + uuid(E49F7A60-74AF-11D0-A286-00C04FD8FE93), + pointer_default(unique) + ] + interface IConsoleVerb : IUnknown + { + HRESULT GetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [out] BOOL* pState); + HRESULT SetVerbState([in] MMC_CONSOLE_VERB eCmdID, [in] MMC_BUTTON_STATE nState, [in] BOOL bState); + HRESULT SetDefaultVerb([in] MMC_CONSOLE_VERB eCmdID); + HRESULT GetDefaultVerb([out] MMC_CONSOLE_VERB* peCmdID); + }; + + [ + object, + uuid(1245208C-A151-11D0-A7D7-00C04FD909DD), + pointer_default(unique) + ] + interface ISnapinAbout : IUnknown + { + HRESULT GetSnapinDescription([out] LPOLESTR* lpDescription); + HRESULT GetProvider([out] LPOLESTR* lpName); + HRESULT GetSnapinVersion([out] LPOLESTR* lpVersion); + HRESULT GetSnapinImage([out] HICON* hAppIcon); + HRESULT GetStaticFolderImage([out] HBITMAP* hSmallImage, [out] HBITMAP* hSmallImageOpen, + [out] HBITMAP* hLargeImage, [out] COLORREF* cMask); + }; + + [ + object, + uuid(951ED750-D080-11d0-B197-000000000000), + pointer_default(unique) + ] + interface IMenuButton : IUnknown + { + HRESULT AddButton([in] int idCommand,[in] LPOLESTR lpButtonText, [in] LPOLESTR lpTooltipText); + HRESULT SetButton([in] int idCommand,[in] LPOLESTR lpButtonText, [in] LPOLESTR lpTooltipText); + HRESULT SetButtonState([in] int idCommand, [in] MMC_BUTTON_STATE nState, [in] BOOL bState); + }; + + [ + object, + uuid(A6B15ACE-DF59-11D0-A7DD-00C04FD909DD), + pointer_default(unique) + ] + interface ISnapinHelp : IUnknown + { + HRESULT GetHelpTopic([out] LPOLESTR* lpCompiledHelpFile); + + }; + +cpp_quote("#if (MMC_VER >= 0x0110)") + + [ + object, + uuid(B7A87232-4A51-11D1-A7EA-00C04FD909DD), + pointer_default(unique) + ] + interface IExtendPropertySheet2 : IExtendPropertySheet + { + HRESULT GetWatermarks([in] LPDATAOBJECT lpIDataObject, [out] HBITMAP* lphWatermark, + [out] HBITMAP* lphHeader, [out] HPALETTE* lphPalette, [out] BOOL* bStretch); + }; + + [ + object, + uuid(9757abb8-1b32-11d1-a7ce-00c04fd8d565), + pointer_default(unique) + ] + interface IHeaderCtrl2 : IHeaderCtrl + { + HRESULT SetChangeTimeOut([in] unsigned long uTimeout); + HRESULT SetColumnFilter([in] UINT nColumn, [in] DWORD dwType, [in] MMC_FILTERDATA* pFilterData); + HRESULT GetColumnFilter([in] UINT nColumn, [in,out] LPDWORD pdwType, [in, out] MMC_FILTERDATA* pFilterData); + }; + + [ + object, + uuid(4861A010-20F9-11d2-A510-00C04FB6DD2C), + pointer_default(unique) + ] + interface ISnapinHelp2 : ISnapinHelp + { + HRESULT GetLinkedTopics([out] LPOLESTR* lpCompiledHelpFiles); + }; + +typedef enum _MMC_TASK_DISPLAY_TYPE +{ + MMC_TASK_DISPLAY_UNINITIALIZED = 0, + MMC_TASK_DISPLAY_TYPE_SYMBOL, + MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, + MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, + MMC_TASK_DISPLAY_TYPE_BITMAP +} MMC_TASK_DISPLAY_TYPE; + +typedef struct _MMC_TASK_DISPLAY_SYMBOL +{ + LPOLESTR szFontFamilyName; + LPOLESTR szURLtoEOT; + LPOLESTR szSymbolString; +} MMC_TASK_DISPLAY_SYMBOL; + +typedef struct _MMC_TASK_DISPLAY_BITMAP +{ + LPOLESTR szMouseOverBitmap; + LPOLESTR szMouseOffBitmap; +} MMC_TASK_DISPLAY_BITMAP; + +typedef struct _MMC_TASK_DISPLAY_OBJECT +{ + MMC_TASK_DISPLAY_TYPE eDisplayType; + [switch_type(MMC_TASK_DISPLAY_TYPE), switch_is((MMC_TASK_DISPLAY_TYPE)eDisplayType)] + _ANONYMOUS_UNION union + { + [case(MMC_TASK_DISPLAY_TYPE_BITMAP,MMC_TASK_DISPLAY_TYPE_VANILLA_GIF,MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF)] + MMC_TASK_DISPLAY_BITMAP uBitmap; + [case(MMC_TASK_DISPLAY_TYPE_SYMBOL)] + MMC_TASK_DISPLAY_SYMBOL uSymbol; + [default]; + } DUMMYUNIONNAME; +} MMC_TASK_DISPLAY_OBJECT; + +typedef enum _MMC_ACTION_TYPE +{ + MMC_ACTION_UNINITIALIZED = -1, + MMC_ACTION_ID, + MMC_ACTION_LINK, + MMC_ACTION_SCRIPT, +} MMC_ACTION_TYPE; + +typedef struct _MMC_TASK +{ + MMC_TASK_DISPLAY_OBJECT sDisplayObject; + LPOLESTR szText; + LPOLESTR szHelpString; + MMC_ACTION_TYPE eActionType; + _ANONYMOUS_UNION union + { + LONG_PTR nCommandID; + LPOLESTR szActionURL; + LPOLESTR szScript; + } DUMMYUNIONNAME; +} MMC_TASK; + +typedef struct _MMC_LISTPAD_INFO +{ + LPOLESTR szTitle; + LPOLESTR szButtonText; + LONG_PTR nCommandID; +} MMC_LISTPAD_INFO; + +typedef DWORD MMC_STRING_ID; + + [ + local, + object, + uuid(338698b1-5a02-11d1-9fec-00600832db4a), + pointer_default(unique) + ] + interface IEnumTASK : IUnknown + { + HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] MMC_TASK *rgelt, + [out] ULONG *pceltFetched); + HRESULT Skip([in] ULONG celt); + HRESULT Reset(); + HRESULT Clone([out] IEnumTASK **ppenum); + }; + + [ + local, + object, + uuid(8dee6511-554d-11d1-9fea-00600832db4a), + pointer_default(unique) + ] + interface IExtendTaskPad : IUnknown + { + HRESULT TaskNotify([in] IDataObject* pdo, [in] VARIANT* arg, [in] VARIANT* param); + HRESULT EnumTasks([in] IDataObject * pdo, [in,string] LPOLESTR szTaskGroup, + [out] IEnumTASK** ppEnumTASK); + HRESULT GetTitle([in,string] LPOLESTR pszGroup, [out,string] LPOLESTR * pszTitle); + HRESULT GetDescriptiveText([in,string] LPOLESTR pszGroup, [out,string] LPOLESTR * pszDescriptiveText); + HRESULT GetBackground([in,string] LPOLESTR pszGroup, [out] MMC_TASK_DISPLAY_OBJECT * pTDO); + HRESULT GetListPadInfo ([in,string] LPOLESTR pszGroup, [out] MMC_LISTPAD_INFO * lpListPadInfo); + }; + + [ + object, + uuid(103D842A-AA63-11D1-A7E1-00C04FD8D565), + pointer_default(unique) + ] + interface IConsole2 : IConsole + { + HRESULT Expand([in] HSCOPEITEM hItem, [in] BOOL bExpand); + HRESULT IsTaskpadViewPreferred(); + HRESULT SetStatusText ([in, string] LPOLESTR pszStatusText); + }; + + [ + object, + uuid(cc593830-b926-11d1-8063-0000f875a9ce), + pointer_default(unique) + ] + interface IDisplayHelp : IUnknown + { + HRESULT ShowTopic([in] LPOLESTR pszHelpTopic); + }; + + [ + local, + object, + uuid(72782D7A-A4A0-11d1-AF0F-00C04FB6DD2C), + pointer_default(unique) + ] + interface IRequiredExtensions : IUnknown + { + HRESULT EnableAllExtensions(); + HRESULT GetFirstExtension([out] LPCLSID pExtCLSID); + HRESULT GetNextExtension([out] LPCLSID pExtCLSID); + }; + + [ + object, + uuid(DE40B7A4-0F65-11d2-8E25-00C04F8ECD78), + pointer_default(unique) + ] + interface IStringTable : IUnknown + { + HRESULT AddString([in] LPCOLESTR pszAdd, [out] MMC_STRING_ID* pStringID); + HRESULT GetString([in] MMC_STRING_ID StringID, [in] ULONG cchBuffer, + [out, size_is(cchBuffer)] LPOLESTR lpBuffer, [out] ULONG* pcchOut); + HRESULT GetStringLength([in] MMC_STRING_ID StringID, [out] ULONG* pcchString); + HRESULT DeleteString([in] MMC_STRING_ID StringID); + HRESULT DeleteAllStrings (); + HRESULT FindString([in] LPCOLESTR pszFind, [out] MMC_STRING_ID* pStringID); + HRESULT Enumerate([out] IEnumString** ppEnum); + }; +cpp_quote("#endif // MMC_VER >= 0x0110") + + +cpp_quote("#if (MMC_VER >= 0x0120)") +const DWORD HDI_HIDDEN = 0x0001; + +typedef struct _MMC_COLUMN_DATA +{ + int nColIndex; + DWORD dwFlags; + int nWidth; + ULONG_PTR ulReserved; +} MMC_COLUMN_DATA; + +typedef struct _MMC_COLUMN_SET_DATA +{ + int cbSize; + int nNumCols; + MMC_COLUMN_DATA* pColData; +} MMC_COLUMN_SET_DATA; + +typedef struct _MMC_SORT_DATA +{ + int nColIndex; + DWORD dwSortOptions; + ULONG_PTR ulReserved; +} MMC_SORT_DATA; + +typedef struct _MMC_SORT_SET_DATA +{ + int cbSize; + int nNumItems; + MMC_SORT_DATA* pSortData; +} MMC_SORT_SET_DATA; + + [ + object, + uuid(547C1354-024D-11d3-A707-00C04F8EF4CB), + pointer_default(unique) + ] + interface IColumnData : IUnknown + { + HRESULT SetColumnConfigData([in] SColumnSetID* pColID, [in] MMC_COLUMN_SET_DATA* pColSetData); + HRESULT GetColumnConfigData([in] SColumnSetID* pColID, [out] MMC_COLUMN_SET_DATA** ppColSetData); + HRESULT SetColumnSortData([in] SColumnSetID* pColID, [in] MMC_SORT_SET_DATA* pColSortData); + HRESULT GetColumnSortData([in] SColumnSetID* pColID, [out] MMC_SORT_SET_DATA** ppColSortData); + }; + + [ + object, + uuid(80F94174-FCCC-11d2-B991-00C04F8ECD78), + pointer_default(unique) + ] + interface IMessageView : IUnknown + { + HRESULT SetTitleText([in] LPCOLESTR pszTitleText); + HRESULT SetBodyText([in] LPCOLESTR pszBodyText); + + typedef enum tagIconIdentifier + { + Icon_None = 0, + Icon_Error = 32513, + Icon_Question = 32514, + Icon_Warning = 32515, + Icon_Information = 32516, + + Icon_First = Icon_Error, + Icon_Last = Icon_Information, + } IconIdentifier; + + HRESULT SetIcon([in] IconIdentifier id); + HRESULT Clear(); + }; + + typedef struct _RDCITEMHDR + { + DWORD dwFlags; + MMC_COOKIE cookie; + LPARAM lpReserved; + } RDITEMHDR; + + const DWORD RDCI_ScopeItem = 0x80000000; + + typedef struct _RDCOMPARE + { + DWORD cbSize; + DWORD dwFlags; + int nColumn; + LPARAM lUserParam; + RDITEMHDR* prdch1; + RDITEMHDR* prdch2; + } RDCOMPARE; + + [ + object, + uuid(96933476-0251-11d3-AEB0-00C04F8ECD78), + pointer_default(unique) + ] + interface IResultDataCompareEx : IUnknown + { + HRESULT Compare([in] RDCOMPARE* prdc, [out] int* pnResult); + } + +cpp_quote("#endif // MMC_VER >= 0x0120") + + +cpp_quote("#if (MMC_VER >= 0x0200)") +typedef enum _MMC_VIEW_TYPE +{ + MMC_VIEW_TYPE_LIST, + MMC_VIEW_TYPE_HTML, + MMC_VIEW_TYPE_OCX + +} MMC_VIEW_TYPE; + +const DWORD RVTI_MISC_OPTIONS_NOLISTVIEWS = 0x0001; + +const DWORD RVTI_LIST_OPTIONS_NONE = 0x0000; +const DWORD RVTI_LIST_OPTIONS_OWNERDATALIST = 0x0002; +const DWORD RVTI_LIST_OPTIONS_MULTISELECT = 0x0004; +const DWORD RVTI_LIST_OPTIONS_FILTERED = 0x0008; +const DWORD RVTI_LIST_OPTIONS_USEFONTLINKING = 0x0020; +const DWORD RVTI_LIST_OPTIONS_EXCLUDE_SCOPE_ITEMS_FROM_LIST = 0x0040; +const DWORD RVTI_LIST_OPTIONS_LEXICAL_SORT = 0x0080; +const DWORD RVTI_LIST_OPTIONS_ALLOWPASTE = 0x0100; + +const DWORD RVTI_HTML_OPTIONS_NONE = 0x0000; +const DWORD RVTI_HTML_OPTIONS_NOLISTVIEW = 0x0001; + +const DWORD RVTI_OCX_OPTIONS_NONE = 0x0000; +const DWORD RVTI_OCX_OPTIONS_NOLISTVIEW = 0x0001; +const DWORD RVTI_OCX_OPTIONS_CACHE_OCX = 0x0002; + +typedef struct _RESULT_VIEW_TYPE_INFO +{ + LPOLESTR pstrPersistableViewDescription; + MMC_VIEW_TYPE eViewType; + DWORD dwMiscOptions; + + [switch_type(MMC_VIEW_TYPE), switch_is((MMC_VIEW_TYPE)eViewType)] + _ANONYMOUS_UNION union + { + + [case(MMC_VIEW_TYPE_LIST)] + DWORD dwListOptions; + + [case(MMC_VIEW_TYPE_HTML)] + _ANONYMOUS_STRUCT struct + { + DWORD dwHTMLOptions; + LPOLESTR pstrURL; + } DUMMYSTRUCTNAME; + + [case(MMC_VIEW_TYPE_OCX)] + _ANONYMOUS_STRUCT struct + { + DWORD dwOCXOptions; + LPUNKNOWN pUnkControl; + } DUMMYSTRUCTNAME2; + + [default]; + } DUMMYUNIONNAME; +} RESULT_VIEW_TYPE_INFO, *PRESULT_VIEW_TYPE_INFO; + +const wchar_t* CCF_DESCRIPTION = L"CCF_DESCRIPTION"; +const wchar_t* CCF_HTML_DETAILS = L"CCF_HTML_DETAILS"; + +typedef struct _CONTEXTMENUITEM2 +{ + LPWSTR strName; + LPWSTR strStatusBarText; + LONG lCommandID; + LONG lInsertionPointID; + LONG fFlags; + LONG fSpecialFlags; + LPWSTR strLanguageIndependentName; +} CONTEXTMENUITEM2; + +typedef CONTEXTMENUITEM2* LPCONTEXTMENUITEM2; + +typedef struct _MMC_EXT_VIEW_DATA +{ + GUID viewID; + LPCOLESTR pszURL; + LPCOLESTR pszViewTitle; + LPCOLESTR pszTooltipText; + BOOL bReplacesDefaultView; +} MMC_EXT_VIEW_DATA, *PMMC_EXT_VIEW_DATA; + +const DWORD MMC_DEFAULT_OPERATION_COPY = 0x0001; + + [ + object, + uuid(CCA0F2D2-82DE-41B5-BF47-3B2076273D5C), + pointer_default(unique) + ] + interface IComponentData2 : IComponentData + { + HRESULT QueryDispatch([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type, + [out] LPDISPATCH* ppDispatch); + }; + + [ + object, + uuid(79A2D615-4A10-4ED4-8C65-8633F9335095), + pointer_default(unique) + ] + interface IComponent2 : IComponent + { + HRESULT QueryDispatch([in] MMC_COOKIE cookie, [in] DATA_OBJECT_TYPES type, + [out] LPDISPATCH* ppDispatch); + HRESULT GetResultViewType2([in] MMC_COOKIE cookie, [in, out] PRESULT_VIEW_TYPE_INFO pResultViewType); + HRESULT RestoreResultView([in] MMC_COOKIE cookie, [in] PRESULT_VIEW_TYPE_INFO pResultViewType); + }; + + [ + object, + uuid(E178BC0E-2ED0-4b5e-8097-42C9087E8B33), + pointer_default(unique) + ] + interface IContextMenuCallback2 : IUnknown + { + HRESULT AddItem([in] CONTEXTMENUITEM2* pItem); + }; + + [ + uuid(A8D2C5FE-CDCB-4b9d-BDE5-A27343FF54BC), + ] + interface IMMCVersionInfo : IUnknown + { + HRESULT GetMMCVersion([out] long * pVersionMajor, [out] long * pVersionMinor); + } + + [ + uuid(9EECDD85-B715-4188-8A72-61159ABDB8C4), + version(1.0), + ] + library MMCVersionLib + { + importlib("stdole2.tlb"); + + [ + uuid(D6FEDB1D-CF21-4bd9-AF3B-C5468E9C6684) + ] + coclass MMCVersionInfo + { + [default] interface IMMCVersionInfo; + }; + + [ + uuid(f0285374-dff1-11d3-b433-00c04f8ecd78) + ] + coclass ConsolePower + { + [default] interface IConsolePower; + }; + }; + + [ + object, + uuid(89995CEE-D2ED-4c0e-AE5E-DF7E76F3FA53), + pointer_default(unique) + ] + interface IExtendView : IUnknown + { + HRESULT GetViews([in] LPDATAOBJECT pDataObject, [in] LPVIEWEXTENSIONCALLBACK pViewExtensionCallback); + }; + + [ + object, + uuid(34DD928A-7599-41E5-9F5E-D6BC3062C2DA), + pointer_default(unique) + ] + interface IViewExtensionCallback : IUnknown + { + HRESULT AddView([in] PMMC_EXT_VIEW_DATA pExtViewData); + } + + [ + object, + uuid(1cfbdd0e-62ca-49ce-a3af-dbb2de61b068), + pointer_default(unique) + ] + interface IConsolePower : IUnknown + { + HRESULT SetExecutionState([in] DWORD dwAdd, [in] DWORD dwRemove); + HRESULT ResetIdleTimer([in] DWORD dwFlags); + }; + + [ + object, + uuid(3333759f-fe4f-4975-b143-fec0a5dd6d65), + pointer_default(unique) + ] + interface IConsolePowerSink : IUnknown + { + HRESULT OnPowerBroadcast([in] UINT nEvent, [in] LPARAM lParam, [out] LRESULT* plReturn); + }; + + [ + object, + uuid(15BC4D24-A522-4406-AA55-0749537A6865), + pointer_default(unique) + ] + interface INodeProperties : IUnknown + { + HRESULT GetProperty([in] LPDATAOBJECT pDataObject, [in] BSTR szPropertyName, [out] PBSTR pbstrProperty); + }; + + [ + object, + uuid(4F85EFDB-D0E1-498c-8D4A-D010DFDD404F), + pointer_default(unique) + ] + interface IConsole3 : IConsole2 + { + HRESULT RenameScopeItem([in] HSCOPEITEM hScopeItem); + }; + + [ + object, + uuid(0F36E0EB-A7F1-4a81-BE5A-9247F7DE4B1B), + pointer_default(unique) + ] + interface IResultData2 : IResultData + { + HRESULT RenameResultItem([in] HRESULTITEM itemID); + }; + +cpp_quote("#endif // MMC_VER >= 0x0200") + +cpp_quote("#if (MMC_VER >= 0x0210)") +typedef enum _MMC_ITEM_OVERLAY +{ + MMC_ITEM_OVERLAY_NONE = 0, + MMC_ITEM_OVERLAY_ERROR = 1, + MMC_ITEM_OVERLAY_WARNING = 2, + MMC_ITEM_OVERLAY_INFO = 3, + MMC_ITEM_OVERLAY_BUSY = 4, + MMC_ITEM_OVERLAY_UNAVAILABLE = 5, + MMC_ITEM_OVERLAY_SHORTCUT = 6, + MMC_ITEM_OVERLAY_RUNNING = 7, + MMC_ITEM_OVERLAY_PAUSED = 8, + MMC_ITEM_OVERLAY_STOPPED = 9, + MMC_ITEM_OVERLAY_COMPLETE = 10 +} MMC_ITEM_OVERLAY; + +const DWORD MMC_ITEM_OVERLAY_STATE_MASK = 0x0F00; +const DWORD MMC_ITEM_OVERLAY_STATE_SHIFT = 8; + +cpp_quote("#define MMC_OVERLAY_ITEM_INDEX_TO_ITEM_STATE(i) (((i) << MMC_ITEM_OVERLAY_STATE_SHIFT) & MMC_ITEM_OVERLAY_STATE_MASK)") +cpp_quote("#define MMC_OVERLAY_ITEM_INDEX_FROM_ITEM_STATE(state) (((state) & MMC_ITEM_OVERLAY_STATE_MASK) >> MMC_ITEM_OVERLAY_STATE_SHIFT)") + +const DWORD MMC_ITEM_STATE_MASK = 0x00FF; + + +cpp_quote("#endif // MMC_VER >= 0x0210") Propchange: branches/iut-mmc/include/psdk/mmc.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/iut-mmc/include/psdk/psdk.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/include/psdk/psdk.rbuil…
============================================================================== --- branches/iut-mmc/include/psdk/psdk.rbuild [iso-8859-1] (original) +++ branches/iut-mmc/include/psdk/psdk.rbuild [iso-8859-1] Sun Feb 12 14:09:40 2012 @@ -28,6 +28,7 @@ <file>indexsrv.idl</file> <file>mimeinfo.idl</file> <file>mlang.idl</file> + <file>mmc.idl</file> <file>msctf.idl</file> <file>msdadc.idl</file> <file>mshtml.idl</file> @@ -86,4 +87,4 @@ <module name="stdole2" type="embeddedtypelib"> <file>stdole2.idl</file> </module> -</group> +</group>
12 years, 10 months
1
0
0
0
[akhaldi] 55560: [XCOPY] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Feb 12 13:33:30 2012 New Revision: 55560 URL:
http://svn.reactos.org/svn/reactos?rev=55560&view=rev
Log: [XCOPY] * Sync to Wine 1.3.37. Modified: trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c [iso-8859-1] Sun Feb 12 13:33:30 2012 @@ -48,22 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xcopy); -/* Prototypes */ -static int XCOPY_ParseCommandLine(WCHAR *suppliedsource, - WCHAR *supplieddestination, DWORD *flags); -static int XCOPY_ProcessSourceParm(WCHAR *suppliedsource, WCHAR *stem, - WCHAR *spec, DWORD flags); -static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, - WCHAR *spec, WCHAR *srcspec, DWORD flags); -static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec, - WCHAR *deststem, WCHAR *destspec, - DWORD flags); -static BOOL XCOPY_CreateDirectory(const WCHAR* path); -static BOOL XCOPY_ProcessExcludeList(WCHAR* parms); -static BOOL XCOPY_ProcessExcludeFile(WCHAR* filename, WCHAR* endOfName); -static WCHAR *XCOPY_LoadMessage(UINT id); -static void XCOPY_FailMessage(DWORD err); -static int XCOPY_wprintf(const WCHAR *format, ...); /* Typedefs */ typedef struct _EXCLUDELIST @@ -82,8 +66,6 @@ static const WCHAR wchr_dot[] = {'.', 0}; static const WCHAR wchr_dotdot[] = {'.', '.', 0}; -/* Constants (Mostly for widechars) */ - /* To minimize stack usage during recursion, some temporary variables made global */ @@ -92,105 +74,570 @@ /* ========================================================================= - main - Main entrypoint for the xcopy command - - Processes the args, and drives the actual copying + * Load a string from the resource file, handling any error + * Returns string retrieved from resource file + * ========================================================================= */ +static WCHAR *XCOPY_LoadMessage(UINT id) { + static WCHAR msg[MAXSTRING]; + const WCHAR failedMsg[] = {'F', 'a', 'i', 'l', 'e', 'd', '!', 0}; + + if (!LoadStringW(GetModuleHandleW(NULL), id, msg, sizeof(msg)/sizeof(WCHAR))) { + WINE_FIXME("LoadString failed with %d\n", GetLastError()); + lstrcpyW(msg, failedMsg); + } + return msg; +} + +/* ========================================================================= + * Output a formatted unicode string. Ideally this will go to the console + * and hence required WriteConsoleW to output it, however if file i/o is + * redirected, it needs to be WriteFile'd using OEM (not ANSI) format + * ========================================================================= */ +static int __cdecl XCOPY_wprintf(const WCHAR *format, ...) { + + static WCHAR *output_bufW = NULL; + static char *output_bufA = NULL; + static BOOL toConsole = TRUE; + static BOOL traceOutput = FALSE; +#define MAX_WRITECONSOLE_SIZE 65535 + + __ms_va_list parms; + DWORD nOut; + int len; + DWORD res = 0; + + /* + * Allocate buffer to use when writing to console + * Note: Not freed - memory will be allocated once and released when + * xcopy ends + */ + + if (!output_bufW) output_bufW = HeapAlloc(GetProcessHeap(), 0, + MAX_WRITECONSOLE_SIZE); + if (!output_bufW) { + WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n"); + return 0; + } + + __ms_va_start(parms, format); + SetLastError(NO_ERROR); + len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, output_bufW, + MAX_WRITECONSOLE_SIZE/sizeof(*output_bufW), &parms); + __ms_va_end(parms); + if (len == 0 && GetLastError() != NO_ERROR) { + WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format)); + return 0; + } + + /* Try to write as unicode whenever we think it's a console */ + if (toConsole) { + res = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), + output_bufW, len, &nOut, NULL); + } + + /* If writing to console has failed (ever) we assume it's file + i/o so convert to OEM codepage and output */ + if (!res) { + BOOL usedDefaultChar = FALSE; + DWORD convertedChars; + + toConsole = FALSE; + + /* + * Allocate buffer to use when writing to file. Not freed, as above + */ + if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, + MAX_WRITECONSOLE_SIZE); + if (!output_bufA) { + WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n"); + return 0; + } + + /* Convert to OEM, then output */ + convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, output_bufW, + len, output_bufA, MAX_WRITECONSOLE_SIZE, + "?", &usedDefaultChar); + WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), output_bufA, convertedChars, + &nOut, FALSE); + } + + /* Trace whether screen or console */ + if (!traceOutput) { + WINE_TRACE("Writing to console? (%d)\n", toConsole); + traceOutput = TRUE; + } + return nOut; +} + +/* ========================================================================= + * Load a string for a system error and writes it to the screen + * Returns string retrieved from resource file + * ========================================================================= */ +static void XCOPY_FailMessage(DWORD err) { + LPWSTR lpMsgBuf; + int status; + + status = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, err, 0, + (LPWSTR) &lpMsgBuf, 0, NULL); + if (!status) { + WINE_FIXME("FIXME: Cannot display message for error %d, status %d\n", + err, GetLastError()); + } else { + const WCHAR infostr[] = {'%', '1', '\n', 0}; + XCOPY_wprintf(infostr, lpMsgBuf); + LocalFree ((HLOCAL)lpMsgBuf); + } +} + + +/* ========================================================================= + * Routine copied from cmd.exe md command - + * This works recursively. so creating dir1\dir2\dir3 will create dir1 and + * dir2 if they do not already exist. + * ========================================================================= */ +static BOOL XCOPY_CreateDirectory(const WCHAR* path) +{ + int len; + WCHAR *new_path; + BOOL ret = TRUE; + + new_path = HeapAlloc(GetProcessHeap(),0, sizeof(WCHAR) * (lstrlenW(path)+1)); + lstrcpyW(new_path,path); + + while ((len = lstrlenW(new_path)) && new_path[len - 1] == '\\') + new_path[len - 1] = 0; + + while (!CreateDirectoryW(new_path,NULL)) + { + WCHAR *slash; + DWORD last_error = GetLastError(); + if (last_error == ERROR_ALREADY_EXISTS) + break; + + if (last_error != ERROR_PATH_NOT_FOUND) + { + ret = FALSE; + break; + } + + if (!(slash = wcsrchr(new_path,'\\')) && ! (slash = wcsrchr(new_path,'/'))) + { + ret = FALSE; + break; + } + + len = slash - new_path; + new_path[len] = 0; + if (!XCOPY_CreateDirectory(new_path)) + { + ret = FALSE; + break; + } + new_path[len] = '\\'; + } + HeapFree(GetProcessHeap(),0,new_path); + return ret; +} + +/* ========================================================================= + * Process a single file from the /EXCLUDE: file list, building up a list + * of substrings to avoid copying + * Returns TRUE on any failure + * ========================================================================= */ +static BOOL XCOPY_ProcessExcludeFile(WCHAR* filename, WCHAR* endOfName) { + + WCHAR endChar = *endOfName; + WCHAR buffer[MAXSTRING]; + FILE *inFile = NULL; + const WCHAR readTextMode[] = {'r', 't', 0}; + + /* Null terminate the filename (temporarily updates the filename hence + parms not const) */ + *endOfName = 0x00; + + /* Open the file */ + inFile = _wfopen(filename, readTextMode); + if (inFile == NULL) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_OPENFAIL), filename); + *endOfName = endChar; + return TRUE; + } + + /* Process line by line */ + while (fgetws(buffer, sizeof(buffer)/sizeof(WCHAR), inFile) != NULL) { + EXCLUDELIST *thisEntry; + int length = lstrlenW(buffer); + + /* Strip CRLF */ + buffer[length-1] = 0x00; + + /* If more than CRLF */ + if (length > 1) { + thisEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(EXCLUDELIST)); + thisEntry->next = excludeList; + excludeList = thisEntry; + thisEntry->name = HeapAlloc(GetProcessHeap(), 0, + (length * sizeof(WCHAR))+1); + lstrcpyW(thisEntry->name, buffer); + CharUpperBuffW(thisEntry->name, length); + WINE_TRACE("Read line : '%s'\n", wine_dbgstr_w(thisEntry->name)); + } + } + + /* See if EOF or error occurred */ + if (!feof(inFile)) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_READFAIL), filename); + *endOfName = endChar; + return TRUE; + } + + /* Revert the input string to original form, and cleanup + return */ + *endOfName = endChar; + fclose(inFile); + return FALSE; +} + +/* ========================================================================= + * Process the /EXCLUDE: file list, building up a list of substrings to + * avoid copying + * Returns TRUE on any failure + * ========================================================================= */ +static BOOL XCOPY_ProcessExcludeList(WCHAR* parms) { + + WCHAR *filenameStart = parms; + + WINE_TRACE("/EXCLUDE parms: '%s'\n", wine_dbgstr_w(parms)); + excludeList = NULL; + + while (*parms && *parms != ' ' && *parms != '/') { + + /* If found '+' then process the file found so far */ + if (*parms == '+') { + if (XCOPY_ProcessExcludeFile(filenameStart, parms)) { + return TRUE; + } + filenameStart = parms+1; + } + parms++; + } + + if (filenameStart != parms) { + if (XCOPY_ProcessExcludeFile(filenameStart, parms)) { + return TRUE; + } + } + + return FALSE; +} + +/* ========================================================================= + XCOPY_DoCopy - Recursive function to copy files based on input parms + of a stem and a spec + + This works by using FindFirstFile supplying the source stem and spec. + If results are found, any non-directory ones are processed + Then, if /S or /E is supplied, another search is made just for + directories, and this function is called again for that directory + ========================================================================= */ -int wmain (int argc, WCHAR *argvW[]) +static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec, + WCHAR *deststem, WCHAR *destspec, + DWORD flags) { - int rc = 0; - WCHAR suppliedsource[MAX_PATH] = {0}; /* As supplied on the cmd line */ - WCHAR supplieddestination[MAX_PATH] = {0}; - WCHAR sourcestem[MAX_PATH] = {0}; /* Stem of source */ - WCHAR sourcespec[MAX_PATH] = {0}; /* Filespec of source */ - WCHAR destinationstem[MAX_PATH] = {0}; /* Stem of destination */ - WCHAR destinationspec[MAX_PATH] = {0}; /* Filespec of destination */ - WCHAR copyCmd[MAXSTRING]; /* COPYCMD env var */ - DWORD flags = 0; /* Option flags */ - const WCHAR PROMPTSTR1[] = {'/', 'Y', 0}; - const WCHAR PROMPTSTR2[] = {'/', 'y', 0}; - const WCHAR COPYCMD[] = {'C', 'O', 'P', 'Y', 'C', 'M', 'D', 0}; - - /* Preinitialize flags based on COPYCMD */ - if (GetEnvironmentVariableW(COPYCMD, copyCmd, MAXSTRING)) { - if (wcsstr(copyCmd, PROMPTSTR1) != NULL || - wcsstr(copyCmd, PROMPTSTR2) != NULL) { - flags |= OPT_NOPROMPT; - } - } - - /* FIXME: On UNIX, files starting with a '.' are treated as hidden under - wine, but on windows these can be normal files. At least one installer - uses files such as .packlist and (validly) expects them to be copied. - Under wine, if we do not copy hidden files by default then they get - lose */ - flags |= OPT_COPYHIDSYS; - - /* - * Parse the command line - */ - if ((rc = XCOPY_ParseCommandLine(suppliedsource, supplieddestination, - &flags)) != RC_OK) { - if (rc == RC_HELP) - return RC_OK; - else - return rc; - } - - /* Trace out the supplied information */ - WINE_TRACE("Supplied parameters:\n"); - WINE_TRACE("Source : '%s'\n", wine_dbgstr_w(suppliedsource)); - WINE_TRACE("Destination : '%s'\n", wine_dbgstr_w(supplieddestination)); - - /* Extract required information from source specification */ - rc = XCOPY_ProcessSourceParm(suppliedsource, sourcestem, sourcespec, flags); - if (rc != RC_OK) return rc; - - /* Extract required information from destination specification */ - rc = XCOPY_ProcessDestParm(supplieddestination, destinationstem, - destinationspec, sourcespec, flags); - if (rc != RC_OK) return rc; - - /* Trace out the resulting information */ - WINE_TRACE("Resolved parameters:\n"); - WINE_TRACE("Source Stem : '%s'\n", wine_dbgstr_w(sourcestem)); - WINE_TRACE("Source Spec : '%s'\n", wine_dbgstr_w(sourcespec)); - WINE_TRACE("Dest Stem : '%s'\n", wine_dbgstr_w(destinationstem)); - WINE_TRACE("Dest Spec : '%s'\n", wine_dbgstr_w(destinationspec)); - - /* Pause if necessary */ - if (flags & OPT_PAUSE) { - DWORD count; - char pausestr[10]; - - XCOPY_wprintf(XCOPY_LoadMessage(STRING_PAUSE)); - ReadFile (GetStdHandle(STD_INPUT_HANDLE), pausestr, sizeof(pausestr), - &count, NULL); - } - - /* Now do the hard work... */ - rc = XCOPY_DoCopy(sourcestem, sourcespec, - destinationstem, destinationspec, - flags); - - /* Clear up exclude list allocated memory */ - while (excludeList) { - EXCLUDELIST *pos = excludeList; - excludeList = excludeList -> next; - HeapFree(GetProcessHeap(), 0, pos->name); - HeapFree(GetProcessHeap(), 0, pos); - } - - /* Finished - print trailer and exit */ - if (flags & OPT_SIMULATE) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_SIMCOPY), filesCopied); - } else if (!(flags & OPT_NOCOPY)) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPY), filesCopied); - } - if (rc == RC_OK && filesCopied == 0) rc = RC_NOFILES; - return rc; - -} + WIN32_FIND_DATAW *finddata; + HANDLE h; + BOOL findres = TRUE; + WCHAR *inputpath, *outputpath; + BOOL copiedFile = FALSE; + DWORD destAttribs, srcAttribs; + BOOL skipFile; + int ret = 0; + + /* Allocate some working memory on heap to minimize footprint */ + finddata = HeapAlloc(GetProcessHeap(), 0, sizeof(WIN32_FIND_DATAW)); + inputpath = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + outputpath = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + + /* Build the search info into a single parm */ + lstrcpyW(inputpath, srcstem); + lstrcatW(inputpath, srcspec); + + /* Search 1 - Look for matching files */ + h = FindFirstFileW(inputpath, finddata); + while (h != INVALID_HANDLE_VALUE && findres) { + + skipFile = FALSE; + + /* Ignore . and .. */ + if (lstrcmpW(finddata->cFileName, wchr_dot)==0 || + lstrcmpW(finddata->cFileName, wchr_dotdot)==0 || + finddata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + + WINE_TRACE("Skipping directory, . or .. (%s)\n", wine_dbgstr_w(finddata->cFileName)); + } else { + + /* Get the filename information */ + lstrcpyW(copyFrom, srcstem); + if (flags & OPT_SHORTNAME) { + lstrcatW(copyFrom, finddata->cAlternateFileName); + } else { + lstrcatW(copyFrom, finddata->cFileName); + } + + lstrcpyW(copyTo, deststem); + if (*destspec == 0x00) { + if (flags & OPT_SHORTNAME) { + lstrcatW(copyTo, finddata->cAlternateFileName); + } else { + lstrcatW(copyTo, finddata->cFileName); + } + } else { + lstrcatW(copyTo, destspec); + } + + /* Do the copy */ + WINE_TRACE("ACTION: Copy '%s' -> '%s'\n", wine_dbgstr_w(copyFrom), + wine_dbgstr_w(copyTo)); + if (!copiedFile && !(flags & OPT_SIMULATE)) XCOPY_CreateDirectory(deststem); + + /* See if allowed to copy it */ + srcAttribs = GetFileAttributesW(copyFrom); + WINE_TRACE("Source attribs: %d\n", srcAttribs); + + if ((srcAttribs & FILE_ATTRIBUTE_HIDDEN) || + (srcAttribs & FILE_ATTRIBUTE_SYSTEM)) { + + if (!(flags & OPT_COPYHIDSYS)) { + skipFile = TRUE; + } + } + + if (!(srcAttribs & FILE_ATTRIBUTE_ARCHIVE) && + (flags & OPT_ARCHIVEONLY)) { + skipFile = TRUE; + } + + /* See if file exists */ + destAttribs = GetFileAttributesW(copyTo); + WINE_TRACE("Dest attribs: %d\n", srcAttribs); + + /* Check date ranges if a destination file already exists */ + if (!skipFile && (flags & OPT_DATERANGE) && + (CompareFileTime(&finddata->ftLastWriteTime, &dateRange) < 0)) { + WINE_TRACE("Skipping file as modified date too old\n"); + skipFile = TRUE; + } + + /* If just /D supplied, only overwrite if src newer than dest */ + if (!skipFile && (flags & OPT_DATENEWER) && + (destAttribs != INVALID_FILE_ATTRIBUTES)) { + HANDLE h = CreateFileW(copyTo, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, + NULL); + if (h != INVALID_HANDLE_VALUE) { + FILETIME writeTime; + GetFileTime(h, NULL, NULL, &writeTime); + + if (CompareFileTime(&finddata->ftLastWriteTime, &writeTime) <= 0) { + WINE_TRACE("Skipping file as dest newer or same date\n"); + skipFile = TRUE; + } + CloseHandle(h); + } + } + + /* See if exclude list provided. Note since filenames are case + insensitive, need to uppercase the filename before doing + strstr */ + if (!skipFile && (flags & OPT_EXCLUDELIST)) { + EXCLUDELIST *pos = excludeList; + WCHAR copyFromUpper[MAX_PATH]; + + /* Uppercase source filename */ + lstrcpyW(copyFromUpper, copyFrom); + CharUpperBuffW(copyFromUpper, lstrlenW(copyFromUpper)); + + /* Loop through testing each exclude line */ + while (pos) { + if (wcsstr(copyFromUpper, pos->name) != NULL) { + WINE_TRACE("Skipping file as matches exclude '%s'\n", + wine_dbgstr_w(pos->name)); + skipFile = TRUE; + pos = NULL; + } else { + pos = pos->next; + } + } + } + + /* Prompt each file if necessary */ + if (!skipFile && (flags & OPT_SRCPROMPT)) { + DWORD count; + char answer[10]; + BOOL answered = FALSE; + WCHAR yesChar[2]; + WCHAR noChar[2]; + + /* Read the Y and N characters from the resource file */ + wcscpy(yesChar, XCOPY_LoadMessage(STRING_YES_CHAR)); + wcscpy(noChar, XCOPY_LoadMessage(STRING_NO_CHAR)); + + while (!answered) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_SRCPROMPT), copyFrom); + ReadFile (GetStdHandle(STD_INPUT_HANDLE), answer, sizeof(answer), + &count, NULL); + + answered = TRUE; + if (toupper(answer[0]) == noChar[0]) + skipFile = TRUE; + else if (toupper(answer[0]) != yesChar[0]) + answered = FALSE; + } + } + + if (!skipFile && + destAttribs != INVALID_FILE_ATTRIBUTES && !(flags & OPT_NOPROMPT)) { + DWORD count; + char answer[10]; + BOOL answered = FALSE; + WCHAR yesChar[2]; + WCHAR allChar[2]; + WCHAR noChar[2]; + + /* Read the A,Y and N characters from the resource file */ + wcscpy(yesChar, XCOPY_LoadMessage(STRING_YES_CHAR)); + wcscpy(allChar, XCOPY_LoadMessage(STRING_ALL_CHAR)); + wcscpy(noChar, XCOPY_LoadMessage(STRING_NO_CHAR)); + + while (!answered) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_OVERWRITE), copyTo); + ReadFile (GetStdHandle(STD_INPUT_HANDLE), answer, sizeof(answer), + &count, NULL); + + answered = TRUE; + if (toupper(answer[0]) == allChar[0]) + flags |= OPT_NOPROMPT; + else if (toupper(answer[0]) == noChar[0]) + skipFile = TRUE; + else if (toupper(answer[0]) != yesChar[0]) + answered = FALSE; + } + } + + /* See if it has to exist! */ + if (destAttribs == INVALID_FILE_ATTRIBUTES && (flags & OPT_MUSTEXIST)) { + skipFile = TRUE; + } + + /* Output a status message */ + if (!skipFile) { + if (flags & OPT_QUIET) { + /* Skip message */ + } else if (flags & OPT_FULL) { + const WCHAR infostr[] = {'%', '1', ' ', '-', '>', ' ', + '%', '2', '\n', 0}; + + XCOPY_wprintf(infostr, copyFrom, copyTo); + } else { + const WCHAR infostr[] = {'%', '1', '\n', 0}; + XCOPY_wprintf(infostr, copyFrom); + } + + /* If allowing overwriting of read only files, remove any + write protection */ + if ((destAttribs & FILE_ATTRIBUTE_READONLY) && + (flags & OPT_REPLACEREAD)) { + SetFileAttributesW(copyTo, destAttribs & ~FILE_ATTRIBUTE_READONLY); + } + + copiedFile = TRUE; + if (flags & OPT_SIMULATE || flags & OPT_NOCOPY) { + /* Skip copy */ + } else if (CopyFileW(copyFrom, copyTo, FALSE) == 0) { + + DWORD error = GetLastError(); + XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPYFAIL), + copyFrom, copyTo, error); + XCOPY_FailMessage(error); + + if (flags & OPT_IGNOREERRORS) { + skipFile = TRUE; + } else { + ret = RC_WRITEERROR; + goto cleanup; + } + } + + /* If /M supplied, remove the archive bit after successful copy */ + if (!skipFile) { + if ((srcAttribs & FILE_ATTRIBUTE_ARCHIVE) && + (flags & OPT_REMOVEARCH)) { + SetFileAttributesW(copyFrom, (srcAttribs & ~FILE_ATTRIBUTE_ARCHIVE)); + } + filesCopied++; + } + } + } + + /* Find next file */ + findres = FindNextFileW(h, finddata); + } + FindClose(h); + + /* Search 2 - do subdirs */ + if (flags & OPT_RECURSIVE) { + lstrcpyW(inputpath, srcstem); + lstrcatW(inputpath, wchr_star); + findres = TRUE; + WINE_TRACE("Processing subdirs with spec: %s\n", wine_dbgstr_w(inputpath)); + + h = FindFirstFileW(inputpath, finddata); + while (h != INVALID_HANDLE_VALUE && findres) { + + /* Only looking for dirs */ + if ((finddata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + (lstrcmpW(finddata->cFileName, wchr_dot) != 0) && + (lstrcmpW(finddata->cFileName, wchr_dotdot) != 0)) { + + WINE_TRACE("Handling subdir: %s\n", wine_dbgstr_w(finddata->cFileName)); + + /* Make up recursive information */ + lstrcpyW(inputpath, srcstem); + lstrcatW(inputpath, finddata->cFileName); + lstrcatW(inputpath, wchr_slash); + + lstrcpyW(outputpath, deststem); + if (*destspec == 0x00) { + lstrcatW(outputpath, finddata->cFileName); + + /* If /E is supplied, create the directory now */ + if ((flags & OPT_EMPTYDIR) && + !(flags & OPT_SIMULATE)) + XCOPY_CreateDirectory(outputpath); + + lstrcatW(outputpath, wchr_slash); + } + + XCOPY_DoCopy(inputpath, srcspec, outputpath, destspec, flags); + } + + /* Find next one */ + findres = FindNextFileW(h, finddata); + } + } + +cleanup: + + /* free up memory */ + HeapFree(GetProcessHeap(), 0, finddata); + HeapFree(GetProcessHeap(), 0, inputpath); + HeapFree(GetProcessHeap(), 0, outputpath); + + return ret; +} + /* ========================================================================= XCOPY_ParseCommandLine - Parses the command line @@ -340,7 +787,7 @@ if (*pos++ != '-') isError = TRUE; } - /* Parse the arg : Day */ + /* Parse the arg : Year */ if (!isError) { st.wYear = _wtol(pos); while (*pos && isdigit(*pos)) pos++; @@ -578,564 +1025,104 @@ return RC_OK; } + /* ========================================================================= - XCOPY_DoCopy - Recursive function to copy files based on input parms - of a stem and a spec - - This works by using FindFirstFile supplying the source stem and spec. - If results are found, any non-directory ones are processed - Then, if /S or /E is supplied, another search is made just for - directories, and this function is called again for that directory - + main - Main entrypoint for the xcopy command + + Processes the args, and drives the actual copying ========================================================================= */ -static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec, - WCHAR *deststem, WCHAR *destspec, - DWORD flags) +int wmain (int argc, WCHAR *argvW[]) { - WIN32_FIND_DATAW *finddata; - HANDLE h; - BOOL findres = TRUE; - WCHAR *inputpath, *outputpath; - BOOL copiedFile = FALSE; - DWORD destAttribs, srcAttribs; - BOOL skipFile; - int ret = 0; - - /* Allocate some working memory on heap to minimize footprint */ - finddata = HeapAlloc(GetProcessHeap(), 0, sizeof(WIN32_FIND_DATAW)); - inputpath = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); - outputpath = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); - - /* Build the search info into a single parm */ - lstrcpyW(inputpath, srcstem); - lstrcatW(inputpath, srcspec); - - /* Search 1 - Look for matching files */ - h = FindFirstFileW(inputpath, finddata); - while (h != INVALID_HANDLE_VALUE && findres) { - - skipFile = FALSE; - - /* Ignore . and .. */ - if (lstrcmpW(finddata->cFileName, wchr_dot)==0 || - lstrcmpW(finddata->cFileName, wchr_dotdot)==0 || - finddata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - - WINE_TRACE("Skipping directory, . or .. (%s)\n", wine_dbgstr_w(finddata->cFileName)); - } else { - - /* Get the filename information */ - lstrcpyW(copyFrom, srcstem); - if (flags & OPT_SHORTNAME) { - lstrcatW(copyFrom, finddata->cAlternateFileName); - } else { - lstrcatW(copyFrom, finddata->cFileName); - } - - lstrcpyW(copyTo, deststem); - if (*destspec == 0x00) { - if (flags & OPT_SHORTNAME) { - lstrcatW(copyTo, finddata->cAlternateFileName); - } else { - lstrcatW(copyTo, finddata->cFileName); - } - } else { - lstrcatW(copyTo, destspec); - } - - /* Do the copy */ - WINE_TRACE("ACTION: Copy '%s' -> '%s'\n", wine_dbgstr_w(copyFrom), - wine_dbgstr_w(copyTo)); - if (!copiedFile && !(flags & OPT_SIMULATE)) XCOPY_CreateDirectory(deststem); - - /* See if allowed to copy it */ - srcAttribs = GetFileAttributesW(copyFrom); - WINE_TRACE("Source attribs: %d\n", srcAttribs); - - if ((srcAttribs & FILE_ATTRIBUTE_HIDDEN) || - (srcAttribs & FILE_ATTRIBUTE_SYSTEM)) { - - if (!(flags & OPT_COPYHIDSYS)) { - skipFile = TRUE; - } - } - - if (!(srcAttribs & FILE_ATTRIBUTE_ARCHIVE) && - (flags & OPT_ARCHIVEONLY)) { - skipFile = TRUE; - } - - /* See if file exists */ - destAttribs = GetFileAttributesW(copyTo); - WINE_TRACE("Dest attribs: %d\n", srcAttribs); - - /* Check date ranges if a destination file already exists */ - if (!skipFile && (flags & OPT_DATERANGE) && - (CompareFileTime(&finddata->ftLastWriteTime, &dateRange) < 0)) { - WINE_TRACE("Skipping file as modified date too old\n"); - skipFile = TRUE; - } - - /* If just /D supplied, only overwrite if src newer than dest */ - if (!skipFile && (flags & OPT_DATENEWER) && - (destAttribs != INVALID_FILE_ATTRIBUTES)) { - HANDLE h = CreateFileW(copyTo, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, - NULL); - if (h != INVALID_HANDLE_VALUE) { - FILETIME writeTime; - GetFileTime(h, NULL, NULL, &writeTime); - - if (CompareFileTime(&finddata->ftLastWriteTime, &writeTime) <= 0) { - WINE_TRACE("Skipping file as dest newer or same date\n"); - skipFile = TRUE; - } - CloseHandle(h); - } - } - - /* See if exclude list provided. Note since filenames are case - insensitive, need to uppercase the filename before doing - strstr */ - if (!skipFile && (flags & OPT_EXCLUDELIST)) { - EXCLUDELIST *pos = excludeList; - WCHAR copyFromUpper[MAX_PATH]; - - /* Uppercase source filename */ - lstrcpyW(copyFromUpper, copyFrom); - CharUpperBuffW(copyFromUpper, lstrlenW(copyFromUpper)); - - /* Loop through testing each exclude line */ - while (pos) { - if (wcsstr(copyFromUpper, pos->name) != NULL) { - WINE_TRACE("Skipping file as matches exclude '%s'\n", - wine_dbgstr_w(pos->name)); - skipFile = TRUE; - pos = NULL; - } else { - pos = pos->next; - } - } - } - - /* Prompt each file if necessary */ - if (!skipFile && (flags & OPT_SRCPROMPT)) { - DWORD count; - char answer[10]; - BOOL answered = FALSE; - WCHAR yesChar[2]; - WCHAR noChar[2]; - - /* Read the Y and N characters from the resource file */ - wcscpy(yesChar, XCOPY_LoadMessage(STRING_YES_CHAR)); - wcscpy(noChar, XCOPY_LoadMessage(STRING_NO_CHAR)); - - while (!answered) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_SRCPROMPT), copyFrom); - ReadFile (GetStdHandle(STD_INPUT_HANDLE), answer, sizeof(answer), - &count, NULL); - - answered = TRUE; - if (toupper(answer[0]) == noChar[0]) - skipFile = TRUE; - else if (toupper(answer[0]) != yesChar[0]) - answered = FALSE; - } - } - - if (!skipFile && - destAttribs != INVALID_FILE_ATTRIBUTES && !(flags & OPT_NOPROMPT)) { - DWORD count; - char answer[10]; - BOOL answered = FALSE; - WCHAR yesChar[2]; - WCHAR allChar[2]; - WCHAR noChar[2]; - - /* Read the A,Y and N characters from the resource file */ - wcscpy(yesChar, XCOPY_LoadMessage(STRING_YES_CHAR)); - wcscpy(allChar, XCOPY_LoadMessage(STRING_ALL_CHAR)); - wcscpy(noChar, XCOPY_LoadMessage(STRING_NO_CHAR)); - - while (!answered) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_OVERWRITE), copyTo); - ReadFile (GetStdHandle(STD_INPUT_HANDLE), answer, sizeof(answer), - &count, NULL); - - answered = TRUE; - if (toupper(answer[0]) == allChar[0]) - flags |= OPT_NOPROMPT; - else if (toupper(answer[0]) == noChar[0]) - skipFile = TRUE; - else if (toupper(answer[0]) != yesChar[0]) - answered = FALSE; - } - } - - /* See if it has to exist! */ - if (destAttribs == INVALID_FILE_ATTRIBUTES && (flags & OPT_MUSTEXIST)) { - skipFile = TRUE; - } - - /* Output a status message */ - if (!skipFile) { - if (flags & OPT_QUIET) { - /* Skip message */ - } else if (flags & OPT_FULL) { - const WCHAR infostr[] = {'%', 's', ' ', '-', '>', ' ', - '%', 's', '\n', 0}; - - XCOPY_wprintf(infostr, copyFrom, copyTo); - } else { - const WCHAR infostr[] = {'%', 's', '\n', 0}; - XCOPY_wprintf(infostr, copyFrom); - } - - /* If allowing overwriting of read only files, remove any - write protection */ - if ((destAttribs & FILE_ATTRIBUTE_READONLY) && - (flags & OPT_REPLACEREAD)) { - SetFileAttributesW(copyTo, destAttribs & ~FILE_ATTRIBUTE_READONLY); - } - - copiedFile = TRUE; - if (flags & OPT_SIMULATE || flags & OPT_NOCOPY) { - /* Skip copy */ - } else if (CopyFileW(copyFrom, copyTo, FALSE) == 0) { - - DWORD error = GetLastError(); - XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPYFAIL), - copyFrom, copyTo, error); - XCOPY_FailMessage(error); - - if (flags & OPT_IGNOREERRORS) { - skipFile = TRUE; - } else { - ret = RC_WRITEERROR; - goto cleanup; - } - } - - /* If /M supplied, remove the archive bit after successful copy */ - if (!skipFile) { - if ((srcAttribs & FILE_ATTRIBUTE_ARCHIVE) && - (flags & OPT_REMOVEARCH)) { - SetFileAttributesW(copyFrom, (srcAttribs & ~FILE_ATTRIBUTE_ARCHIVE)); - } - filesCopied++; - } - } - } - - /* Find next file */ - findres = FindNextFileW(h, finddata); - } - FindClose(h); - - /* Search 2 - do subdirs */ - if (flags & OPT_RECURSIVE) { - lstrcpyW(inputpath, srcstem); - lstrcatW(inputpath, wchr_star); - findres = TRUE; - WINE_TRACE("Processing subdirs with spec: %s\n", wine_dbgstr_w(inputpath)); - - h = FindFirstFileW(inputpath, finddata); - while (h != INVALID_HANDLE_VALUE && findres) { - - /* Only looking for dirs */ - if ((finddata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && - (lstrcmpW(finddata->cFileName, wchr_dot) != 0) && - (lstrcmpW(finddata->cFileName, wchr_dotdot) != 0)) { - - WINE_TRACE("Handling subdir: %s\n", wine_dbgstr_w(finddata->cFileName)); - - /* Make up recursive information */ - lstrcpyW(inputpath, srcstem); - lstrcatW(inputpath, finddata->cFileName); - lstrcatW(inputpath, wchr_slash); - - lstrcpyW(outputpath, deststem); - if (*destspec == 0x00) { - lstrcatW(outputpath, finddata->cFileName); - - /* If /E is supplied, create the directory now */ - if ((flags & OPT_EMPTYDIR) && - !(flags & OPT_SIMULATE)) - XCOPY_CreateDirectory(outputpath); - - lstrcatW(outputpath, wchr_slash); - } - - XCOPY_DoCopy(inputpath, srcspec, outputpath, destspec, flags); - } - - /* Find next one */ - findres = FindNextFileW(h, finddata); - } - } - -cleanup: - - /* free up memory */ - HeapFree(GetProcessHeap(), 0, finddata); - HeapFree(GetProcessHeap(), 0, inputpath); - HeapFree(GetProcessHeap(), 0, outputpath); - - return ret; -} - -/* ========================================================================= - * Routine copied from cmd.exe md command - - * This works recursively. so creating dir1\dir2\dir3 will create dir1 and - * dir2 if they do not already exist. - * ========================================================================= */ -static BOOL XCOPY_CreateDirectory(const WCHAR* path) -{ - int len; - WCHAR *new_path; - BOOL ret = TRUE; - - new_path = HeapAlloc(GetProcessHeap(),0, sizeof(WCHAR) * (lstrlenW(path)+1)); - lstrcpyW(new_path,path); - - while ((len = lstrlenW(new_path)) && new_path[len - 1] == '\\') - new_path[len - 1] = 0; - - while (!CreateDirectoryW(new_path,NULL)) - { - WCHAR *slash; - DWORD last_error = GetLastError(); - if (last_error == ERROR_ALREADY_EXISTS) - break; - - if (last_error != ERROR_PATH_NOT_FOUND) - { - ret = FALSE; - break; - } - - if (!(slash = wcsrchr(new_path,'\\')) && ! (slash = wcsrchr(new_path,'/'))) - { - ret = FALSE; - break; - } - - len = slash - new_path; - new_path[len] = 0; - if (!XCOPY_CreateDirectory(new_path)) - { - ret = FALSE; - break; - } - new_path[len] = '\\'; - } - HeapFree(GetProcessHeap(),0,new_path); - return ret; -} - -/* ========================================================================= - * Process the /EXCLUDE: file list, building up a list of substrings to - * avoid copying - * Returns TRUE on any failure - * ========================================================================= */ -static BOOL XCOPY_ProcessExcludeList(WCHAR* parms) { - - WCHAR *filenameStart = parms; - - WINE_TRACE("/EXCLUDE parms: '%s'\n", wine_dbgstr_w(parms)); - excludeList = NULL; - - while (*parms && *parms != ' ' && *parms != '/') { - - /* If found '+' then process the file found so far */ - if (*parms == '+') { - if (XCOPY_ProcessExcludeFile(filenameStart, parms)) { - return TRUE; - } - filenameStart = parms+1; - } - parms++; - } - - if (filenameStart != parms) { - if (XCOPY_ProcessExcludeFile(filenameStart, parms)) { - return TRUE; - } - } - - return FALSE; -} - -/* ========================================================================= - * Process a single file from the /EXCLUDE: file list, building up a list - * of substrings to avoid copying - * Returns TRUE on any failure - * ========================================================================= */ -static BOOL XCOPY_ProcessExcludeFile(WCHAR* filename, WCHAR* endOfName) { - - WCHAR endChar = *endOfName; - WCHAR buffer[MAXSTRING]; - FILE *inFile = NULL; - const WCHAR readTextMode[] = {'r', 't', 0}; - - /* Null terminate the filename (temporarily updates the filename hence - parms not const) */ - *endOfName = 0x00; - - /* Open the file */ - inFile = _wfopen(filename, readTextMode); - if (inFile == NULL) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_OPENFAIL), filename); - *endOfName = endChar; - return TRUE; - } - - /* Process line by line */ - while (fgetws(buffer, sizeof(buffer)/sizeof(WCHAR), inFile) != NULL) { - EXCLUDELIST *thisEntry; - int length = lstrlenW(buffer); - - /* Strip CRLF */ - buffer[length-1] = 0x00; - - /* If more than CRLF */ - if (length > 1) { - thisEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(EXCLUDELIST)); - thisEntry->next = excludeList; - excludeList = thisEntry; - thisEntry->name = HeapAlloc(GetProcessHeap(), 0, - (length * sizeof(WCHAR))+1); - lstrcpyW(thisEntry->name, buffer); - CharUpperBuffW(thisEntry->name, length); - WINE_TRACE("Read line : '%s'\n", wine_dbgstr_w(thisEntry->name)); - } - } - - /* See if EOF or error occurred */ - if (!feof(inFile)) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_READFAIL), filename); - *endOfName = endChar; - return TRUE; - } - - /* Revert the input string to original form, and cleanup + return */ - *endOfName = endChar; - fclose(inFile); - return FALSE; -} - -/* ========================================================================= - * Load a string from the resource file, handling any error - * Returns string retrieved from resource file - * ========================================================================= */ -static WCHAR *XCOPY_LoadMessage(UINT id) { - static WCHAR msg[MAXSTRING]; - const WCHAR failedMsg[] = {'F', 'a', 'i', 'l', 'e', 'd', '!', 0}; - - if (!LoadStringW(GetModuleHandleW(NULL), id, msg, sizeof(msg)/sizeof(WCHAR))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); - lstrcpyW(msg, failedMsg); - } - return msg; -} - -/* ========================================================================= - * Load a string for a system error and writes it to the screen - * Returns string retrieved from resource file - * ========================================================================= */ -static void XCOPY_FailMessage(DWORD err) { - LPWSTR lpMsgBuf; - int status; - - status = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, err, 0, - (LPWSTR) &lpMsgBuf, 0, NULL); - if (!status) { - WINE_FIXME("FIXME: Cannot display message for error %d, status %d\n", - err, GetLastError()); - } else { - const WCHAR infostr[] = {'%', 's', '\n', 0}; - XCOPY_wprintf(infostr, lpMsgBuf); - LocalFree ((HLOCAL)lpMsgBuf); - } -} - -/* ========================================================================= - * Output a formatted unicode string. Ideally this will go to the console - * and hence required WriteConsoleW to output it, however if file i/o is - * redirected, it needs to be WriteFile'd using OEM (not ANSI) format - * ========================================================================= */ -int XCOPY_wprintf(const WCHAR *format, ...) { - - static WCHAR *output_bufW = NULL; - static char *output_bufA = NULL; - static BOOL toConsole = TRUE; - static BOOL traceOutput = FALSE; -#define MAX_WRITECONSOLE_SIZE 65535 - - va_list parms; - DWORD nOut; - int len; - DWORD res = 0; + int rc = 0; + WCHAR suppliedsource[MAX_PATH] = {0}; /* As supplied on the cmd line */ + WCHAR supplieddestination[MAX_PATH] = {0}; + WCHAR sourcestem[MAX_PATH] = {0}; /* Stem of source */ + WCHAR sourcespec[MAX_PATH] = {0}; /* Filespec of source */ + WCHAR destinationstem[MAX_PATH] = {0}; /* Stem of destination */ + WCHAR destinationspec[MAX_PATH] = {0}; /* Filespec of destination */ + WCHAR copyCmd[MAXSTRING]; /* COPYCMD env var */ + DWORD flags = 0; /* Option flags */ + const WCHAR PROMPTSTR1[] = {'/', 'Y', 0}; + const WCHAR PROMPTSTR2[] = {'/', 'y', 0}; + const WCHAR COPYCMD[] = {'C', 'O', 'P', 'Y', 'C', 'M', 'D', 0}; + + /* Preinitialize flags based on COPYCMD */ + if (GetEnvironmentVariableW(COPYCMD, copyCmd, MAXSTRING)) { + if (wcsstr(copyCmd, PROMPTSTR1) != NULL || + wcsstr(copyCmd, PROMPTSTR2) != NULL) { + flags |= OPT_NOPROMPT; + } + } + + /* FIXME: On UNIX, files starting with a '.' are treated as hidden under + wine, but on windows these can be normal files. At least one installer + uses files such as .packlist and (validly) expects them to be copied. + Under wine, if we do not copy hidden files by default then they get + lose */ + flags |= OPT_COPYHIDSYS; /* - * Allocate buffer to use when writing to console - * Note: Not freed - memory will be allocated once and released when - * xcopy ends + * Parse the command line */ - - if (!output_bufW) output_bufW = HeapAlloc(GetProcessHeap(), 0, - MAX_WRITECONSOLE_SIZE); - if (!output_bufW) { - WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n"); - return 0; - } - - va_start(parms, format); - len = vsnprintfW(output_bufW, MAX_WRITECONSOLE_SIZE/sizeof(WCHAR), format, parms); - va_end(parms); - if (len < 0) { - WINE_FIXME("String too long.\n"); - return 0; - } - - /* Try to write as unicode all the time we think its a console */ - if (toConsole) { - res = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), - output_bufW, len, &nOut, NULL); - } - - /* If writing to console has failed (ever) we assume its file - i/o so convert to OEM codepage and output */ - if (!res) { - BOOL usedDefaultChar = FALSE; - DWORD convertedChars; - - toConsole = FALSE; - - /* - * Allocate buffer to use when writing to file. Not freed, as above - */ - if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, - MAX_WRITECONSOLE_SIZE); - if (!output_bufA) { - WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n"); - return 0; - } - - /* Convert to OEM, then output */ - convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, output_bufW, - len, output_bufA, MAX_WRITECONSOLE_SIZE, - "?", &usedDefaultChar); - WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), output_bufA, convertedChars, - &nOut, FALSE); - } - - /* Trace whether screen or console */ - if (!traceOutput) { - WINE_TRACE("Writing to console? (%d)\n", toConsole); - traceOutput = TRUE; - } - return nOut; -} + if ((rc = XCOPY_ParseCommandLine(suppliedsource, supplieddestination, + &flags)) != RC_OK) { + if (rc == RC_HELP) + return RC_OK; + else + return rc; + } + + /* Trace out the supplied information */ + WINE_TRACE("Supplied parameters:\n"); + WINE_TRACE("Source : '%s'\n", wine_dbgstr_w(suppliedsource)); + WINE_TRACE("Destination : '%s'\n", wine_dbgstr_w(supplieddestination)); + + /* Extract required information from source specification */ + rc = XCOPY_ProcessSourceParm(suppliedsource, sourcestem, sourcespec, flags); + if (rc != RC_OK) return rc; + + /* Extract required information from destination specification */ + rc = XCOPY_ProcessDestParm(supplieddestination, destinationstem, + destinationspec, sourcespec, flags); + if (rc != RC_OK) return rc; + + /* Trace out the resulting information */ + WINE_TRACE("Resolved parameters:\n"); + WINE_TRACE("Source Stem : '%s'\n", wine_dbgstr_w(sourcestem)); + WINE_TRACE("Source Spec : '%s'\n", wine_dbgstr_w(sourcespec)); + WINE_TRACE("Dest Stem : '%s'\n", wine_dbgstr_w(destinationstem)); + WINE_TRACE("Dest Spec : '%s'\n", wine_dbgstr_w(destinationspec)); + + /* Pause if necessary */ + if (flags & OPT_PAUSE) { + DWORD count; + char pausestr[10]; + + XCOPY_wprintf(XCOPY_LoadMessage(STRING_PAUSE)); + ReadFile (GetStdHandle(STD_INPUT_HANDLE), pausestr, sizeof(pausestr), + &count, NULL); + } + + /* Now do the hard work... */ + rc = XCOPY_DoCopy(sourcestem, sourcespec, + destinationstem, destinationspec, + flags); + + /* Clear up exclude list allocated memory */ + while (excludeList) { + EXCLUDELIST *pos = excludeList; + excludeList = excludeList -> next; + HeapFree(GetProcessHeap(), 0, pos->name); + HeapFree(GetProcessHeap(), 0, pos); + } + + /* Finished - print trailer and exit */ + if (flags & OPT_SIMULATE) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_SIMCOPY), filesCopied); + } else if (!(flags & OPT_NOCOPY)) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPY), filesCopied); + } + if (rc == RC_OK && filesCopied == 0) rc = RC_NOFILES; + return rc; + +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Feb 12 13:33:30 2012 @@ -194,7 +194,7 @@ ReactOS shares the following programs with Winehq. -reactos/base/applications/cmdutils/xcopy # Autosync +reactos/base/applications/cmdutils/xcopy # Synced to Wine-1.3.37 reactos/base/applications/games/winmine # Forked at Wine-1_3_5 reactos/base/applications/extrac32 # Autosync reactos/base/applications/iexplore # Autosync
12 years, 10 months
1
0
0
0
[rharabien] 55559: [WIN32K] - GetFocus returns NULL if calling thread is not a foreground thread
by rharabien@svn.reactos.org
Author: rharabien Date: Sun Feb 12 12:23:54 2012 New Revision: 55559 URL:
http://svn.reactos.org/svn/reactos?rev=55559&view=rev
Log: [WIN32K] - GetFocus returns NULL if calling thread is not a foreground thread Modified: trunk/reactos/subsystems/win32/win32k/include/focus.h trunk/reactos/subsystems/win32/win32k/ntuser/focus.c trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Modified: trunk/reactos/subsystems/win32/win32k/include/focus.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/focus.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/focus.h [iso-8859-1] Sun Feb 12 12:23:54 2012 @@ -4,7 +4,6 @@ * These functions take the window handles from current message queue. */ HWND FASTCALL IntGetCaptureWindow(VOID); -HWND FASTCALL IntGetFocusWindow(VOID); HWND FASTCALL co_UserSetCapture(HWND hWnd); BOOL FASTCALL IntReleaseCapture(VOID); @@ -13,6 +12,7 @@ */ HWND FASTCALL IntGetThreadFocusWindow(VOID); HWND APIENTRY IntGetCapture(VOID); +HWND FASTCALL UserGetFocusWindow(VOID); HWND FASTCALL UserGetActiveWindow(VOID); BOOL FASTCALL co_IntMouseActivateWindow(PWND Window); BOOL FASTCALL co_IntSetForegroundWindow(PWND Window); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] Sun Feb 12 12:23:54 2012 @@ -20,10 +20,17 @@ } HWND FASTCALL -IntGetFocusWindow(VOID) -{ - PUSER_MESSAGE_QUEUE ForegroundQueue = IntGetFocusMessageQueue(); - return ForegroundQueue != NULL ? ForegroundQueue->FocusWindow : 0; +UserGetFocusWindow(VOID) +{ + PTHREADINFO pti; + PUSER_MESSAGE_QUEUE ThreadQueue; + + pti = PsGetCurrentThreadWin32Thread(); + ThreadQueue = pti->MessageQueue; + /* Is it a foreground queue? */ + if (!ThreadQueue || ThreadQueue != IntGetFocusMessageQueue()) + return NULL; + return ThreadQueue->FocusWindow; } HWND FASTCALL @@ -34,7 +41,9 @@ pti = PsGetCurrentThreadWin32Thread(); ThreadQueue = pti->MessageQueue; - return ThreadQueue != NULL ? ThreadQueue->FocusWindow : 0; + if (!ThreadQueue) + return NULL; + return ThreadQueue->FocusWindow; } VOID FASTCALL Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Sun Feb 12 12:23:54 2012 @@ -164,7 +164,7 @@ GetW32ThreadInfo(); break; case THREADSTATE_FOCUSWINDOW: - ret = (DWORD_PTR)IntGetThreadFocusWindow(); + ret = (DWORD_PTR)UserGetFocusWindow(); break; case THREADSTATE_CAPTUREWINDOW: /* FIXME: Should use UserEnterShared */
12 years, 10 months
1
0
0
0
[rharabien] 55558: [WIN32K] - Clip test vertically in ExtTextOut when ETO_CLIPPED is used
by rharabien@svn.reactos.org
Author: rharabien Date: Sun Feb 12 11:02:00 2012 New Revision: 55558 URL:
http://svn.reactos.org/svn/reactos?rev=55558&view=rev
Log: [WIN32K] - Clip test vertically in ExtTextOut when ETO_CLIPPED is used Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Sun Feb 12 11:02:00 2012 @@ -3495,8 +3495,7 @@ * brush. */ - if (lprc && - (fuOptions & ETO_CLIPPED) && + if (lprc && (fuOptions & ETO_CLIPPED) && DestRect.right >= lprc->right + dc->ptlDCOrig.x) { // We do the check '>=' instead of '>' to possibly save an iteration @@ -3504,6 +3503,11 @@ // and x is always incremented. DestRect.right = lprc->right + dc->ptlDCOrig.x; DoBreak = TRUE; + } + if (lprc && (fuOptions & ETO_CLIPPED) && + DestRect.bottom >= lprc->bottom + dc->ptlDCOrig.y) + { + DestRect.bottom = lprc->bottom + dc->ptlDCOrig.y; } MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, DestRect.right, DestRect.bottom); IntEngMaskBlt(
12 years, 10 months
1
0
0
0
[akhaldi] 55557: [DISK_NEW] * Fix msvc build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Feb 12 10:23:27 2012 New Revision: 55557 URL:
http://svn.reactos.org/svn/reactos?rev=55557&view=rev
Log: [DISK_NEW] * Fix msvc build. Modified: trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt Modified: trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
============================================================================== --- trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt [iso-8859-1] Sun Feb 12 10:23:27 2012 @@ -3,8 +3,12 @@ add_library(disk_new SHARED data.c disk.c diskwmi.c enum.c geometry.c part.c pnp.c disk.rc) target_link_libraries(disk_new libcntpr wdmguid) -if(NOT MSVC AND ARCH MATCHES i386) - add_target_compile_flags(disk_new "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign") +if(ARCH MATCHES i386) + if(MSVC) + add_target_compile_flags(disk_new "/Gz") + else() + add_target_compile_flags(disk_new "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign") + endif() endif() set_module_type(disk_new kernelmodedriver)
12 years, 10 months
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
58
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
Results per page:
10
25
50
100
200