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
May 2015
----- 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
15 participants
500 discussions
Start a n
N
ew thread
[tfaber] 67664: [DDK] - Add NTSTRSAFE_UNICODE_STRING_MAX_CCH
by tfaber@svn.reactos.org
Author: tfaber Date: Mon May 11 14:09:02 2015 New Revision: 67664 URL:
http://svn.reactos.org/svn/reactos?rev=67664&view=rev
Log: [DDK] - Add NTSTRSAFE_UNICODE_STRING_MAX_CCH Modified: trunk/reactos/include/ddk/ntstrsafe.h Modified: trunk/reactos/include/ddk/ntstrsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntstrsafe.h?re…
============================================================================== --- trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] Mon May 11 14:09:02 2015 @@ -34,6 +34,10 @@ #ifndef NTSTRSAFE_MAX_CCH #define NTSTRSAFE_MAX_CCH 2147483647 +#endif + +#ifndef NTSTRSAFE_UNICODE_STRING_MAX_CCH +#define NTSTRSAFE_UNICODE_STRING_MAX_CCH 32767 #endif #ifndef _STRSAFE_H_INCLUDED_
9 years, 7 months
1
0
0
0
[akhaldi] 67663: [WS2_32] Apply Wine commit 51e7732 by Piotr Caban: Fix ai_canonname buffer allocation in addrinfo_AtoW.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 13:43:37 2015 New Revision: 67663 URL:
http://svn.reactos.org/svn/reactos?rev=67663&view=rev
Log: [WS2_32] Apply Wine commit 51e7732 by Piotr Caban: Fix ai_canonname buffer allocation in addrinfo_AtoW. Modified: trunk/reactos/dll/win32/ws2_32/wine/socket.c Modified: trunk/reactos/dll/win32/ws2_32/wine/socket.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/wine/sock…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/wine/socket.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/wine/socket.c [iso-8859-1] Mon May 11 13:43:37 2015 @@ -56,7 +56,7 @@ if (ai->ai_canonname) { int len = MultiByteToWideChar(CP_ACP, 0, ai->ai_canonname, -1, NULL, 0); - if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len))) + if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)))) { HeapFree(GetProcessHeap(), 0, ret); return NULL;
9 years, 7 months
1
0
0
0
[cfinck] 67662: - Add all publicly available information about the spoolsv RPC interface of Windows Server 2003 to the winspool.idl file. Another reference: http://www.hsc.fr/ressources/articles/wi...
by cfinck@svn.reactos.org
Author: cfinck Date: Mon May 11 13:37:23 2015 New Revision: 67662 URL:
http://svn.reactos.org/svn/reactos?rev=67662&view=rev
Log: - Add all publicly available information about the spoolsv RPC interface of Windows Server 2003 to the winspool.idl file. Another reference:
http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html
- Put this file in the public domain as it's just collected interface information from various sources without any real code. Modified: branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl Modified: branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
============================================================================== --- branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl [iso-8859-1] (original) +++ branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl [iso-8859-1] Mon May 11 13:37:23 2015 @@ -1,23 +1,843 @@ /* * PROJECT: ReactOS Spooler API - * LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation + * LICENSE: This file is in the public domain * PURPOSE: WIDL-compatible interface definition for the Spooler API - * COPYRIGHT: Copyright 2015 Colin Finck <colin(a)reactos.org> + * AUTHORS: Colin Finck <colin(a)reactos.org> */ #include <ms-dtyp.idl> +/* + * Handle definitions + */ +typedef [context_handle] void* WINSPOOL_GDI_HANDLE; typedef [context_handle] void* WINSPOOL_PRINTER_HANDLE; -typedef [handle, string, unique] WCHAR* WINSPOOL_HANDLE; - -typedef struct _DEVMODE_CONTAINER +typedef [handle, string] WCHAR* WINSPOOL_HANDLE; + + +/* + * Type definitions and enumerations + */ +typedef WORD WINSPOOL_LANGID; + +typedef enum +{ + WINSPOOL_BIDI_NULL = 0, + WINSPOOL_BIDI_INT = 1, + WINSPOOL_BIDI_FLOAT = 2, + WINSPOOL_BIDI_BOOL = 3, + WINSPOOL_BIDI_STRING = 4, + WINSPOOL_BIDI_TEXT = 5, + WINSPOOL_BIDI_ENUM = 6, + WINSPOOL_BIDI_BLOB = 7 +} +WINSPOOL_BIDI_TYPE; + +typedef enum +{ + WINSPOOL_TABLE_DWORD = 1, + WINSPOOL_TABLE_STRING = 2, + WINSPOOL_TABLE_DEVMODE = 3, + WINSPOOL_TABLE_TIME = 4, + WINSPOOL_TABLE_SECURITYDESCRIPTOR = 5 +} +WINSPOOL_TABLE_TYPE; + + +/* + * Various definitions + */ +typedef struct _WINSPOOL_RECTL +{ + LONG left; + LONG top; + LONG right; + LONG bottom; +} +WINSPOOL_RECTL; + +typedef struct _WINSPOOL_SIZEL +{ + LONG cx; + LONG cy; +} +WINSPOOL_SIZEL; + + +/* + * INFO structures + */ +typedef struct _WINSPOOL_DOC_INFO_1 { + [string] WCHAR* pDocName; + [string] WCHAR* pOutputFile; + [string] WCHAR* pDatatype; +} +WINSPOOL_DOC_INFO_1; + +typedef struct _WINSPOOL_DRIVER_INFO_1 +{ + [string] WCHAR* pName; +} +WINSPOOL_DRIVER_INFO_1; + +typedef struct _WINSPOOL_DRIVER_INFO_2 +{ + DWORD cVersion; + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDriverPath; + [string] WCHAR* pDataFile; + [string] WCHAR* pConfigFile; +} +WINSPOOL_DRIVER_INFO_2; + +typedef struct _WINSPOOL_DRIVER_INFO_3 +{ + DWORD cVersion; + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDriverPath; + [string] WCHAR* pDataFile; + [string] WCHAR* pConfigFile; + [string] WCHAR* pHelpFile; + [string] WCHAR* pMonitorName; + [string] WCHAR* pDefaultDataType; + DWORD cchDependentFiles; + [size_is(cchDependentFiles), unique] WCHAR* pDependentFiles; +} +WINSPOOL_DRIVER_INFO_3; + +typedef struct _WINSPOOL_DRIVER_INFO_4 +{ + DWORD cVersion; + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDriverPath; + [string] WCHAR* pDataFile; + [string] WCHAR* pConfigFile; + [string] WCHAR* pHelpFile; + [string] WCHAR* pMonitorName; + [string] WCHAR* pDefaultDataType; + DWORD cchDependentFiles; + [size_is(cchDependentFiles), unique] WCHAR* pDependentFiles; + DWORD cchPreviousNames; + [size_is(cchPreviousNames), unique] WCHAR* pszzPreviousNames; +} +WINSPOOL_DRIVER_INFO_4; + +typedef struct _WINSPOOL_DRIVER_INFO_6 +{ + DWORD cVersion; + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDriverPath; + [string] WCHAR* pDataFile; + [string] WCHAR* pConfigFile; + [string] WCHAR* pHelpFile; + [string] WCHAR* pMonitorName; + [string] WCHAR* pDefaultDataType; + DWORD cchDependentFiles; + [size_is(cchDependentFiles), unique] WCHAR* pDependentFiles; + DWORD cchPreviousNames; + [size_is(cchPreviousNames), unique] WCHAR* pszzPreviousNames; + FILETIME ftDriverDate; + DWORDLONG dwlDriverVersion; + [string] WCHAR* pMfgName; + [string] WCHAR* pOEMUrl; + [string] WCHAR* pHardwareID; + [string] WCHAR* pProvider; +} +WINSPOOL_DRIVER_INFO_6; + +typedef struct _WINSPOOL_DRIVER_INFO_8 +{ + DWORD cVersion; + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDriverPath; + [string] WCHAR* pDataFile; + [string] WCHAR* pConfigFile; + [string] WCHAR* pHelpFile; + [string] WCHAR* pMonitorName; + [string] WCHAR* pDefaultDataType; + DWORD cchDependentFiles; + [size_is(cchDependentFiles), unique] WCHAR* pDependentFiles; + DWORD cchPreviousNames; + [size_is(cchPreviousNames), unique] WCHAR* pszzPreviousNames; + FILETIME ftDriverDate; + DWORDLONG dwlDriverVersion; + [string] WCHAR* pMfgName; + [string] WCHAR* pOEMUrl; + [string] WCHAR* pHardwareID; + [string] WCHAR* pProvider; + [string] WCHAR* pPrintProcessor; + [string] WCHAR* pVendorSetup; + DWORD cchColorProfiles; + [size_is(cchColorProfiles), unique] WCHAR* pszzColorProfiles; + [string] WCHAR* pInfPath; + DWORD dwPrinterDriverAttributes; + DWORD cchCoreDependencies; + [size_is(cchCoreDependencies), unique] WCHAR* pszzCoreDriverDependencies; + FILETIME ftMinInboxDriverVerDate; + DWORDLONG dwlMinInboxDriverVerVersion; +} +WINSPOOL_DRIVER_INFO_8; + +typedef struct _WINSPOOL_FORM_INFO_1 +{ + DWORD Flags; + [string] WCHAR* pName; + WINSPOOL_SIZEL Size; + WINSPOOL_RECTL ImageableArea; +} +WINSPOOL_FORM_INFO_1; + +typedef struct _WINSPOOL_FORM_INFO_2 +{ + DWORD Flags; + [string, unique] const WCHAR* pName; + WINSPOOL_SIZEL Size; + WINSPOOL_RECTL ImageableArea; + [string, unique] const WCHAR* pKeyword; + DWORD StringType; + [string, unique] const WCHAR* pMuiDll; + DWORD dwResourceId; + [string, unique] const WCHAR* pDisplayName; + WINSPOOL_LANGID wLangID; +} +WINSPOOL_FORM_INFO_2; + +typedef struct _WINSPOOL_JOB_INFO_1 +{ + DWORD JobId; + [string] WCHAR* pPrinterName; + [string] WCHAR* pMachineName; + [string] WCHAR* pUserName; + [string] WCHAR* pDocument; + [string] WCHAR* pDatatype; + [string] WCHAR* pStatus; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD TotalPages; + DWORD PagesPrinted; + SYSTEMTIME Submitted; +} +WINSPOOL_JOB_INFO_1; + +typedef struct _WINSPOOL_JOB_INFO_2 +{ + DWORD JobId; + [string] WCHAR* pPrinterName; + [string] WCHAR* pMachineName; + [string] WCHAR* pUserName; + [string] WCHAR* pDocument; + [string] WCHAR* pNotifyName; + [string] WCHAR* pDatatype; + [string] WCHAR* pPrintProcessor; + [string] WCHAR* pParameters; + [string] WCHAR* pDriverName; + ULONG_PTR pDevMode; + [string] WCHAR* pStatus; + ULONG_PTR pSecurityDescriptor; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD StartTime; + DWORD UntilTime; + DWORD TotalPages; + DWORD Size; + SYSTEMTIME Submitted; + DWORD Time; + DWORD PagesPrinted; +} +WINSPOOL_JOB_INFO_2; + +typedef struct _WINSPOOL_JOB_INFO_3 +{ + DWORD JobId; + DWORD NextJobId; + DWORD Reserved; +} +WINSPOOL_JOB_INFO_3; + +typedef struct _WINSPOOL_JOB_INFO_4 +{ + DWORD JobId; + [string] WCHAR* pPrinterName; + [string] WCHAR* pMachineName; + [string] WCHAR* pUserName; + [string] WCHAR* pDocument; + [string] WCHAR* pNotifyName; + [string] WCHAR* pDatatype; + [string] WCHAR* pPrintProcessor; + [string] WCHAR* pParameters; + [string] WCHAR* pDriverName; + ULONG_PTR pDevMode; + [string] WCHAR* pStatus; + ULONG_PTR pSecurityDescriptor; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD StartTime; + DWORD UntilTime; + DWORD TotalPages; + DWORD Size; + SYSTEMTIME Submitted; + DWORD Time; + DWORD PagesPrinted; + LONG SizeHigh; +} +WINSPOOL_JOB_INFO_4; + +typedef struct _WINSPOOL_MONITOR_INFO_1 +{ + [string] WCHAR* pName; +} +WINSPOOL_MONITOR_INFO_1; + +typedef struct _WINSPOOL_MONITOR_INFO_2 +{ + [string] WCHAR* pName; + [string] WCHAR* pEnvironment; + [string] WCHAR* pDLLName; +} +WINSPOOL_MONITOR_INFO_2; + +typedef struct _WINSPOOL_PORT_INFO_1 +{ + [string] WCHAR* pPortName; +} +WINSPOOL_PORT_INFO_1; + +typedef struct _WINSPOOL_PORT_INFO_2 +{ + [string] WCHAR* pPortName; + [string] WCHAR* pMonitorName; + [string] WCHAR* pDescription; + DWORD fPortType; + DWORD Reserved; +} +WINSPOOL_PORT_INFO_2; + +typedef struct _WINSPOOL_PORT_INFO_3 +{ + DWORD dwStatus; + [string] WCHAR* pszStatus; + DWORD dwSeverity; +} +WINSPOOL_PORT_INFO_3; + +typedef struct _WINSPOOL_PORT_INFO_FF +{ + [string] WCHAR* pPortName; + DWORD cbMonitorData; + BYTE* pMonitorData; +} +WINSPOOL_PORT_INFO_FF; + +typedef struct _WINSPOOL_PRINTER_INFO_STRESS { + [string] WCHAR* pPrinterName; + [string] WCHAR* pServerName; + DWORD cJobs; + DWORD cTotalJobs; + DWORD cTotalBytes; + SYSTEMTIME stUpTime; + DWORD MaxcRef; + DWORD cTotalPagesPrinted; + DWORD dwGetVersion; + DWORD fFreeBuild; + DWORD cSpooling; + DWORD cMaxSpooling; + DWORD cRef; + DWORD cErrorOutOfPaper; + DWORD cErrorNotReady; + DWORD cJobError; + DWORD dwNumberOfProcessors; + DWORD dwProcessorType; + DWORD dwHighPartTotalBytes; + DWORD cChangeID; + DWORD dwLastError; + DWORD Status; + DWORD cEnumerateNetworkPrinters; + DWORD cAddNetPrinters; + USHORT wProcessorArchitecture; + USHORT wProcessorLevel; + DWORD cRefIC; + DWORD dwReserved2; + DWORD dwReserved3; +} +WINSPOOL_PRINTER_INFO_STRESS; + +typedef struct _WINSPOOL_PRINTER_INFO_1 +{ + DWORD Flags; + [string] WCHAR* pDescription; + [string] WCHAR* pName; + [string] WCHAR* pComment; +} +WINSPOOL_PRINTER_INFO_1; + +typedef struct _WINSPOOL_PRINTER_INFO_2 +{ + [string] WCHAR* pServerName; + [string] WCHAR* pPrinterName; + [string] WCHAR* pShareName; + [string] WCHAR* pPortName; + [string] WCHAR* pDriverName; + [string] WCHAR* pComment; + [string] WCHAR* pLocation; + ULONG_PTR pDevMode; + [string] WCHAR* pSepFile; + [string] WCHAR* pPrintProcessor; + [string] WCHAR* pDatatype; + [string] WCHAR* pParameters; + ULONG_PTR pSecurityDescriptor; + DWORD Attributes; + DWORD Priority; + DWORD DefaultPriority; + DWORD StartTime; + DWORD UntilTime; + DWORD Status; + DWORD cJobs; + DWORD AveragePPM; +} +WINSPOOL_PRINTER_INFO_2; + +typedef struct _WINSPOOL_PRINTER_INFO_3 +{ + ULONG_PTR pSecurityDescriptor; +} +WINSPOOL_PRINTER_INFO_3; + +typedef struct _WINSPOOL_PRINTER_INFO_4 +{ + [string] WCHAR* pPrinterName; + [string] WCHAR* pServerName; + DWORD Attributes; +} +WINSPOOL_PRINTER_INFO_4; + +typedef struct _WINSPOOL_PRINTER_INFO_5 +{ + [string] WCHAR* pPrinterName; + [string] WCHAR* pPortName; + DWORD Attributes; + DWORD DeviceNotSelectedTimeout; + DWORD TransmissionRetryTimeout; +} +WINSPOOL_PRINTER_INFO_5; + +typedef struct _WINSPOOL_PRINTER_INFO_6 +{ + DWORD dwStatus; +} +WINSPOOL_PRINTER_INFO_6; + +typedef struct _WINSPOOL_PRINTER_INFO_7 +{ + [string] WCHAR* pszObjectGUID; + DWORD dwAction; +} +WINSPOOL_PRINTER_INFO_7; + +typedef struct _WINSPOOL_PRINTER_INFO_8 +{ + ULONG_PTR pDevMode; +} +WINSPOOL_PRINTER_INFO_8; + +typedef struct _WINSPOOL_PRINTER_INFO_9 +{ + ULONG_PTR pDevMode; +} +WINSPOOL_PRINTER_INFO_9; + +typedef struct _WINSPOOL_PROVIDOR_INFO_1 +{ + WCHAR* pName; + WCHAR* pEnvironment; + WCHAR* pDLLName; +} +WINSPOOL_PROVIDOR_INFO_1; + +typedef struct _WINSPOOL_PROVIDOR_INFO_2 +{ + WCHAR* pOrder; +} +WINSPOOL_PROVIDOR_INFO_2; + +typedef struct _WINSPOOL_SPLCLIENT_INFO_1 +{ + DWORD dwSize; + [string] WCHAR* pMachineName; + [string] WCHAR* pUserName; + DWORD dwBuildNum; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + USHORT wProcessorArchitecture; +} +WINSPOOL_SPLCLIENT_INFO_1; + +typedef struct _WINSPOOL_SPLCLIENT_INFO_2 +{ + LONG_PTR notUsed; +} +WINSPOOL_SPLCLIENT_INFO_2; + +typedef struct _WINSPOOL_SPLCLIENT_INFO_3 +{ + UINT cbSize; + DWORD dwFlags; + DWORD dwSize; + [string] WCHAR* pMachineName; + [string] WCHAR* pUserName; + DWORD dwBuildNum; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + USHORT wProcessorArchitecture; + UINT64 hSplPrinter; +} +WINSPOOL_SPLCLIENT_INFO_3; + + +/* + * CONTAINER structures + */ +typedef struct _WINSPOOL_BINARY_CONTAINER { DWORD cbBuf; - BYTE* pDevMode; + [size_is(cbBuf), unique] BYTE* pszString; +} +WINSPOOL_BINARY_CONTAINER; + +typedef struct _WINSPOOL_BIDI_DATA +{ + DWORD dwBidiType; + + [switch_is(dwBidiType)] union + { + [case(WINSPOOL_BIDI_NULL, WINSPOOL_BIDI_BOOL)] + INT bData; + [case(WINSPOOL_BIDI_INT)] + LONG iData; + [case(WINSPOOL_BIDI_STRING, WINSPOOL_BIDI_TEXT, WINSPOOL_BIDI_ENUM)] + [string, unique] WCHAR* sData; + [case(WINSPOOL_BIDI_FLOAT)] + FLOAT fData; + [case(WINSPOOL_BIDI_BLOB)] + WINSPOOL_BINARY_CONTAINER biData; + } + u; +} +WINSPOOL_BIDI_DATA; + +typedef struct _WINSPOOL_BIDI_REQUEST_DATA +{ + DWORD dwReqNumber; + [string, unique] WCHAR* pSchema; + WINSPOOL_BIDI_DATA data; +} +WINSPOOL_BIDI_REQUEST_DATA; + +typedef struct _WINSPOOL_BIDI_RESPONSE_DATA +{ + DWORD dwResult; + DWORD dwReqNumber; + [string, unique] WCHAR* pSchema; + WINSPOOL_BIDI_DATA data; +} +WINSPOOL_BIDI_RESPONSE_DATA; + +typedef struct _WINSPOOL_BIDI_REQUEST_CONTAINER +{ + DWORD Version; + DWORD Flags; + DWORD Count; + [size_is(Count), unique] WINSPOOL_BIDI_REQUEST_DATA aData[]; +} +WINSPOOL_BIDI_REQUEST_CONTAINER; + +typedef struct _WINSPOOL_BIDI_RESPONSE_CONTAINER +{ + DWORD Version; + DWORD Flags; + DWORD Count; + [size_is(Count), unique] WINSPOOL_BIDI_RESPONSE_DATA aData[]; +} +WINSPOOL_BIDI_RESPONSE_CONTAINER; + +typedef struct _WINSPOOL_DOC_INFO_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_DOC_INFO_1* pDocInfo1; + } + DocInfo; +} +WINSPOOL_DOC_INFO_CONTAINER; + +typedef struct _WINSPOOL_DEVMODE_CONTAINER +{ + DWORD cbBuf; + [size_is(cbBuf), unique] BYTE* pDevMode; } WINSPOOL_DEVMODE_CONTAINER; - +typedef struct _WINSPOOL_DRIVER_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_DRIVER_INFO_1* pNotUsed; + [case(2)] + WINSPOOL_DRIVER_INFO_2* Level2; + [case(3)] + WINSPOOL_DRIVER_INFO_3* Level3; + [case(4)] + WINSPOOL_DRIVER_INFO_4* Level4; + [case(6)] + WINSPOOL_DRIVER_INFO_6* Level6; + [case(8)] + WINSPOOL_DRIVER_INFO_8* Level8; + } + DriverInfo; +} +WINSPOOL_DRIVER_CONTAINER; + +typedef struct _WINSPOOL_FORM_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_FORM_INFO_1* pFormInfo1; + [case(2)] + WINSPOOL_FORM_INFO_2* pFormInfo2; + } + FormInfo; +} +WINSPOOL_FORM_CONTAINER; + +typedef struct _WINSPOOL_JOB_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_JOB_INFO_1* Level1; + [case(2)] + WINSPOOL_JOB_INFO_2* Level2; + [case(3)] + WINSPOOL_JOB_INFO_3* Level3; + [case(4)] + WINSPOOL_JOB_INFO_4* Level4; + } + JobInfo; +} +WINSPOOL_JOB_CONTAINER; + +typedef struct _WINSPOOL_MONITOR_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_MONITOR_INFO_1* pMonitorInfo1; + [case(2)] + WINSPOOL_MONITOR_INFO_2* pMonitorInfo2; + } + MonitorInfo; +} +WINSPOOL_MONITOR_CONTAINER; + +typedef struct _WINSPOOL_PORT_CONTAINER +{ + DWORD Level; + + [switch_is(0x00FFFFFF & Level)] + union + { + [case(1)] + WINSPOOL_PORT_INFO_1* pPortInfo1; + [case(2)] + WINSPOOL_PORT_INFO_2* pPortInfo2; + [case(3)] + WINSPOOL_PORT_INFO_3* pPortInfo3; + [case(0x00FFFFFF)] + WINSPOOL_PORT_INFO_FF* pPortInfoFF; + } + PortInfo; +} +WINSPOOL_PORT_CONTAINER; + +typedef struct _WINSPOOL_PORT_VAR_CONTAINER +{ + DWORD cbMonitorData; + [size_is(cbMonitorData), unique] BYTE* pMonitorData; +} +WINSPOOL_PORT_VAR_CONTAINER; + +typedef struct _WINSPOOL_PRINTER_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(0)] + WINSPOOL_PRINTER_INFO_STRESS* pPrinterInfoStress; + [case(1)] + WINSPOOL_PRINTER_INFO_1* pPrinterInfo1; + [case(2)] + WINSPOOL_PRINTER_INFO_2* pPrinterInfo2; + [case(3)] + WINSPOOL_PRINTER_INFO_3* pPrinterInfo3; + [case(4)] + WINSPOOL_PRINTER_INFO_4* pPrinterInfo4; + [case(5)] + WINSPOOL_PRINTER_INFO_5* pPrinterInfo5; + [case(6)] + WINSPOOL_PRINTER_INFO_6* pPrinterInfo6; + [case(7)] + WINSPOOL_PRINTER_INFO_7* pPrinterInfo7; + [case(8)] + WINSPOOL_PRINTER_INFO_8* pPrinterInfo8; + [case(9)] + WINSPOOL_PRINTER_INFO_9* pPrinterInfo9; + } + PrinterInfo; +} +WINSPOOL_PRINTER_CONTAINER; + +typedef struct _WINSPOOL_PROVIDOR_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_PROVIDOR_INFO_1* pProvidorInfo1; + [case(2)] + WINSPOOL_PROVIDOR_INFO_2* pProvidorInfo2; + } + ProvidorInfo; +} +WINSPOOL_PROVIDOR_CONTAINER; + +typedef struct _WINSPOOL_SECURITY_CONTAINER +{ + DWORD cbBuf; + [size_is(cbBuf), unique] BYTE* pSecurity; +} +WINSPOOL_SECURITY_CONTAINER; + +typedef struct _WINSPOOL_SPLCLIENT_CONTAINER +{ + DWORD Level; + + [switch_is(Level)] union + { + [case(1)] + WINSPOOL_SPLCLIENT_INFO_1* pClientInfo1; + [case(2)] + WINSPOOL_SPLCLIENT_INFO_2* pNotUsed1; + [case(3)] + WINSPOOL_SPLCLIENT_INFO_3* pNotUsed2; + } + ClientInfo; +} +WINSPOOL_SPLCLIENT_CONTAINER; + +typedef struct _WINSPOOL_STRING_CONTAINER +{ + DWORD cbBuf; + [size_is(cbBuf / 2), unique] WCHAR* pszString; +} +WINSPOOL_STRING_CONTAINER; + +typedef struct _WINSPOOL_SYSTEMTIME_CONTAINER { + DWORD cbBuf; + SYSTEMTIME* pSystemTime; +} +WINSPOOL_SYSTEMTIME_CONTAINER; + + +/* + * Various definitions + */ +typedef struct _WINSPOOL_V2_NOTIFY_OPTIONS_TYPE +{ + USHORT Type; + USHORT Reserved0; + DWORD Reserved1; + DWORD Reserved2; + DWORD Count; + [size_is(Count), unique] USHORT* pFields; +} +WINSPOOL_V2_NOTIFY_OPTIONS_TYPE; + +typedef struct _WINSPOOL_V2_NOTIFY_OPTIONS +{ + DWORD Version; + DWORD Reserved; + DWORD Count; + [size_is(Count), unique] WINSPOOL_V2_NOTIFY_OPTIONS_TYPE* pTypes; +} +WINSPOOL_V2_NOTIFY_OPTIONS; + +typedef [switch_type(DWORD)] union _WINSPOOL_V2_NOTIFY_INFO_DATA_DATA +{ + [case(WINSPOOL_TABLE_STRING)] + WINSPOOL_STRING_CONTAINER String; + [case(WINSPOOL_TABLE_DWORD)] + DWORD dwData[2]; + [case(WINSPOOL_TABLE_TIME)] + WINSPOOL_SYSTEMTIME_CONTAINER SystemTime; + [case(WINSPOOL_TABLE_DEVMODE)] + WINSPOOL_DEVMODE_CONTAINER DevMode; + [case(WINSPOOL_TABLE_SECURITYDESCRIPTOR)] + WINSPOOL_SECURITY_CONTAINER SecurityDescriptor; +} +WINSPOOL_V2_NOTIFY_INFO_DATA_DATA; + +typedef struct _WINSPOOL_V2_NOTIFY_INFO_DATA +{ + USHORT Type; + USHORT Field; + DWORD Reserved; + DWORD Id; + [switch_is(Reserved & 0xffff)] WINSPOOL_V2_NOTIFY_INFO_DATA_DATA Data; +} +WINSPOOL_V2_NOTIFY_INFO_DATA; + +typedef struct _WINSPOOL_V2_NOTIFY_INFO +{ + DWORD Version; + DWORD Flags; + DWORD Count; + [size_is(Count), unique] WINSPOOL_V2_NOTIFY_INFO_DATA aData[]; +} +WINSPOOL_V2_NOTIFY_INFO; + +typedef [switch_type(DWORD)] union _WINSPOOL_V2_UREPLY_PRINTER +{ + [case(0)] + WINSPOOL_V2_NOTIFY_INFO* pInfo; +} +WINSPOOL_V2_UREPLY_PRINTER; + + +/* + * The actual interface + */ [ uuid(12345678-1234-ABCD-EF00-0123456789AB), version(1.0), @@ -26,23 +846,749 @@ ] interface winspool { - /* Function 0 */ + /* Function 0x00 */ DWORD _RpcEnumPrinters( [in] DWORD Flags, - [in] WINSPOOL_HANDLE Name, + [in, unique] WINSPOOL_HANDLE Name, [in] DWORD Level, - [out] BYTE* pPrinterEnum, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPrinterEnum, [in] DWORD cbBuf, [out] DWORD* pcbNeeded, [out] DWORD* pcReturned ); - /* Function 1 */ + /* Function 0x01 */ DWORD _RpcOpenPrinter( - [in] WINSPOOL_HANDLE pPrinterName, + [in, unique] WINSPOOL_HANDLE pPrinterName, [out] WINSPOOL_PRINTER_HANDLE* phPrinter, [in, string, unique] WCHAR* pDatatype, [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, [in] DWORD AccessRequired ); -} + + /* Function 0x02 */ + DWORD _RpcSetJob( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD JobId, + [in, unique] WINSPOOL_JOB_CONTAINER* pJobContainer, + [in] DWORD Command + ); + + /* Function 0x03 */ + DWORD _RpcGetJob( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD JobId, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pJob, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x04 */ + DWORD _RpcEnumJobs( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD FirstJob, + [in] DWORD NoJobs, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pJob, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x05 */ + DWORD _RpcAddPrinter( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, + [in] WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, + [out] WINSPOOL_PRINTER_HANDLE* pHandle + ); + + /* Function 0x06 */ + DWORD _RpcDeletePrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter + ); + + /* Function 0x07 */ + DWORD _RpcSetPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, + [in] WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, + [in] DWORD Command + ); + + /* Function 0x08 */ + DWORD _RpcGetPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPrinter, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x09 */ + DWORD _RpcAddPrinterDriver( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_DRIVER_CONTAINER* pDriverContainer + ); + + /* Function 0x0A */ + DWORD _RpcEnumPrinterDrivers( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pDrivers, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x0B */ + DWORD _RpcGetPrinterDriver( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pDriver, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x0C */ + DWORD _RpcGetPrinterDriverDirectory( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pDriverDirectory, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x0D */ + DWORD _RpcDeletePrinterDriver( + [in, unique] WINSPOOL_HANDLE pName, + [in, string] WCHAR* pEnvironment, + [in, string] WCHAR* pDriverName + ); + + /* Function 0x0E */ + DWORD _RpcAddPrintProcessor( + [in, unique] WINSPOOL_HANDLE pName, + [in, string] WCHAR* pEnvironment, + [in, string] WCHAR* pPathName, + [in, string] WCHAR* pPrintProcessorName + ); + + /* Function 0x0F */ + DWORD _RpcEnumPrintProcessors( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPrintProcessorInfo, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x10 */ + DWORD _RpcGetPrintProcessorDirectory( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPrintProcessorDirectory, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x11 */ + DWORD _RpcStartDocPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] WINSPOOL_DOC_INFO_CONTAINER* pDocInfoContainer, + [out] DWORD* pJobId + ); + + /* Function 0x12 */ + DWORD _RpcStartPagePrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter + ); + + /* Function 0x13 */ + DWORD _RpcWritePrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, size_is(cbBuf)] BYTE* pBuf, + [in] DWORD cbBuf, + [out] DWORD* pcWritten + ); + + /* Function 0x14 */ + DWORD _RpcEndPagePrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter + ); + + /* Function 0x15 */ + DWORD _RpcAbortPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter + ); + + /* Function 0x16 */ + DWORD _RpcReadPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [out, size_is(cbBuf)] BYTE* pBuf, + [in] DWORD cbBuf, + [out] DWORD* pcNoBytesRead + ); + + /* Function 0x17 */ + DWORD _RpcEndDocPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter + ); + + /* Function 0x18 */ + DWORD _RpcAddJob( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pAddJob, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x19 */ + DWORD _RpcScheduleJob( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD JobId + ); + + /* Function 0x1A */ + DWORD _RpcGetPrinterData( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pValueName, + [out] DWORD* pType, + [out, size_is(nSize)] BYTE* pData, + [in] DWORD nSize, + [out] DWORD* pcbNeeded + ); + + /* Function 0x1B */ + DWORD _RpcSetPrinterData( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pValueName, + [in] DWORD Type, + [in, size_is(cbData)] BYTE* pData, + [in] DWORD cbData + ); + + /* Function 0x1C */ + DWORD _RpcWaitForPrinterChange( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD Flags, + [out] DWORD* pFlags + ); + + /* Function 0x1D */ + DWORD _RpcClosePrinter( + [in, out] WINSPOOL_PRINTER_HANDLE* phPrinter + ); + + /* Function 0x1E */ + DWORD _RpcAddForm( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] WINSPOOL_FORM_CONTAINER* pFormInfoContainer + ); + + /* Function 0x1F */ + DWORD _RpcDeleteForm( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pFormName + ); + + /* Function 0x20 */ + DWORD _RpcGetForm( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pFormName, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pForm, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded + ); + + /* Function 0x21 */ + DWORD _RpcSetForm( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pFormName, + [in] WINSPOOL_FORM_CONTAINER* pFormInfoContainer + ); + + /* Function 0x22 */ + DWORD _RpcEnumForms( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pForm, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x23 */ + DWORD _RpcEnumPorts( + [in, unique] WINSPOOL_HANDLE pName, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPort, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x24 */ + DWORD _RpcEnumMonitors( + [in, unique] WINSPOOL_HANDLE pName, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pMonitor, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x25 */ + DWORD _RpcAddPort( + [in, unique] WINSPOOL_HANDLE pName, + [in] ULONG_PTR hWnd, + [in] WCHAR* pMonitorName + ); + + /* Function 0x26 */ + DWORD _RpcConfigurePort( + [in, unique] WINSPOOL_HANDLE pName, + [in] ULONG_PTR hWnd, + [in] WCHAR* pPortName + ); + + /* Function 0x27 */ + DWORD _RpcDeletePort( + [in, unique] WINSPOOL_HANDLE pName, + [in] ULONG_PTR hWnd, + [in, string] WCHAR* pPortName + ); + + /* Function 0x28 */ + DWORD _RpcCreatePrinterIC( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [out] WINSPOOL_GDI_HANDLE* pHandle, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer + ); + + /* Function 0x29 */ + DWORD _RpcPlayGdiScriptOnPrinterIC( + [in] WINSPOOL_GDI_HANDLE hPrinterIC, + [in, size_is(cIn)] BYTE* pIn, + [in] DWORD cIn, + [out, size_is(cOut)] BYTE* pOut, + [in] DWORD cOut, + [in] DWORD ul + ); + + /* Function 0x2A */ + DWORD _RpcDeletePrinterIC( + [in, out] WINSPOOL_GDI_HANDLE* phPrinterIC + ); + + /* Function 0x2B */ + DWORD _RpcAddPrinterConnection( + [in, unique] WINSPOOL_HANDLE pName + ); + + /* Function 0x2C */ + DWORD _RpcDeletePrinterConnection( + [in, unique] WINSPOOL_HANDLE pName + ); + + /* Function 0x2D */ + DWORD _RpcPrinterMessageBox( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD Error, + [in] ULONG_PTR hWnd, + [in, string] WCHAR* pText, + [in, string] WCHAR* pCaption, + [in] DWORD dwType + ); + + /* Function 0x2E */ + DWORD _RpcAddMonitor( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_MONITOR_CONTAINER* pMonitorContainer + ); + + /* Function 0x2F */ + DWORD _RpcDeleteMonitor( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in, string] WCHAR* pMonitorName + ); + + /* Function 0x30 */ + DWORD _RpcDeletePrintProcessor( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in, string] WCHAR* pPrintProcessorName + ); + + /* Function 0x31 */ + DWORD _RpcAddPrintProvidor( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_PROVIDOR_CONTAINER* pProvidorContainer + ); + + /* Function 0x32 */ + DWORD _RpcDeletePrintProvidor( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pEnvironment, + [in, string] WCHAR* pPrintProviderName + ); + + /* Function 0x33 */ + DWORD _RpcEnumPrintProcessorDatatypes( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pPrintProcessorName, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pDatatypes, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x34 */ + DWORD _RpcResetPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string, unique] WCHAR* pDatatype, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer + ); + + /* Function 0x35 */ + DWORD _RpcGetPrinterDriver2( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string, unique] WCHAR* pEnvironment, + [in] DWORD Level, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pDriver, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [in] DWORD dwClientMajorVersion, + [in] DWORD dwClientMinorVersion, + [out] DWORD* pdwServerMaxVersion, + [out] DWORD* pdwServerMinVersion + ); + + /* Function 0x36 (TODO) */ + DWORD _RpcClientFindFirstPrinterChangeNotification( + /* TODO */ + ); + + /* Function 0x37 (TODO) */ + DWORD _RpcFindNextPrinterChangeNotification( + /* TODO */ + ); + + /* Function 0x38 (TODO) */ + DWORD _RpcFindClosePrinterChangeNotification( + /* TODO */ + ); + + /* Function 0x39 (TODO) */ + DWORD _RpcRouterFindFirstPrinterChangeNotificationOld( + /* TODO */ + ); + + /* Function 0x3A */ + DWORD _RpcReplyOpenPrinter( + [in] WINSPOOL_HANDLE pMachine, + [out] WINSPOOL_PRINTER_HANDLE* phPrinterNotify, + [in] DWORD dwPrinterRemote, + [in] DWORD dwType, + [in, range(0, 512)] DWORD cbBuffer, + [in, unique, size_is(cbBuffer), disable_consistency_check] BYTE* pBuffer + ); + + /* Function 0x3B */ + DWORD _RpcRouterReplyPrinter( + [in] WINSPOOL_PRINTER_HANDLE hNotify, + [in] DWORD fdwFlags, + [in, range(0, 512)] DWORD cbBuffer, + [in, unique, size_is(cbBuffer), disable_consistency_check] BYTE* pBuffer + ); + + /* Function 0x3C */ + DWORD _RpcReplyClosePrinter( + [in, out] WINSPOOL_PRINTER_HANDLE* phNotify + ); + + /* Function 0x3D */ + DWORD _RpcAddPortEx( + [in] WINSPOOL_HANDLE pName, + [in] WINSPOOL_PORT_CONTAINER* pPortContainer, + [in] WINSPOOL_PORT_VAR_CONTAINER* pPortVarContainer, + [in, string] WCHAR* pMonitorName + ); + + /* Function 0x3E */ + DWORD _RpcRemoteFindFirstPrinterChangeNotification( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD fdwFlags, + [in] DWORD fdwOptions, + [in, string, unique] WCHAR* pszLocalMachine, + [in] DWORD dwPrinterLocal, + [in, range(0, 512)] DWORD cbBuffer, + [in, out, unique, size_is(cbBuffer), disable_consistency_check] BYTE* pBuffer + ); + + /* Function 0x3F */ + DWORD _RpcSpoolerInit(); + + /* Function 0x40 (TODO) */ + DWORD _RpcResetPrinterEx( + /* TODO */ + ); + + /* Function 0x41 */ + DWORD _RpcRemoteFindFirstPrinterChangeNotificationEx( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD fdwFlags, + [in] DWORD fdwOptions, + [in, string, unique] WCHAR* pszLocalMachine, + [in] DWORD dwPrinterLocal, + [in, unique] WINSPOOL_V2_NOTIFY_OPTIONS* pOptions + ); + + /* Function 0x42 */ + DWORD _RpcRouterReplyPrinterEx( + [in] WINSPOOL_PRINTER_HANDLE hNotify, + [in] DWORD dwColor, + [in] DWORD fdwFlags, + [out] DWORD* pdwResult, + [in] DWORD dwReplyType, + [in, switch_is(dwReplyType)] WINSPOOL_V2_UREPLY_PRINTER Reply + ); + + /* Function 0x43 */ + DWORD _RpcRouterRefreshPrinterChangeNotification( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD dwColor, + [in, unique] WINSPOOL_V2_NOTIFY_OPTIONS* pOptions, + [out] WINSPOOL_V2_NOTIFY_INFO** ppInfo + ); + + /* Function 0x44 (TODO) */ + DWORD _RpcSetAllocFailCount( + /* TODO */ + ); + + /* Function 0x45 */ + DWORD _RpcOpenPrinterEx( + [in, unique] WINSPOOL_HANDLE pPrinterName, + [out] WINSPOOL_PRINTER_HANDLE* pHandle, + [in, string, unique] WCHAR* pDatatype, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, + [in] DWORD AccessRequired, + [in] WINSPOOL_SPLCLIENT_CONTAINER* pClientInfo + ); + + /* Function 0x46 */ + DWORD _RpcAddPrinterEx( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, + [in] WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, + [in] WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, + [in] WINSPOOL_SPLCLIENT_CONTAINER* pClientInfo, + [out] WINSPOOL_PRINTER_HANDLE* pHandle + ); + + /* Function 0x47 */ + DWORD _RpcSetPort( + [in, unique] WINSPOOL_HANDLE pName, + [in, string, unique] WCHAR* pPortName, + [in] WINSPOOL_PORT_CONTAINER* pPortContainer + ); + + /* Function 0x48 */ + DWORD _RpcEnumPrinterData( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in] DWORD dwIndex, + [out, size_is(cbValueName / sizeof(WCHAR))] WCHAR* pValueName, + [in] DWORD cbValueName, + [out] DWORD* pcbValueName, + [out] DWORD* pType, + [out, size_is(cbData)] BYTE* pData, + [in] DWORD cbData, + [out] DWORD* pcbData + ); + + /* Function 0x49 */ + DWORD _RpcDeletePrinterData( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] WCHAR* pValueName + ); + + /* Function 0x4A (TODO) */ + DWORD _RpcClusterSplOpen( + /* TODO */ + ); + + /* Function 0x4B (TODO) */ + DWORD _RpcClusterSplClose( + /* TODO */ + ); + + /* Function 0x4C (TODO) */ + DWORD _RpcClusterSplIsAlive( + /* TODO */ + ); + + /* Function 0x4D */ + DWORD _RpcSetPrinterDataEx( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName, + [in, string] const WCHAR* pValueName, + [in] DWORD Type, + [in, size_is(cbData)] BYTE* pData, + [in] DWORD cbData + ); + + /* Function 0x4E */ + DWORD _RpcGetPrinterDataEx( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName, + [in, string] const WCHAR* pValueName, + [out] DWORD* pType, + [out, size_is(nSize)] BYTE* pData, + [in] DWORD nSize, + [out] DWORD* pcbNeeded + ); + + /* Function 0x4F */ + DWORD _RpcEnumPrinterDataEx( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName, + [out, size_is(cbEnumValues)] BYTE* pEnumValues, + [in] DWORD cbEnumValues, + [out] DWORD* pcbEnumValues, + [out] DWORD* pnEnumValues + ); + + /* Function 0x50 */ + DWORD _RpcEnumPrinterKey( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName, + [out, size_is(cbSubkey / sizeof(WCHAR))] WCHAR* pSubkey, + [in] DWORD cbSubkey, + [out] DWORD* pcbSubkey + ); + + /* Function 0x51 */ + DWORD _RpcDeletePrinterDataEx( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName, + [in, string] const WCHAR* pValueName + ); + + /* Function 0x52 */ + DWORD _RpcDeletePrinterKey( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string] const WCHAR* pKeyName + ); + + /* Function 0x53 (TODO) */ + DWORD _RpcSeekPrinter( + /* TODO */ + ); + + /* Function 0x54 */ + DWORD _RpcDeletePrinterDriverEx( + [in, unique] WINSPOOL_HANDLE pName, + [in, string] WCHAR* pEnvironment, + [in, string] WCHAR* pDriverName, + [in] DWORD dwDeleteFlag, + [in] DWORD dwVersionNum + ); + + /* Function 0x55 */ + DWORD _RpcAddPerMachineConnection( + [in, unique] WINSPOOL_HANDLE pServer, + [in, string] const WCHAR* pPrinterName, + [in, string] const WCHAR* pPrintServer, + [in, string] const WCHAR* pProvider + ); + + /* Function 0x56 */ + DWORD _RpcDeletePerMachineConnection( + [in, unique] WINSPOOL_HANDLE pServer, + [in, string] const WCHAR* pPrinterName + ); + + /* Function 0x57 */ + DWORD _RpcEnumPerMachineConnections( + [in, unique] WINSPOOL_HANDLE pServer, + [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pPrinterEnum, + [in] DWORD cbBuf, + [out] DWORD* pcbNeeded, + [out] DWORD* pcReturned + ); + + /* Function 0x58 */ + DWORD _RpcXcvData( + [in] WINSPOOL_PRINTER_HANDLE hXcv, + [in, string] const WCHAR* pszDataName, + [in, size_is(cbInputData)] BYTE* pInputData, + [in] DWORD cbInputData, + [out, size_is(cbOutputData)] BYTE* pOutputData, + [in] DWORD cbOutputData, + [out] DWORD* pcbOutputNeeded, + [in, out] DWORD* pdwStatus + ); + + /* Function 0x59 */ + DWORD _RpcAddPrinterDriverEx( + [in, unique] WINSPOOL_HANDLE pName, + [in] WINSPOOL_DRIVER_CONTAINER* pDriverContainer, + [in] DWORD dwFileCopyFlags + ); + + /* Function 0x5A (TODO) */ + DWORD _RpcSplOpenPrinter( + /* TODO */ + ); + + /* Function 0x5B (TODO) */ + DWORD _RpcGetSpoolFileInfo( + /* TODO */ + ); + + /* Function 0x5C (TODO) */ + DWORD _RpcCommitSpoolData( + /* TODO */ + ); + + /* Function 0x5D (TODO) */ + DWORD _RpcCloseSpoolFileHandle( + /* TODO */ + ); + + /* Function 0x5E */ + DWORD _RpcFlushPrinter( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, size_is(cbBuf)] BYTE* pBuf, + [in] DWORD cbBuf, + [out] DWORD* pcWritten, + [in] DWORD cSleep + ); + + /* Function 0x5F */ + DWORD _RpcSendRecvBidiData( + [in] WINSPOOL_PRINTER_HANDLE hPrinter, + [in, string, unique] const WCHAR* pAction, + [in] WINSPOOL_BIDI_REQUEST_CONTAINER* pReqData, + [out] WINSPOOL_BIDI_RESPONSE_CONTAINER** ppRespData + ); + + /* Function 0x60 (TODO) */ + DWORD _RpcAddDriverCatalog( + /* TODO */ + ); +}
9 years, 7 months
1
0
0
0
[akhaldi] 67661: [WTSAPI32_WINETEST] Import from Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:58:10 2015 New Revision: 67661 URL:
http://svn.reactos.org/svn/reactos?rev=67661&view=rev
Log: [WTSAPI32_WINETEST] Import from Wine Staging 1.7.37. CORE-9246 Added: trunk/rostests/winetests/wtsapi32/ (with props) trunk/rostests/winetests/wtsapi32/CMakeLists.txt (with props) trunk/rostests/winetests/wtsapi32/testlist.c (with props) trunk/rostests/winetests/wtsapi32/wtsapi.c (with props) Modified: trunk/rostests/winetests/CMakeLists.txt Modified: trunk/rostests/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
============================================================================== --- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Mon May 11 12:58:10 2015 @@ -119,6 +119,7 @@ add_subdirectory(ws2_32) add_subdirectory(wscript) add_subdirectory(wshom) +add_subdirectory(wtsapi32) add_subdirectory(xcopy) add_subdirectory(xinput1_3) add_subdirectory(xmllite) Propchange: trunk/rostests/winetests/wtsapi32/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon May 11 12:58:10 2015 @@ -0,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/wtsapi32/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/wtsapi32/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/rostests/winetests/wtsapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/CMakeL…
============================================================================== --- trunk/rostests/winetests/wtsapi32/CMakeLists.txt (added) +++ trunk/rostests/winetests/wtsapi32/CMakeLists.txt [iso-8859-1] Mon May 11 12:58:10 2015 @@ -0,0 +1,6 @@ + +add_definitions(-DUSE_WINE_TODOS) +add_executable(wtsapi32_winetest wtsapi.c testlist.c) +set_module_type(wtsapi32_winetest win32cui) +add_importlibs(wtsapi32_winetest wtsapi32 msvcrt kernel32) +add_cd_file(TARGET wtsapi32_winetest DESTINATION reactos/bin FOR all) Propchange: trunk/rostests/winetests/wtsapi32/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/wtsapi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/testli…
============================================================================== --- trunk/rostests/winetests/wtsapi32/testlist.c (added) +++ trunk/rostests/winetests/wtsapi32/testlist.c [iso-8859-1] Mon May 11 12:58:10 2015 @@ -0,0 +1,12 @@ +/* Automatically generated by make depend; DO NOT EDIT!! */ + +#define STANDALONE +#include <wine/test.h> + +extern void func_wtsapi(void); + +const struct test winetest_testlist[] = +{ + { "wtsapi", func_wtsapi }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/wtsapi32/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/wtsapi32/wtsapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wtsapi32/wtsapi…
============================================================================== --- trunk/rostests/winetests/wtsapi32/wtsapi.c (added) +++ trunk/rostests/winetests/wtsapi32/wtsapi.c [iso-8859-1] Mon May 11 12:58:10 2015 @@ -0,0 +1,95 @@ +/* + * Copyright 2014 Stefan Leichter + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include <stdlib.h> +#include <windef.h> +#include <winbase.h> +#include <wine/winternl.h> +#include <wtsapi32.h> + +#include "wine/test.h" + +static void test_WTSEnumerateProcessesW(void) +{ + BOOL found = FALSE, ret; + DWORD count, i; + PWTS_PROCESS_INFOW info; + WCHAR *pname, nameW[MAX_PATH]; + + GetModuleFileNameW(NULL, nameW, MAX_PATH); + for (pname = nameW + lstrlenW(nameW); pname > nameW; pname--) + { + if(*pname == '/' || *pname == '\\') + { + pname++; + break; + } + } + + info = NULL; + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info, &count); + ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); + ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); + if (info) WTSFreeMemory(info); + + info = NULL; + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info, &count); + ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); + ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); + if (info) WTSFreeMemory(info); + + info = NULL; + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info, &count); + ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); + ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); + if (info) WTSFreeMemory(info); + + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count); + ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); + ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); + + info = NULL; + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL); + ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); + ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); + if (info) WTSFreeMemory(info); + + count = 0; + info = NULL; + SetLastError(0xdeadbeef); + ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, &count); + ok(ret || broken(!ret), /* fails on Win2K with error ERROR_APP_WRONG_OS */ + "expected WTSEnumerateProcessesW to succeed; failed with %d\n", GetLastError()); + for(i = 0; ret && i < count; i++) + { + found = found || !lstrcmpW(pname, info[i].pProcessName); + } + ok(found || broken(!ret), "process name %s not found\n", wine_dbgstr_w(pname)); + if (info) WTSFreeMemory(info); +} + +START_TEST (wtsapi) +{ + test_WTSEnumerateProcessesW(); +} Propchange: trunk/rostests/winetests/wtsapi32/wtsapi.c ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 7 months
1
0
0
0
[akhaldi] 67660: [WTSAPI32] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:55:05 2015 New Revision: 67660 URL:
http://svn.reactos.org/svn/reactos?rev=67660&view=rev
Log: [WTSAPI32] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/reactos/dll/win32/wtsapi32/CMakeLists.txt trunk/reactos/dll/win32/wtsapi32/wtsapi32.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/wtsapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wtsapi32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/wtsapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wtsapi32/CMakeLists.txt [iso-8859-1] Mon May 11 12:55:05 2015 @@ -1,7 +1,7 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -spec2def(wtsapi32.dll wtsapi32.spec) +spec2def(wtsapi32.dll wtsapi32.spec ADD_IMPORTLIB) list(APPEND SOURCE wtsapi32.c Modified: trunk/reactos/dll/win32/wtsapi32/wtsapi32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wtsapi32/wtsapi3…
============================================================================== --- trunk/reactos/dll/win32/wtsapi32/wtsapi32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wtsapi32/wtsapi32.c [iso-8859-1] Mon May 11 12:55:05 2015 @@ -18,8 +18,11 @@ #include <config.h> #include <stdarg.h> //#include <stdlib.h> +#include <ntstatus.h> +#define WIN32_NO_STATUS #include <windef.h> #include <winbase.h> +#include <wine/winternl.h> #include <wtsapi32.h> #include <wine/debug.h> @@ -84,8 +87,13 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount) { - FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, - ppProcessInfo, pCount); + WTS_PROCESS_INFOW *processInfo; + SYSTEM_PROCESS_INFORMATION *spi; + ULONG size = 0x4000; + void *buf = NULL; + NTSTATUS status; + DWORD count; + WCHAR *name; if (!ppProcessInfo || !pCount || Reserved != 0 || Version != 1) { @@ -93,9 +101,71 @@ return FALSE; } - *pCount = 0; - *ppProcessInfo = NULL; - + if (hServer != WTS_CURRENT_SERVER_HANDLE) + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } + + do + { + size *= 2; + HeapFree(GetProcessHeap(), 0, buf); + buf = HeapAlloc(GetProcessHeap(), 0, size); + if (!buf) + { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + status = NtQuerySystemInformation(SystemProcessInformation, buf, size, NULL); + } + while (status == STATUS_INFO_LENGTH_MISMATCH); + + if (status != STATUS_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, buf); + SetLastError(RtlNtStatusToDosError(status)); + return FALSE; + } + + spi = buf; + count = size = 0; + for (;;) + { + size += sizeof(WTS_PROCESS_INFOW) + spi->ProcessName.Length + sizeof(WCHAR); + count++; + if (spi->NextEntryOffset == 0) break; + spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset); + } + + processInfo = HeapAlloc(GetProcessHeap(), 0, size); + if (!processInfo) + { + HeapFree(GetProcessHeap(), 0, buf); + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + name = (WCHAR *)&processInfo[count]; + + *ppProcessInfo = processInfo; + *pCount = count; + + spi = buf; + while (count--) + { + processInfo->SessionId = 0; + processInfo->ProcessId = HandleToUlong(spi->UniqueProcessId); + processInfo->pProcessName = name; + processInfo->pUserSid = NULL; + memcpy( name, spi->ProcessName.Buffer, spi->ProcessName.Length ); + name[ spi->ProcessName.Length/sizeof(WCHAR) ] = 0; + + processInfo++; + name += (spi->ProcessName.Length + sizeof(WCHAR))/sizeof(WCHAR); + spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset); + } + + HeapFree(GetProcessHeap(), 0, buf); return TRUE; } @@ -159,9 +229,7 @@ */ void WINAPI WTSFreeMemory(PVOID pMemory) { - static int once; - - if (!once++) FIXME("Stub %p\n", pMemory); + HeapFree(GetProcessHeap(), 0, pMemory); } /************************************************************ 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] Mon May 11 12:55:05 2015 @@ -217,7 +217,7 @@ reactos/dll/win32/wmi # Synced to Wine-1.7.27 reactos/dll/win32/wmiutils # Synced to Wine-1.7.27 reactos/dll/win32/wshom.ocx # Synced to WineStaging-1.7.37 -reactos/dll/win32/wtsapi32 # Synced to Wine-1.7.27 +reactos/dll/win32/wtsapi32 # Synced to WineStaging-1.7.37 reactos/dll/win32/wuapi # Synced to Wine-1.7.27 reactos/dll/win32/xinput1_1 # Synced to Wine-1.7.27 reactos/dll/win32/xinput1_2 # Synced to Wine-1.7.27
9 years, 7 months
1
0
0
0
[akhaldi] 67659: [PSDK] Add missing WTS_CURRENT_SERVER_HANDLE definition.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:52:08 2015 New Revision: 67659 URL:
http://svn.reactos.org/svn/reactos?rev=67659&view=rev
Log: [PSDK] Add missing WTS_CURRENT_SERVER_HANDLE definition. Modified: trunk/reactos/include/psdk/wtsapi32.h Modified: trunk/reactos/include/psdk/wtsapi32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wtsapi32.h?re…
============================================================================== --- trunk/reactos/include/psdk/wtsapi32.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wtsapi32.h [iso-8859-1] Mon May 11 12:52:08 2015 @@ -135,6 +135,8 @@ DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO) DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO) +#define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL) + void WINAPI WTSCloseServer(HANDLE); BOOL WINAPI WTSConnectSessionA(ULONG, ULONG, PSTR, BOOL); BOOL WINAPI WTSConnectSessionW(ULONG, ULONG, PWSTR, BOOL);
9 years, 7 months
1
0
0
0
[akhaldi] 67658: [WINTRUST_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:51:23 2015 New Revision: 67658 URL:
http://svn.reactos.org/svn/reactos?rev=67658&view=rev
Log: [WINTRUST_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/rostests/winetests/wintrust/asn.c trunk/rostests/winetests/wintrust/crypt.c Modified: trunk/rostests/winetests/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/asn.c?…
============================================================================== --- trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/asn.c [iso-8859-1] Mon May 11 12:51:23 2015 @@ -305,8 +305,6 @@ static const BYTE emptySequence[] = { 0x30,0x00 }; static BYTE flags[] = { 1 }; static const BYTE onlyFlagsPEImage[] = { 0x30,0x04,0x03,0x02,0x00,0x01 }; -static const BYTE moreFlagsPEImage[] = { -0x30,0x06,0x03,0x04,0x04,0xff,0x80,0x10 }; static const BYTE onlyEmptyFilePEImage[] = { 0x30,0x06,0xa0,0x04,0xa2,0x02,0x80,0x00 }; static const BYTE flagsAndEmptyFilePEImage[] = { Modified: trunk/rostests/winetests/wintrust/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/crypt.…
============================================================================== --- trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] Mon May 11 12:51:23 2015 @@ -789,7 +789,7 @@ /* Only enumerate the attributes */ trace("Only attributes\n"); - attrcount = membercount = 0; + attrcount = 0; catcdf = pCryptCATCDFOpen(cdffileW, NULL); catattr = NULL;
9 years, 7 months
1
0
0
0
[akhaldi] 67657: [WINTRUST] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:51:01 2015 New Revision: 67657 URL:
http://svn.reactos.org/svn/reactos?rev=67657&view=rev
Log: [WINTRUST] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/reactos/dll/win32/wintrust/softpub.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/wintrust/softpub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/softpub…
============================================================================== --- trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] Mon May 11 12:51:01 2015 @@ -1200,7 +1200,11 @@ if (data->fOpenedFile && data->pWintrustData->dwUnionChoice == WTD_CHOICE_FILE && data->pWintrustData->u.pFile) + { CloseHandle(data->pWintrustData->u.pFile->hFile); + data->pWintrustData->u.pFile->hFile = INVALID_HANDLE_VALUE; + data->fOpenedFile = FALSE; + } return S_OK; } 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] Mon May 11 12:51:01 2015 @@ -212,7 +212,7 @@ reactos/dll/win32/winmm/midimap # Forked at Wine-20050628 reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628 reactos/dll/win32/winscard # Synced to Wine-1.7.27 -reactos/dll/win32/wintrust # Synced to Wine-1.7.27 +reactos/dll/win32/wintrust # Synced to WineStaging-1.7.37 reactos/dll/win32/wldap32 # Synced to Wine-1.7.27 reactos/dll/win32/wmi # Synced to Wine-1.7.27 reactos/dll/win32/wmiutils # Synced to Wine-1.7.27
9 years, 7 months
1
0
0
0
[akhaldi] 67656: [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:50:02 2015 New Revision: 67656 URL:
http://svn.reactos.org/svn/reactos?rev=67656&view=rev
Log: [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/rostests/winetests/windowscodecs/info.c trunk/rostests/winetests/windowscodecs/metadata.c Modified: trunk/rostests/winetests/windowscodecs/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/i…
============================================================================== --- trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] Mon May 11 12:50:02 2015 @@ -420,69 +420,12 @@ count = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); -todo_wine ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); -todo_wine ok(count == 0, "unexpected count %d\n", count); hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, 0, NULL, NULL, NULL); ok(hr == E_INVALIDARG, "GetPatterns failed, hr=%x\n", hr); - - count = size = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, - 0, NULL, &count, &size); -todo_wine - ok(hr == WINCODEC_ERR_COMPONENTNOTFOUND || broken(hr == S_OK) /* Windows XP */, - "GetPatterns failed, hr=%x\n", hr); - ok(count == 0xdeadbeef, "unexpected count %d\n", count); - ok(size == 0xdeadbeef, "unexpected size %d\n", size); - - IWICMetadataReaderInfo_Release(reader_info); - - IWICComponentInfo_Release(info); - - hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); -todo_wine - ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); - - if (FAILED(hr)) - { - IWICImagingFactory_Release(factory); - return; - } - - hr = IWICComponentInfo_QueryInterface(info, &IID_IWICMetadataReaderInfo, (void**)&reader_info); - ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); - - hr = IWICMetadataReaderInfo_GetCLSID(reader_info, NULL); - ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr); - - hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); - ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); - ok(IsEqualGUID(&CLSID_WICXMPStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); - - hr = IWICMetadataReaderInfo_GetMetadataFormat(reader_info, &clsid); - ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); - ok(IsEqualGUID(&GUID_MetadataFormatXMPStruct, &clsid), "GetMetadataFormat returned wrong result\n"); - - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "GetContainerFormats failed, hr=%x\n", hr); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count >= 2, "unexpected count %d\n", count); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 1, container_formats, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count == 1, "unexpected count %d\n", count); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 10, container_formats, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count == min(count, 10), "unexpected count %d\n", count); count = size = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, @@ -492,6 +435,60 @@ ok(count == 0xdeadbeef, "unexpected count %d\n", count); ok(size == 0xdeadbeef, "unexpected size %d\n", size); + IWICMetadataReaderInfo_Release(reader_info); + + IWICComponentInfo_Release(info); + + hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); +todo_wine + ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); + + if (FAILED(hr)) + { + IWICImagingFactory_Release(factory); + return; + } + + hr = IWICComponentInfo_QueryInterface(info, &IID_IWICMetadataReaderInfo, (void**)&reader_info); + ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); + + hr = IWICMetadataReaderInfo_GetCLSID(reader_info, NULL); + ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr); + + hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); + ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); + ok(IsEqualGUID(&CLSID_WICXMPStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); + + hr = IWICMetadataReaderInfo_GetMetadataFormat(reader_info, &clsid); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); + ok(IsEqualGUID(&GUID_MetadataFormatXMPStruct, &clsid), "GetMetadataFormat returned wrong result\n"); + + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, NULL); + ok(hr == E_INVALIDARG, "GetContainerFormats failed, hr=%x\n", hr); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count >= 2, "unexpected count %d\n", count); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 1, container_formats, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count == 1, "unexpected count %d\n", count); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 10, container_formats, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count == min(count, 10), "unexpected count %d\n", count); + + count = size = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, + 0, NULL, &count, &size); + ok(hr == WINCODEC_ERR_COMPONENTNOTFOUND || broken(hr == S_OK) /* Windows XP */, + "GetPatterns failed, hr=%x\n", hr); + ok(count == 0xdeadbeef, "unexpected count %d\n", count); + ok(size == 0xdeadbeef, "unexpected size %d\n", size); + count = size = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_MetadataFormatXMP, 0, NULL, &count, &size); Modified: trunk/rostests/winetests/windowscodecs/metadata.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/m…
============================================================================== --- trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] Mon May 11 12:50:02 2015 @@ -846,17 +846,24 @@ stream = create_stream(metadata_tEXt, sizeof(metadata_tEXt)); hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + NULL, NULL, WICPersistOptionsDefault, + stream, &reader); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, + NULL, &reader); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, + stream, NULL); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, stream, &reader); -todo_wine ok(hr == S_OK, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); - /* NOTE: removed once Wine is fixed */ - if (FAILED(hr)) - { - IStream_Release(stream); - IWICComponentFactory_Release(factory); - return; - } if (SUCCEEDED(hr)) { @@ -912,7 +919,7 @@ IWICMetadataReader *reader; GUID containerformat; HRESULT hr; - UINT count; + UINT count=0xdeadbeef; hr = CoCreateInstance(&CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapDecoder, (void**)&decoder);
9 years, 7 months
1
0
0
0
[akhaldi] 67655: [WINDOWSCODECS] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon May 11 12:49:42 2015 New Revision: 67655 URL:
http://svn.reactos.org/svn/reactos?rev=67655&view=rev
Log: [WINDOWSCODECS] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/reactos/dll/win32/windowscodecs/imgfactory.c trunk/reactos/dll/win32/windowscodecs/info.c trunk/reactos/dll/win32/windowscodecs/pngformat.c trunk/reactos/dll/win32/windowscodecs/regsvr.c trunk/reactos/dll/win32/windowscodecs/tgaformat.c trunk/reactos/dll/win32/windowscodecs/tiffformat.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/windowscodecs/imgfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/im…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -938,9 +938,129 @@ static HRESULT WINAPI ComponentFactory_CreateMetadataReaderFromContainer(IWICComponentFactory *iface, REFGUID format, const GUID *vendor, DWORD options, IStream *stream, IWICMetadataReader **reader) { - FIXME("%p,%s,%s,%x,%p,%p: stub\n", iface, debugstr_guid(format), debugstr_guid(vendor), + HRESULT hr; + IEnumUnknown *enumreaders; + IUnknown *unkreaderinfo; + IWICMetadataReaderInfo *readerinfo; + IWICPersistStream *wicpersiststream; + ULONG num_fetched; + GUID decoder_vendor; + BOOL matches; + LARGE_INTEGER zero; + + TRACE("%p,%s,%s,%x,%p,%p\n", iface, debugstr_guid(format), debugstr_guid(vendor), options, stream, reader); - return E_NOTIMPL; + + if (!format || !stream || !reader) + return E_INVALIDARG; + + zero.QuadPart = 0; + + hr = CreateComponentEnumerator(WICMetadataReader, WICComponentEnumerateDefault, &enumreaders); + if (FAILED(hr)) return hr; + + *reader = NULL; + +start: + while (!*reader) + { + hr = IEnumUnknown_Next(enumreaders, 1, &unkreaderinfo, &num_fetched); + + if (hr == S_OK) + { + hr = IUnknown_QueryInterface(unkreaderinfo, &IID_IWICMetadataReaderInfo, (void**)&readerinfo); + + if (SUCCEEDED(hr)) + { + if (vendor) + { + hr = IWICMetadataReaderInfo_GetVendorGUID(readerinfo, &decoder_vendor); + + if (FAILED(hr) || !IsEqualIID(vendor, &decoder_vendor)) + { + IWICMetadataReaderInfo_Release(readerinfo); + IUnknown_Release(unkreaderinfo); + continue; + } + } + + hr = IWICMetadataReaderInfo_MatchesPattern(readerinfo, format, stream, &matches); + + if (SUCCEEDED(hr) && matches) + { + hr = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + + if (SUCCEEDED(hr)) + hr = IWICMetadataReaderInfo_CreateInstance(readerinfo, reader); + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_QueryInterface(*reader, &IID_IWICPersistStream, (void**)&wicpersiststream); + + if (SUCCEEDED(hr)) + { + hr = IWICPersistStream_LoadEx(wicpersiststream, + stream, vendor, options & WICPersistOptionsMask); + + IWICPersistStream_Release(wicpersiststream); + } + + if (FAILED(hr)) + { + IWICMetadataReader_Release(*reader); + *reader = NULL; + } + } + } + + IUnknown_Release(readerinfo); + } + + IUnknown_Release(unkreaderinfo); + } + else + break; + } + + if (!*reader && vendor) + { + vendor = NULL; + IEnumUnknown_Reset(enumreaders); + goto start; + } + + IEnumUnknown_Release(enumreaders); + + if (!*reader && !(options & WICMetadataCreationFailUnknown)) + { + hr = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); + + if (SUCCEEDED(hr)) + hr = UnknownMetadataReader_CreateInstance(&IID_IWICMetadataReader, (void**)reader); + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_QueryInterface(*reader, &IID_IWICPersistStream, (void**)&wicpersiststream); + + if (SUCCEEDED(hr)) + { + hr = IWICPersistStream_LoadEx(wicpersiststream, stream, NULL, options & WICPersistOptionsMask); + + IWICPersistStream_Release(wicpersiststream); + } + + if (FAILED(hr)) + { + IWICMetadataReader_Release(*reader); + *reader = NULL; + } + } + } + + if (*reader) + return S_OK; + else + return WINCODEC_ERR_COMPONENTNOTFOUND; } static HRESULT WINAPI ComponentFactory_CreateMetadataWriter(IWICComponentFactory *iface, Modified: trunk/reactos/dll/win32/windowscodecs/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/in…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -39,6 +39,7 @@ static const WCHAR requiresfullstream_valuename[] = {'R','e','q','u','i','r','e','s','F','u','l','l','S','t','r','e','a','m',0}; static const WCHAR supportspadding_valuename[] = {'S','u','p','p','o','r','t','s','P','a','d','d','i','n','g',0}; static const WCHAR fileextensions_valuename[] = {'F','i','l','e','E','x','t','e','n','s','i','o','n','s',0}; +static const WCHAR containers_keyname[] = {'C','o','n','t','a','i','n','e','r','s',0}; static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size) @@ -134,7 +135,12 @@ return E_INVALIDARG; ret = RegOpenKeyExW(classkey, subkeyname, 0, KEY_READ, &subkey); - if (ret != ERROR_SUCCESS) return HRESULT_FROM_WIN32(ret); + if (ret == ERROR_FILE_NOT_FOUND) + { + *actual_size = 0; + return S_OK; + } + else if (ret != ERROR_SUCCESS) return HRESULT_FROM_WIN32(ret); if (buffer) { @@ -1613,10 +1619,11 @@ static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats(IWICMetadataReaderInfo *iface, UINT length, GUID *formats, UINT *actual_length) { - if (!actual_length) return E_INVALIDARG; - - FIXME("(%p,%u,%p,%p): stub\n", iface, length, formats, actual_length); - return E_NOTIMPL; + MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface); + TRACE("(%p,%u,%p,%p)\n", iface, length, formats, actual_length); + + return ComponentInfo_GetGuidList(This->classkey, containers_keyname, length, + formats, actual_length); } static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer(IWICMetadataReaderInfo *iface, @@ -1657,19 +1664,187 @@ } static HRESULT WINAPI MetadataReaderInfo_GetPatterns(IWICMetadataReaderInfo *iface, - REFGUID container, UINT length, WICMetadataPattern *pattern, UINT *count, UINT *actual_length) -{ - if (!actual_length) return E_INVALIDARG; - - FIXME("(%p,%s,%u,%p,%p,%p): stub\n", iface, debugstr_guid(container), length, pattern, count, actual_length); - return E_NOTIMPL; + REFGUID container, UINT length, WICMetadataPattern *patterns, UINT *count, UINT *actual_length) +{ + MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface); + HRESULT hr=S_OK; + LONG res; + UINT pattern_count=0, patterns_size=0; + DWORD valuesize, patternsize; + BYTE *bPatterns=(BYTE*)patterns; + HKEY containers_key, guid_key, pattern_key; + WCHAR subkeyname[11]; + WCHAR guidkeyname[39]; + int i; + static const WCHAR uintformatW[] = {'%','u',0}; + static const WCHAR patternW[] = {'P','a','t','t','e','r','n',0}; + static const WCHAR positionW[] = {'P','o','s','i','t','i','o','n',0}; + static const WCHAR maskW[] = {'M','a','s','k',0}; + static const WCHAR dataoffsetW[] = {'D','a','t','a','O','f','f','s','e','t',0}; + + TRACE("(%p,%s,%u,%p,%p,%p)\n", iface, debugstr_guid(container), length, patterns, count, actual_length); + + if (!actual_length || !container) return E_INVALIDARG; + + res = RegOpenKeyExW(This->classkey, containers_keyname, 0, KEY_READ, &containers_key); + if (res == ERROR_SUCCESS) + { + StringFromGUID2(container, guidkeyname, 39); + + res = RegOpenKeyExW(containers_key, guidkeyname, 0, KEY_READ, &guid_key); + if (res == ERROR_FILE_NOT_FOUND) hr = WINCODEC_ERR_COMPONENTNOTFOUND; + else if (res != ERROR_SUCCESS) hr = HRESULT_FROM_WIN32(res); + + RegCloseKey(containers_key); + } + else if (res == ERROR_FILE_NOT_FOUND) hr = WINCODEC_ERR_COMPONENTNOTFOUND; + else hr = HRESULT_FROM_WIN32(res); + + if (SUCCEEDED(hr)) + { + res = RegQueryInfoKeyW(guid_key, NULL, NULL, NULL, &pattern_count, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + if (res != ERROR_SUCCESS) hr = HRESULT_FROM_WIN32(res); + + if (SUCCEEDED(hr)) + { + patterns_size = pattern_count * sizeof(WICMetadataPattern); + + for (i=0; i<pattern_count; i++) + { + snprintfW(subkeyname, 11, uintformatW, i); + res = RegOpenKeyExW(guid_key, subkeyname, 0, KEY_READ, &pattern_key); + if (res == ERROR_SUCCESS) + { + res = RegGetValueW(pattern_key, NULL, patternW, RRF_RT_REG_BINARY, NULL, + NULL, &patternsize); + patterns_size += patternsize*2; + + if ((length >= patterns_size) && (res == ERROR_SUCCESS)) + { + patterns[i].Length = patternsize; + + patterns[i].DataOffset.QuadPart = 0; + valuesize = sizeof(ULARGE_INTEGER); + RegGetValueW(pattern_key, NULL, dataoffsetW, RRF_RT_DWORD|RRF_RT_QWORD, NULL, + &patterns[i].DataOffset, &valuesize); + + patterns[i].Position.QuadPart = 0; + valuesize = sizeof(ULARGE_INTEGER); + res = RegGetValueW(pattern_key, NULL, positionW, RRF_RT_DWORD|RRF_RT_QWORD, NULL, + &patterns[i].Position, &valuesize); + + if (res == ERROR_SUCCESS) + { + patterns[i].Pattern = bPatterns+patterns_size-patternsize*2; + valuesize = patternsize; + res = RegGetValueW(pattern_key, NULL, patternW, RRF_RT_REG_BINARY, NULL, + patterns[i].Pattern, &valuesize); + } + + if (res == ERROR_SUCCESS) + { + patterns[i].Mask = bPatterns+patterns_size-patternsize; + valuesize = patternsize; + res = RegGetValueW(pattern_key, NULL, maskW, RRF_RT_REG_BINARY, NULL, + patterns[i].Mask, &valuesize); + } + } + + RegCloseKey(pattern_key); + } + if (res != ERROR_SUCCESS) + { + hr = HRESULT_FROM_WIN32(res); + break; + } + } + } + + RegCloseKey(guid_key); + } + + if (hr == S_OK) + { + *count = pattern_count; + *actual_length = patterns_size; + if (patterns && length < patterns_size) + hr = WINCODEC_ERR_INSUFFICIENTBUFFER; + } + + return hr; } static HRESULT WINAPI MetadataReaderInfo_MatchesPattern(IWICMetadataReaderInfo *iface, REFGUID container, IStream *stream, BOOL *matches) { - FIXME("(%p,%s,%p,%p): stub\n", iface, debugstr_guid(container), stream, matches); - return E_NOTIMPL; + HRESULT hr; + WICMetadataPattern *patterns; + UINT pattern_count=0, patterns_size=0; + ULONG datasize=0; + BYTE *data=NULL; + ULONG bytesread; + UINT i; + LARGE_INTEGER seekpos; + ULONG pos; + + TRACE("(%p,%s,%p,%p)\n", iface, debugstr_guid(container), stream, matches); + + hr = MetadataReaderInfo_GetPatterns(iface, container, 0, NULL, &pattern_count, &patterns_size); + if (FAILED(hr)) return hr; + + patterns = HeapAlloc(GetProcessHeap(), 0, patterns_size); + if (!patterns) return E_OUTOFMEMORY; + + hr = MetadataReaderInfo_GetPatterns(iface, container, patterns_size, patterns, &pattern_count, &patterns_size); + if (FAILED(hr)) goto end; + + for (i=0; i<pattern_count; i++) + { + if (datasize < patterns[i].Length) + { + HeapFree(GetProcessHeap(), 0, data); + datasize = patterns[i].Length; + data = HeapAlloc(GetProcessHeap(), 0, patterns[i].Length); + if (!data) + { + hr = E_OUTOFMEMORY; + break; + } + } + + seekpos.QuadPart = patterns[i].Position.QuadPart; + hr = IStream_Seek(stream, seekpos, STREAM_SEEK_SET, NULL); + if (FAILED(hr)) break; + + hr = IStream_Read(stream, data, patterns[i].Length, &bytesread); + if (hr == S_FALSE || (hr == S_OK && bytesread != patterns[i].Length)) /* past end of stream */ + continue; + if (FAILED(hr)) break; + + for (pos=0; pos<patterns[i].Length; pos++) + { + if ((data[pos] & patterns[i].Mask[pos]) != patterns[i].Pattern[pos]) + break; + } + if (pos == patterns[i].Length) /* matches pattern */ + { + hr = S_OK; + *matches = TRUE; + break; + } + } + + if (i == pattern_count) /* does not match any pattern */ + { + hr = S_OK; + *matches = FALSE; + } + +end: + HeapFree(GetProcessHeap(), 0, patterns); + HeapFree(GetProcessHeap(), 0, data); + + return hr; } static HRESULT WINAPI MetadataReaderInfo_CreateInstance(IWICMetadataReaderInfo *iface, Modified: trunk/reactos/dll/win32/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pn…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -181,13 +181,28 @@ MAKE_FUNCPTR(png_write_rows); #undef MAKE_FUNCPTR +static CRITICAL_SECTION init_png_cs; +static CRITICAL_SECTION_DEBUG init_png_cs_debug = +{ + 0, 0, &init_png_cs, + { &init_png_cs_debug.ProcessLocksList, + &init_png_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": init_png_cs") } +}; +static CRITICAL_SECTION init_png_cs = { &init_png_cs_debug, -1, 0, 0, 0, 0 }; + static void *load_libpng(void) { - if((libpng_handle = wine_dlopen(SONAME_LIBPNG, RTLD_NOW, NULL, 0)) != NULL) { + void *result; + + EnterCriticalSection(&init_png_cs); + + if(!libpng_handle && (libpng_handle = wine_dlopen(SONAME_LIBPNG, RTLD_NOW, NULL, 0)) != NULL) { #define LOAD_FUNCPTR(f) \ if((p##f = wine_dlsym(libpng_handle, #f, NULL, 0)) == NULL) { \ libpng_handle = NULL; \ + LeaveCriticalSection(&init_png_cs); \ return NULL; \ } LOAD_FUNCPTR(png_create_read_struct); @@ -232,7 +247,12 @@ #undef LOAD_FUNCPTR } - return libpng_handle; + + result = libpng_handle; + + LeaveCriticalSection(&init_png_cs); + + return result; } static void user_error_fn(png_structp png_ptr, png_const_charp error_message) @@ -978,7 +998,7 @@ *ppv = NULL; - if (!libpng_handle && !load_libpng()) + if (!load_libpng()) { ERR("Failed reading PNG because unable to find %s\n",SONAME_LIBPNG); return E_FAIL; @@ -1707,7 +1727,7 @@ *ppv = NULL; - if (!libpng_handle && !load_libpng()) + if (!load_libpng()) { ERR("Failed writing PNG because unable to find %s\n",SONAME_LIBPNG); return E_FAIL; Modified: trunk/reactos/dll/win32/windowscodecs/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/re…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -133,21 +133,6 @@ */ static const WCHAR clsid_keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 }; -static const WCHAR curver_keyname[] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static const WCHAR ips_keyname[] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static const WCHAR ips32_keyname[] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static const WCHAR progid_keyname[] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static const WCHAR viprogid_keyname[] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static const char tmodel_valuename[] = "ThreadingModel"; static const char author_valuename[] = "Author"; static const char friendlyname_valuename[] = "FriendlyName"; static const WCHAR vendor_valuename[] = {'V','e','n','d','o','r',0}; Modified: trunk/reactos/dll/win32/windowscodecs/tgaformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/tg…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -275,7 +275,7 @@ This->image_offset = This->colormap_offset + This->colormap_length; /* Read footer if there is one */ - seek.QuadPart = -sizeof(tga_footer); + seek.QuadPart = -(LONGLONG)sizeof(tga_footer); hr = IStream_Seek(pIStream, seek, STREAM_SEEK_END, NULL); if (SUCCEEDED(hr)) { Modified: trunk/reactos/dll/win32/windowscodecs/tiffformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ti…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] Mon May 11 12:49:42 2015 @@ -309,7 +309,19 @@ decode_info->invert_grayscale = 1; /* fall through */ case 1: /* BlackIsZero */ - if (samples != 1) + if (samples == 2) + { + ret = pTIFFGetField(tiff, TIFFTAG_EXTRASAMPLES, &extra_sample_count, &extra_samples); + if (!ret) + { + extra_sample_count = 1; + extra_sample = 0; + extra_samples = &extra_sample; + } + else + FIXME("ignoring extra alpha %u/%u bps %u\n", extra_sample_count, extra_samples[0], bps); + } + else if (samples != 1) { FIXME("unhandled grayscale sample count %u\n", samples); return E_FAIL; 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] Mon May 11 12:49:42 2015 @@ -202,7 +202,7 @@ reactos/dll/win32/version # Synced to WineStaging-1.7.37 reactos/dll/win32/wbemdisp # Synced to WineStaging-1.7.37 reactos/dll/win32/wbemprox # Synced to WineStaging-1.7.37 -reactos/dll/win32/windowscodecs # Synced to Wine-1.7.27 +reactos/dll/win32/windowscodecs # Synced to WineStaging-1.7.37 reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.27 reactos/dll/win32/winemp3.acm # Synced to Wine-1.7.27 reactos/dll/win32/wing32 # Out of sync
9 years, 7 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
50
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
Results per page:
10
25
50
100
200