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
October 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
517 discussions
Start a n
N
ew thread
[sginsberg] 37031: - Remove version defines
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Oct 27 15:32:17 2008 New Revision: 37031 URL:
http://svn.reactos.org/svn/reactos?rev=37031&view=rev
Log: - Remove version defines Modified: trunk/rostests/apitests/dciman32api/dciman32api.rbuild trunk/rostests/apitests/directory.rbuild trunk/rostests/apitests/gdi32api/gdi32api.rbuild trunk/rostests/apitests/user32api/user32api.rbuild trunk/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild trunk/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild trunk/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild trunk/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild trunk/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild trunk/rostests/apitests/w32knapi/w32knapi.rbuild trunk/rostests/apitests/ws2_32/ws2_32.rbuild trunk/rostests/tests/linetest/linetest.rbuild Modified: trunk/rostests/apitests/dciman32api/dciman32api.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/dciman32api/dcim…
============================================================================== --- trunk/rostests/apitests/dciman32api/dciman32api.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/dciman32api/dciman32api.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="dciman32api" type="win32cui"> <include base="dciman32api">.</include> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0501</define> <library>apitest</library> <library>kernel32</library> <library>user32</library> Modified: trunk/rostests/apitests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/directory.rbuild…
============================================================================== --- trunk/rostests/apitests/directory.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/directory.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -4,7 +4,6 @@ <module name="apitest" type="staticlibrary"> <include base="apitest">.</include> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0501</define> <file>apitest.c</file> </module> Modified: trunk/rostests/apitests/gdi32api/gdi32api.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/gdi32ap…
============================================================================== --- trunk/rostests/apitests/gdi32api/gdi32api.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32api/gdi32api.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="gdi32api" type="win32cui"> <include base="gdi32api">.</include> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0501</define> <library>apitest</library> <library>kernel32</library> <library>user32</library> Modified: trunk/rostests/apitests/user32api/user32api.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32api/user32…
============================================================================== --- trunk/rostests/apitests/user32api/user32api.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/user32api/user32api.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="user32api" type="win32cui"> <include base="user32api">.</include> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0501</define> <library>apitest</library> <library>kernel32</library> <library>user32</library> Modified: trunk/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32kdll/w32kdll_…
============================================================================== --- trunk/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="w32kdll_2k3sp2" type="win32dll" entrypoint="0" installname="w32kdll_2k3sp2.dll"> <importlibrary definition="w32kdll_2k3sp2.def" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> <file>w32kdll_2k3sp2.S</file> <file>main.c</file> </module> Modified: trunk/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32kdll/w32kdll_…
============================================================================== --- trunk/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="w32kdll_2ksp4" type="win32dll" entrypoint="0" installname="w32kdll_2ksp4.dll"> <importlibrary definition="w32kdll_2ksp4.def" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> <file>w32kdll_2ksp4.S</file> <file>main.c</file> </module> Modified: trunk/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32kdll/w32kdll_…
============================================================================== --- trunk/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="w32kdll" type="win32dll" entrypoint="0" installname="w32kdll.dll"> <importlibrary definition="w32kdll_ros.def" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> <library>win32ksys</library> <file>main.c</file> </module> Modified: trunk/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32kdll/w32kdll_…
============================================================================== --- trunk/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="w32kdll_vista" type="win32dll" entrypoint="0" installname="w32kdll_vista.dll"> <importlibrary definition="w32kdll_vista.def" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> <file>w32kdll_vista.S</file> <file>main.c</file> </module> Modified: trunk/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32kdll/w32kdll_…
============================================================================== --- trunk/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,7 +1,6 @@ <module name="w32kdll_xpsp2" type="win32dll" entrypoint="0" installname="w32kdll_xpsp2.dll"> <importlibrary definition="w32kdll_xpsp2.def" /> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0502</define> <file>w32kdll_xpsp2.S</file> <file>main.c</file> </module> Modified: trunk/rostests/apitests/w32knapi/w32knapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/w32knap…
============================================================================== --- trunk/rostests/apitests/w32knapi/w32knapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/w32knapi/w32knapi.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,8 +1,6 @@ <module name="w32knapi" type="win32cui"> <include base="w32knapi">.</include> <define name="__USE_W32API" /> - <define name="_WIN32_WINNT">0x0501</define> - <define name="WINVER">0x501</define> <library>apitest</library> <library>ntdll</library> <library>kernel32</library> Modified: trunk/rostests/apitests/ws2_32/ws2_32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ws2_32/ws2_32.rb…
============================================================================== --- trunk/rostests/apitests/ws2_32/ws2_32.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/ws2_32/ws2_32.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,5 +1,4 @@ <module name="ws2_32_apitests" type="win32cui" unicode="yes"> - <define name="_WIN32_WINNT">0x0501</define> <library>apitest</library> <library>kernel32</library> <library>user32</library> Modified: trunk/rostests/tests/linetest/linetest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/linetest/linetest.r…
============================================================================== --- trunk/rostests/tests/linetest/linetest.rbuild [iso-8859-1] (original) +++ trunk/rostests/tests/linetest/linetest.rbuild [iso-8859-1] Mon Oct 27 15:32:17 2008 @@ -1,5 +1,4 @@ <module name="linetest" type="win32gui" installbase="bin" installname="linetest.exe"> - <define name="WINVER">0x0501</define> <define name="__USE_W32API" /> <library>kernel32</library> <library>user32</library>
16 years, 1 month
1
0
0
0
[sginsberg] 37030: - Remove version defines
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Oct 27 15:25:29 2008 New Revision: 37030 URL:
http://svn.reactos.org/svn/reactos?rev=37030&view=rev
Log: - Remove version defines Modified: trunk/rosapps/applications/sysutils/gettype/gettype.rbuild trunk/rosapps/applications/sysutils/utils/rosperf/rosperf.rbuild Modified: trunk/rosapps/applications/sysutils/gettype/gettype.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/gett…
============================================================================== --- trunk/rosapps/applications/sysutils/gettype/gettype.rbuild [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/gettype/gettype.rbuild [iso-8859-1] Mon Oct 27 15:25:29 2008 @@ -1,6 +1,5 @@ <module name="gettype" type="win32cui" installbase="system32" installname="gettype.exe" unicode="yes"> <include base="gettype">.</include> - <define name="_WIN32_WINNT">0x0501</define> <library>kernel32</library> <library>shell32</library> <library>mpr</library> Modified: trunk/rosapps/applications/sysutils/utils/rosperf/rosperf.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
============================================================================== --- trunk/rosapps/applications/sysutils/utils/rosperf/rosperf.rbuild [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/utils/rosperf/rosperf.rbuild [iso-8859-1] Mon Oct 27 15:25:29 2008 @@ -1,7 +1,6 @@ <module name="rosperf" type="win32cui" installbase="system32" installname="rosperf.exe"> <include base="rosperf">.</include> <define name="UNICODE" /> - <define name="WINVER">0x0501</define> <library>version</library> <library>msimg32</library> <library>gdi32</library>
16 years, 1 month
1
0
0
0
[cgutman] 37029: - Add another validity check
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Oct 27 15:04:29 2008 New Revision: 37029 URL:
http://svn.reactos.org/svn/reactos?rev=37029&view=rev
Log: - Add another validity check Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Mon Oct 27 15:04:29 2008 @@ -286,8 +286,9 @@ AddrFile->Port = TCPAllocatePort(Address->Address[0].Address[0].sin_port); - if (Address->Address[0].Address[0].sin_port && - AddrFile->Port != Address->Address[0].Address[0].sin_port) + if ((Address->Address[0].Address[0].sin_port && + AddrFile->Port != Address->Address[0].Address[0].sin_port) || + AddrFile->Port == 0xffff) { ExFreePool(AddrFile); return STATUS_INVALID_PARAMETER; @@ -301,8 +302,9 @@ AddrFile->Port = UDPAllocatePort(Address->Address[0].Address[0].sin_port); - if (Address->Address[0].Address[0].sin_port && - AddrFile->Port != Address->Address[0].Address[0].sin_port) + if ((Address->Address[0].Address[0].sin_port && + AddrFile->Port != Address->Address[0].Address[0].sin_port) || + AddrFile->Port == 0xffff) { ExFreePool(AddrFile); return STATUS_INVALID_PARAMETER;
16 years, 1 month
1
0
0
0
[ekohl] 37028: SEH protect all calls to the UM-PNP-Manager.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Oct 27 14:26:37 2008 New Revision: 37028 URL:
http://svn.reactos.org/svn/reactos?rev=37028&view=rev
Log: SEH protect all calls to the UM-PNP-Manager. Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Mon Oct 27 14:26:37 2008 @@ -76,6 +76,13 @@ } +static CONFIGRET +RpcStatusToCmStatus(RPC_STATUS Status) +{ + return CR_FAILURE; +} + + /*********************************************************************** * CMP_WaitNoPendingInstallEvents [SETUPAPI.@] */ @@ -102,6 +109,7 @@ DWORD dwMagic) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%lu\n", dwMagic); @@ -111,7 +119,17 @@ if (!PnpGetLocalHandles(&BindingHandle, NULL)) return CR_FAILURE; - return PNP_InitDetection(BindingHandle); + _SEH_TRY + { + ret = PNP_InitDetection(BindingHandle); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -139,9 +157,18 @@ for (i = 0; i < 30; i++) { - ret = PNP_ReportLogOn(BindingHandle, - bAdmin, - dwProcessId); + _SEH_TRY + { + ret = PNP_ReportLogOn(BindingHandle, + bAdmin, + dwProcessId); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) break; @@ -217,7 +244,17 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority, &ulLogConfTag, ulFlags); + _SEH_TRY + { + ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority, + &ulLogConfTag, ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) { pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO)); @@ -295,6 +332,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; TRACE("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine); @@ -330,10 +368,20 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_AddID(BindingHandle, - lpDevInst, - pszID, - ulFlags); + _SEH_TRY + { + ret = PNP_AddID(BindingHandle, + lpDevInst, + pszID, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -530,11 +578,20 @@ if (lpParentDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_CreateDevInst(BindingHandle, - pDeviceID, - lpParentDevInst, - MAX_DEVICE_ID_LEN, - ulFlags); + _SEH_TRY + { + ret = PNP_CreateDevInst(BindingHandle, + pDeviceID, + lpParentDevInst, + MAX_DEVICE_ID_LEN, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) { *pdnDevInst = StringTableAddString(StringTable, pDeviceID, 1); @@ -565,6 +622,7 @@ { WCHAR szGuidString[MAX_GUID_STRING_LEN]; RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%p %lx %lx\n", ClassGuid, ulFlags, hMachine); @@ -589,10 +647,21 @@ return CR_FAILURE; } - return PNP_DeleteClassKey(BindingHandle, - szGuidString, - ulFlags); -} + _SEH_TRY + { + ret = PNP_DeleteClassKey(BindingHandle, + szGuidString, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; +} + /*********************************************************************** * CM_Delete_DevNode_Key [SETUPAPI.@] @@ -605,6 +674,7 @@ NULL); } + /*********************************************************************** * CM_Delete_DevNode_Key_Ex [SETUPAPI.@] */ @@ -639,6 +709,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine); @@ -671,11 +742,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_DeviceInstanceAction(BindingHandle, - 5, - ulFlags, - lpDevInst, - NULL); + _SEH_TRY + { + ret = PNP_DeviceInstanceAction(BindingHandle, + 5, + ulFlags, + lpDevInst, + NULL); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -727,6 +808,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine); @@ -759,11 +841,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_DeviceInstanceAction(BindingHandle, - 4, - ulFlags, - lpDevInst, - NULL); + _SEH_TRY + { + ret = PNP_DeviceInstanceAction(BindingHandle, + 4, + ulFlags, + lpDevInst, + NULL); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -809,13 +901,22 @@ return CR_FAILURE; } - ret = PNP_EnumerateSubKeys(BindingHandle, - PNP_CLASS_SUBKEYS, - ulClassIndex, - szBuffer, - MAX_GUID_STRING_LEN, - &ulLength, - ulFlags); + _SEH_TRY + { + ret = PNP_EnumerateSubKeys(BindingHandle, + PNP_CLASS_SUBKEYS, + ulClassIndex, + szBuffer, + MAX_GUID_STRING_LEN, + &ulLength, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) { /* Remove the {} */ @@ -908,6 +1009,7 @@ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags, hMachine); @@ -932,13 +1034,23 @@ return CR_FAILURE; } - return PNP_EnumerateSubKeys(BindingHandle, - PNP_ENUMERATOR_SUBKEYS, - ulEnumIndex, - Buffer, - *pulLength, - pulLength, - ulFlags); + _SEH_TRY + { + ret = PNP_EnumerateSubKeys(BindingHandle, + PNP_ENUMERATOR_SUBKEYS, + ulEnumIndex, + Buffer, + *pulLength, + pulLength, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -963,6 +1075,7 @@ HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; PLOG_CONF_INFO pLogConfInfo; + CONFIGRET ret; TRACE("%lx %lx %lx\n", lcLogConfToBeFreed, ulFlags, hMachine); @@ -996,8 +1109,18 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags, - pLogConfInfo->ulTag, 0); + _SEH_TRY + { + ret = PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags, + pLogConfInfo->ulTag, 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -1078,12 +1201,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_GetRelatedDeviceInstance(BindingHandle, - PNP_GET_CHILD_DEVICE_INSTANCE, - lpDevInst, - szRelatedDevInst, - &dwLength, - 0); + _SEH_TRY + { + ret = PNP_GetRelatedDeviceInstance(BindingHandle, + PNP_GET_CHILD_DEVICE_INSTANCE, + lpDevInst, + szRelatedDevInst, + &dwLength, + 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return ret; @@ -1276,6 +1408,7 @@ { WCHAR szGuidString[MAX_GUID_STRING_LEN]; RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%p %p %p %lx %lx\n", ClassGuid, Buffer, pulLength, ulFlags, hMachine); @@ -1303,11 +1436,21 @@ return CR_FAILURE; } - return PNP_GetClassName(BindingHandle, - szGuidString, - Buffer, - pulLength, - ulFlags); + _SEH_TRY + { + ret = PNP_GetClassName(BindingHandle, + szGuidString, + Buffer, + pulLength, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -1331,6 +1474,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; TRACE("%p %lx %lx %lx\n", pulDepth, dnDevInst, ulFlags, hMachine); @@ -1364,10 +1508,20 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_GetDepth(BindingHandle, - lpDevInst, - pulDepth, - ulFlags); + _SEH_TRY + { + ret = PNP_GetDepth(BindingHandle, + lpDevInst, + pulDepth, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -1532,14 +1686,24 @@ return CR_INVALID_DEVNODE; ulTransferLength = *pulLength; - ret = PNP_GetDeviceRegProp(BindingHandle, - lpDevInst, - ulProperty, - &ulDataType, - Buffer, - &ulTransferLength, - pulLength, - ulFlags); + + _SEH_TRY + { + ret = PNP_GetDeviceRegProp(BindingHandle, + lpDevInst, + ulProperty, + &ulDataType, + Buffer, + &ulTransferLength, + pulLength, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) { if (pulRegDataType != NULL) @@ -1575,6 +1739,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; TRACE("%p %p %lx %lx %lx\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine); @@ -1608,11 +1773,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_GetDeviceStatus(BindingHandle, - lpDevInst, - pulStatus, - pulProblemNumber, - ulFlags); + _SEH_TRY + { + ret = PNP_GetDeviceStatus(BindingHandle, + lpDevInst, + pulStatus, + pulProblemNumber, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -1883,6 +2058,7 @@ PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; FIXME("%p %s %ld %lx\n", pulLen, debugstr_w(pszFilter), ulFlags, hMachine); @@ -1906,10 +2082,20 @@ *pulLen = 0; - return PNP_GetDeviceListSize(BindingHandle, - (LPWSTR)pszFilter, - pulLen, - ulFlags); + _SEH_TRY + { + ret = PNP_GetDeviceListSize(BindingHandle, + (LPWSTR)pszFilter, + pulLen, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2024,11 +2210,20 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_GetFirstLogConf(BindingHandle, - lpDevInst, - ulFlags, - &ulTag, - ulFlags); + _SEH_TRY + { + ret = PNP_GetFirstLogConf(BindingHandle, + lpDevInst, + ulFlags, + &ulTag, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return ret; @@ -2065,6 +2260,7 @@ PULONG pulState, ULONG ulFlags, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%p %lx %lx\n", pulState, ulFlags, hMachine); @@ -2086,7 +2282,17 @@ return CR_FAILURE; } - return PNP_GetGlobalState(BindingHandle, pulState, ulFlags); + _SEH_TRY + { + ret = PNP_GetGlobalState(BindingHandle, pulState, ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2157,6 +2363,7 @@ ULONG ulFlags, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; FIXME("%s %lu %p %lx %lx\n", debugstr_w(szDevInstName), ulHardwareProfile, pulValue, ulFlags, hMachine); @@ -2181,8 +2388,18 @@ return CR_FAILURE; } - return PNP_HwProfFlags(BindingHandle, PNP_GET_HWPROFFLAGS, szDevInstName, - ulHardwareProfile, pulValue, NULL, NULL, 0, 0); + _SEH_TRY + { + ret = PNP_HwProfFlags(BindingHandle, PNP_GET_HWPROFFLAGS, szDevInstName, + ulHardwareProfile, pulValue, NULL, NULL, 0, 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2208,6 +2425,7 @@ HSTRING_TABLE StringTable = NULL; PLOG_CONF_INFO pLogConfInfo; LPWSTR lpDevInst; + CONFIGRET ret; FIXME("%p %p %lx %lx\n", lcLogConf, pPriority, ulFlags, hMachine); @@ -2241,12 +2459,22 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_GetLogConfPriority(BindingHandle, - lpDevInst, - pLogConfInfo->ulFlags, - pLogConfInfo->ulTag, - pPriority, - 0); + _SEH_TRY + { + ret = PNP_GetLogConfPriority(BindingHandle, + lpDevInst, + pLogConfInfo->ulFlags, + pLogConfInfo->ulTag, + pPriority, + 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2308,12 +2536,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_GetNextLogConf(BindingHandle, - lpDevInst, - pLogConfInfo->ulFlags, - pLogConfInfo->ulTag, - &ulNewTag, - 0); + _SEH_TRY + { + ret = PNP_GetNextLogConf(BindingHandle, + lpDevInst, + pLogConfInfo->ulFlags, + pLogConfInfo->ulTag, + &ulNewTag, + 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return ret; @@ -2392,12 +2629,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_GetRelatedDeviceInstance(BindingHandle, - PNP_GET_PARENT_DEVICE_INSTANCE, - lpDevInst, - szRelatedDevInst, - &dwLength, - 0); + _SEH_TRY + { + ret = PNP_GetRelatedDeviceInstance(BindingHandle, + PNP_GET_PARENT_DEVICE_INSTANCE, + lpDevInst, + szRelatedDevInst, + &dwLength, + 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return ret; @@ -2470,12 +2716,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ret = PNP_GetRelatedDeviceInstance(BindingHandle, - PNP_GET_SIBLING_DEVICE_INSTANCE, - lpDevInst, - szRelatedDevInst, - &dwLength, - 0); + _SEH_TRY + { + ret = PNP_GetRelatedDeviceInstance(BindingHandle, + PNP_GET_SIBLING_DEVICE_INSTANCE, + lpDevInst, + szRelatedDevInst, + &dwLength, + 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return ret; @@ -2508,6 +2763,7 @@ { RPC_BINDING_HANDLE BindingHandle = NULL; WORD Version = 0; + CONFIGRET ret; TRACE("%lx\n", hMachine); @@ -2523,7 +2779,17 @@ return CR_FAILURE; } - if (PNP_GetVersion(BindingHandle, &Version) != CR_SUCCESS) + _SEH_TRY + { + ret = PNP_GetVersion(BindingHandle, &Version); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + if (ret != CR_SUCCESS) return 0; return Version; @@ -2548,6 +2814,7 @@ PBOOL pbPresent, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%p %lx\n", pbPresent, hMachine); @@ -2568,8 +2835,18 @@ return CR_FAILURE; } - return PNP_IsDockStationPresent(BindingHandle, - pbPresent); + _SEH_TRY + { + ret = PNP_IsDockStationPresent(BindingHandle, + pbPresent); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2662,19 +2939,37 @@ } else { - /* Get the root device ID */ - ret = PNP_GetRootDeviceInstance(BindingHandle, - DeviceIdBuffer, - MAX_DEVICE_ID_LEN); + _SEH_TRY + { + /* Get the root device ID */ + ret = PNP_GetRootDeviceInstance(BindingHandle, + DeviceIdBuffer, + MAX_DEVICE_ID_LEN); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret != CR_SUCCESS) return CR_FAILURE; } TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer)); - /* Validate the device ID */ - ret = PNP_ValidateDeviceInstance(BindingHandle, - DeviceIdBuffer, - ulFlags); + _SEH_TRY + { + /* Validate the device ID */ + ret = PNP_ValidateDeviceInstance(BindingHandle, + DeviceIdBuffer, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + if (ret == CR_SUCCESS) { *pdnDevInst = StringTableAddString(StringTable, DeviceIdBuffer, 1); @@ -2708,6 +3003,7 @@ HSTRING_TABLE StringTable = NULL; LPWSTR lpFromDevInst; LPWSTR lpToDevInst; + CONFIGRET ret; FIXME("%lx %lx %lx %lx\n", dnFromDevInst, dnToDevInst, ulFlags, hMachine); @@ -2745,11 +3041,21 @@ if (lpToDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_DeviceInstanceAction(BindingHandle, - 2, - ulFlags, - lpFromDevInst, - lpToDevInst); + _SEH_TRY + { + ret = PNP_DeviceInstanceAction(BindingHandle, + 2, + ulFlags, + lpFromDevInst, + lpToDevInst); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -2962,6 +3268,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); @@ -2991,11 +3298,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_DeviceInstanceAction(BindingHandle, - 7, - ulFlags, - lpDevInst, - NULL); + _SEH_TRY + { + ret = PNP_DeviceInstanceAction(BindingHandle, + 7, + ulFlags, + lpDevInst, + NULL); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3016,6 +3333,7 @@ HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%lx\n", hMachine); @@ -3031,7 +3349,17 @@ return CR_FAILURE; } - return PNP_RequestEjectPC(BindingHandle); + _SEH_TRY + { + ret = PNP_RequestEjectPC(BindingHandle); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3053,6 +3381,7 @@ ULONG ulFlags, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; TRACE("%lx %lx\n", ulFlags, hMachine); @@ -3074,8 +3403,18 @@ return CR_FAILURE; } - return PNP_RunDetection(BindingHandle, - ulFlags); + _SEH_TRY + { + ret = PNP_RunDetection(BindingHandle, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3099,6 +3438,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; TRACE("%lx %lx %lx %lx\n", dnDevInst, ulProblem, ulFlags, hMachine); @@ -3128,10 +3468,20 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_SetDeviceProblem(BindingHandle, - lpDevInst, - ulProblem, - ulFlags); + _SEH_TRY + { + ret = PNP_SetDeviceProblem(BindingHandle, + lpDevInst, + ulProblem, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3309,6 +3659,7 @@ HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; ULONG ulType; + CONFIGRET ret; TRACE("%lx %lu %p %lx %lx %lx\n", dnDevInst, ulProperty, Buffer, ulLength, ulFlags, hMachine); @@ -3403,13 +3754,23 @@ return CR_INVALID_PROPERTY; } - return PNP_SetDeviceRegProp(BindingHandle, - lpDevInst, - ulProperty, - ulType, - (BYTE *)Buffer, - ulLength, - ulFlags); + _SEH_TRY + { + ret = PNP_SetDeviceRegProp(BindingHandle, + lpDevInst, + ulProperty, + ulType, + (BYTE *)Buffer, + ulLength, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3478,6 +3839,7 @@ ULONG ulFlags, HMACHINE hMachine) { RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret; FIXME("%s %lu %lu %lx %lx\n", debugstr_w(szDevInstName), ulConfig, ulValue, ulFlags, hMachine); @@ -3502,8 +3864,18 @@ return CR_FAILURE; } - return PNP_HwProfFlags(BindingHandle, PNP_SET_HWPROFFLAGS, szDevInstName, - ulConfig, &ulValue, NULL, NULL, 0, 0); + _SEH_TRY + { + ret = PNP_HwProfFlags(BindingHandle, PNP_SET_HWPROFFLAGS, szDevInstName, + ulConfig, &ulValue, NULL, NULL, 0, 0); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3527,6 +3899,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); @@ -3559,11 +3932,21 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_DeviceInstanceAction(BindingHandle, - 3, - ulFlags, - lpDevInst, - NULL); + _SEH_TRY + { + ret = PNP_DeviceInstanceAction(BindingHandle, + 3, + ulFlags, + lpDevInst, + NULL); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; } @@ -3587,6 +3970,7 @@ RPC_BINDING_HANDLE BindingHandle = NULL; HSTRING_TABLE StringTable = NULL; LPWSTR lpDevInst; + CONFIGRET ret; TRACE("%lx %lx %lx\n", dnPhantom, ulFlags, hMachine); @@ -3616,7 +4000,17 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - return PNP_UninstallDevInst(BindingHandle, - lpDevInst, - ulFlags); -} + _SEH_TRY + { + ret = PNP_UninstallDevInst(BindingHandle, + lpDevInst, + ulFlags); + } + _SEH_HANDLE + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + _SEH_END; + + return ret; +}
16 years, 1 month
1
0
0
0
[janderwald] 37027: - Implement AddMonitorA, AddMonitorW
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Oct 27 13:04:45 2008 New Revision: 37027 URL:
http://svn.reactos.org/svn/reactos?rev=37027&view=rev
Log: - Implement AddMonitorA, AddMonitorW Modified: trunk/reactos/dll/win32/winspool/info.c trunk/reactos/dll/win32/winspool/stubs.c trunk/reactos/dll/win32/winspool/winspool.rbuild Modified: trunk/reactos/dll/win32/winspool/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/info.c?…
============================================================================== --- trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] Mon Oct 27 13:04:45 2008 @@ -37,6 +37,7 @@ #include "winerror.h" #include "wingdi.h" #include "winreg.h" +#include "shlwapi.h" #include "winspool.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -411,3 +412,161 @@ return TRUE; } + +/* + * @unimplemented + */ +BOOL +STDCALL +AddMonitorA(LPSTR Name, DWORD Level, PBYTE Monitors) +{ + LPWSTR szName = NULL; + MONITOR_INFO_2W Monitor; + MONITOR_INFO_2A *pMonitor; + BOOL bRet = FALSE; + + if (Level != 2 || !Monitors) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + pMonitor = (MONITOR_INFO_2A*)Monitors; + if (pMonitor->pDLLName == NULL || pMonitor->pName == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + ZeroMemory(&Monitor, sizeof(Monitor)); + + if (Name) + { + szName = HeapAlloc(GetProcessHeap(), 0, (strlen(Name) + 1) * sizeof(WCHAR)); + if (!szName) + { + return FALSE; + } + MultiByteToWideChar(CP_ACP, 0, Name, -1, szName, strlen(Name)+1); + szName[strlen(Name)] = L'\0'; + } + + Monitor.pDLLName = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pDLLName)+1) * sizeof(WCHAR)); + if (!Monitor.pDLLName) + { + goto cleanup; + } + MultiByteToWideChar(CP_ACP, 0, pMonitor->pDLLName, -1, Monitor.pDLLName, strlen(pMonitor->pDLLName)+1); + pMonitor->pDLLName[strlen(pMonitor->pDLLName)] = L'\0'; + + Monitor.pName = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pName)+1) * sizeof(WCHAR)); + if (!Monitor.pName) + { + goto cleanup; + } + MultiByteToWideChar(CP_ACP, 0, pMonitor->pName, -1, Monitor.pName, strlen(pMonitor->pName)+1); + pMonitor->pName[strlen(pMonitor->pName)] = L'\0'; + + + if (pMonitor->pEnvironment) + { + Monitor.pEnvironment = HeapAlloc(GetProcessHeap(), 0, (strlen(pMonitor->pEnvironment)+1) * sizeof(WCHAR)); + if (!Monitor.pEnvironment) + { + goto cleanup; + } + MultiByteToWideChar(CP_ACP, 0, pMonitor->pEnvironment, -1, Monitor.pEnvironment, strlen(pMonitor->pEnvironment)+1); + pMonitor->pEnvironment[strlen(pMonitor->pEnvironment)] = L'\0'; + } + + bRet = AddMonitorW(szName, Level, (LPBYTE)&Monitor); + +cleanup: + + if (szName) + HeapFree(GetProcessHeap(), 0, szName); + + if (Monitor.pDLLName) + HeapFree(GetProcessHeap(), 0, Monitor.pDLLName); + + if (Monitor.pEnvironment) + HeapFree(GetProcessHeap(), 0, Monitor.pEnvironment); + + if (Monitor.pName) + HeapFree(GetProcessHeap(), 0, Monitor.pName); + + return bRet; +} + + +/* + * @unimplemented + */ +BOOL +STDCALL +AddMonitorW(LPWSTR Name, DWORD Level, PBYTE Monitors) +{ + WCHAR szPath[MAX_PATH]; + HMODULE hLibrary = NULL; + FARPROC InitProc; + HKEY hKey, hSubKey; + MONITOR_INFO_2W * pMonitor; + + + if (Level != 2 || !Monitors) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + pMonitor = (MONITOR_INFO_2W*)Monitors; + + if (pMonitor->pDLLName == NULL || pMonitor->pName == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (wcschr(pMonitor->pDLLName, L'\\')) + { + hLibrary = LoadLibraryExW(pMonitor->pDLLName, NULL, 0); + } + else if (GetSystemDirectoryW(szPath, MAX_PATH) && PathAddBackslashW(szPath)) + { + wcscat(szPath, pMonitor->pDLLName); + hLibrary = LoadLibraryExW(szPath, NULL, 0); + } + + if (!hLibrary) + { + return FALSE; + } + + InitProc = GetProcAddress(hLibrary, "InitializePrintMonitor"); + if (!InitProc) + { + InitProc = GetProcAddress(hLibrary, "InitializePrintMonitor2"); + if (!InitProc) + { + FreeLibrary(hLibrary); + SetLastError(ERROR_PROC_NOT_FOUND); + return FALSE; + } + } + + // FIXME + // Initialize monitor + FreeLibrary(hLibrary); + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors", 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) + { + if (RegCreateKeyExW(hKey, pMonitor->pName, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueExW(hSubKey, L"Driver", 0, REG_SZ, (LPBYTE)pMonitor->pDLLName, (wcslen(pMonitor->pDLLName)+1)*sizeof(WCHAR)); + RegCloseKey(hSubKey); + } + RegCloseKey(hKey); + } + return TRUE; +} + Modified: trunk/reactos/dll/win32/winspool/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/stubs.c…
============================================================================== --- trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] Mon Oct 27 13:04:45 2008 @@ -94,32 +94,6 @@ } -/* - * @unimplemented - */ -BOOL -STDCALL -AddMonitorA(LPSTR Name, DWORD Level, PBYTE Monitors) -{ - OutputDebugStringW(L"winspool AddMonitorA stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} - - -/* - * @unimplemented - */ -BOOL -STDCALL -AddMonitorW(LPWSTR Name, DWORD Level, PBYTE Monitors) -{ - OutputDebugStringW(L"winspool AddMonitorW stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} /* Modified: trunk/reactos/dll/win32/winspool/winspool.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/winspoo…
============================================================================== --- trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] Mon Oct 27 13:04:45 2008 @@ -5,6 +5,7 @@ <library>ntdll</library> <library>kernel32</library> <library>advapi32</library> + <library>shlwapi</library> <file>info.c</file> <file>stubs.c</file> <file>winspool.rc</file>
16 years, 2 months
1
0
0
0
[jimtabor] 37026: - Cleanup and fix OffsetViewport/WindowOrgEx.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Oct 27 12:56:35 2008 New Revision: 37026 URL:
http://svn.reactos.org/svn/reactos?rev=37026&view=rev
Log: - Cleanup and fix OffsetViewport/WindowOrgEx. Modified: trunk/reactos/dll/win32/gdi32/misc/hacks.c trunk/reactos/dll/win32/gdi32/objects/coord.c trunk/reactos/subsystems/win32/win32k/objects/coord.c Modified: trunk/reactos/dll/win32/gdi32/misc/hacks.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/hacks…
============================================================================== --- trunk/reactos/dll/win32/gdi32/misc/hacks.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/misc/hacks.c [iso-8859-1] Mon Oct 27 12:56:35 2008 @@ -10,33 +10,6 @@ * */ -/* - * @implemented - * - */ -BOOL -STDCALL -OffsetViewportOrgEx(HDC hdc, - int nXOffset, - int nYOffset, - LPPOINT lpPoint) -{ - return NtGdiOffsetViewportOrgEx(hdc, nXOffset, nYOffset, lpPoint); -} - -/* - * @implemented - * - */ -BOOL -STDCALL -OffsetWindowOrgEx(HDC hdc, - int nXOffset, - int nYOffset, - LPPOINT lpPoint) -{ - return NtGdiOffsetWindowOrgEx(hdc, nXOffset, nYOffset, lpPoint); -} Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/co…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/coord.c [iso-8859-1] Mon Oct 27 12:56:35 2008 @@ -701,4 +701,125 @@ return NtGdiSetLayout( hdc, wox, dwLayout); } - +/* + * @implemented + * + */ +BOOL +STDCALL +OffsetViewportOrgEx(HDC hdc, + int nXOffset, + int nYOffset, + LPPOINT lpPoint) +{ +#if 0 + PDC_ATTR Dc_Attr; +#if 0 + if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC) + return MFDRV_OffsetViewportOrgEx(hdc, nXOffset, nYOffset, lpPoint); + else + { + PLDC pLDC = GdiGetLDC(hdc); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (pLDC->iType == LDC_EMFLDC) + { + return EMFDRV_OffsetWindowOrgEx(hdc, nXOffset, nYOffset, lpPoint); + } + } + } +#endif + if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; + + if ( lpPoint ) + { + *lpPoint = (POINT)Dc_Attr->ptlViewportOrg; + if ( Dc_Attr->dwLayout & LAYOUT_RTL) lpPoint->x = -lpPoint->x; + } + + if ( nXOffset || nYOffset != nXOffset ) + { + if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc) + { + if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY) + { + NtGdiFlush(); + Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY; + } + } + Dc_Attr->flXform |= (PAGE_XLATE_CHANGED|DEVICE_TO_WORLD_INVALID); + if ( Dc_Attr->dwLayout & LAYOUT_RTL) nXOffset = -nXOffset; + Dc_Attr->ptlViewportOrg.x += nXOffset; + Dc_Attr->ptlViewportOrg.y += nYOffset; + } + return TRUE; +#endif + return NtGdiOffsetViewportOrgEx(hdc, nXOffset, nYOffset, lpPoint); +} + +/* + * @implemented + * + */ +BOOL +STDCALL +OffsetWindowOrgEx(HDC hdc, + int nXOffset, + int nYOffset, + LPPOINT lpPoint) +{ +#if 0 + PDC_ATTR Dc_Attr; +#if 0 + if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC) + return MFDRV_OffsetWindowOrgEx(hdc, nXOffset, nYOffset, lpPoint); + else + { + PLDC pLDC = GdiGetLDC(hdc); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (pLDC->iType == LDC_EMFLDC) + { + return EMFDRV_OffsetWindowOrgEx(hdc, nXOffset, nYOffset, lpPoint); + } + } + } +#endif + if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; + + if ( lpPoint ) + { + *lpPoint = (POINT)Dc_Attr->ptlWindowOrg; + lpPoint->x = Dc_Attr->lWindowOrgx; + } + + if ( nXOffset || nYOffset != nXOffset ) + { + if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc) + { + if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY) + { + NtGdiFlush(); + Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY; + } + } + Dc_Attr->flXform |= (PAGE_XLATE_CHANGED|DEVICE_TO_WORLD_INVALID); + Dc_Attr->ptlWindowOrg.x += nXOffset; + Dc_Attr->ptlWindowOrg.y += nYOffset; + Dc_Attr->lWindowOrgx += nXOffset; + } + return TRUE; +#endif + return NtGdiOffsetWindowOrgEx(hdc, nXOffset, nYOffset, lpPoint); +} + Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Mon Oct 27 12:56:35 2008 @@ -404,6 +404,7 @@ 1); UnsafePoint->x = Dc_Attr->ptlViewportOrg.x; UnsafePoint->y = Dc_Attr->ptlViewportOrg.y; + if ( Dc_Attr->dwLayout & LAYOUT_RTL ) UnsafePoint->x = -UnsafePoint->x; } _SEH_HANDLE { @@ -419,6 +420,7 @@ } } + if ( Dc_Attr->dwLayout & LAYOUT_RTL ) XOffset = -XOffset; Dc_Attr->ptlViewportOrg.x += XOffset; Dc_Attr->ptlViewportOrg.y += YOffset; DC_UpdateXforms(dc);
16 years, 2 months
1
0
0
0
[janderwald] 37025: * Implement DeletePrintProvidorA, DeletePrintProvidorW
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Oct 27 11:47:23 2008 New Revision: 37025 URL:
http://svn.reactos.org/svn/reactos?rev=37025&view=rev
Log: * Implement DeletePrintProvidorA, DeletePrintProvidorW Modified: trunk/reactos/dll/win32/winspool/info.c trunk/reactos/dll/win32/winspool/stubs.c Modified: trunk/reactos/dll/win32/winspool/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/info.c?…
============================================================================== --- trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] Mon Oct 27 11:47:23 2008 @@ -285,3 +285,129 @@ return bRet; } +/****************************************************************************** + * DeletePrintProvidorA (WINSPOOL.@) + */ +BOOL +STDCALL +DeletePrintProvidorA(LPSTR Name, LPSTR Environment, LPSTR PrintProvidor) +{ + BOOL bRet; + LPWSTR Env, Prov; + + if (Name || !Environment || !PrintProvidor) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + Env = HeapAlloc(GetProcessHeap(), 0, (strlen(Environment)+1) * sizeof(WCHAR)); + if (!Env) + { + return FALSE; + } + + MultiByteToWideChar(CP_ACP, 0, Environment, -1, Env, strlen(Environment)+1); + Env[strlen(Environment)] = L'\0'; + + Prov = HeapAlloc(GetProcessHeap(), 0, (strlen(PrintProvidor)+1) * sizeof(WCHAR)); + if (!Prov) + { + HeapFree(GetProcessHeap(), 0, Env); + return FALSE; + } + + MultiByteToWideChar(CP_ACP, 0, PrintProvidor, -1, Prov, strlen(PrintProvidor)+1); + Prov[strlen(PrintProvidor)] = L'\0'; + + bRet = DeletePrintProvidorW(NULL, Env, Prov); + HeapFree(GetProcessHeap(), 0, Env); + HeapFree(GetProcessHeap(), 0, Prov); + + return bRet; +} + +/* + * @unimplemented + */ +BOOL +STDCALL +DeletePrintProvidorW(LPWSTR Name, LPWSTR Environment, LPWSTR PrintProvidor) +{ + HKEY hKey; + BOOL bFound; + DWORD dwType, dwSize, dwOffset, dwLength; + LPWSTR pOrder, pBuffer, pNew; + + if (Name || !Environment || !PrintProvidor) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Providers", 0, KEY_READ | KEY_WRITE, &hKey) != ERROR_SUCCESS) + { + return FALSE; + } + + if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, NULL, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ) + { + RegCloseKey(hKey); + return FALSE; + } + + pOrder = HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!pOrder) + { + RegCloseKey(hKey); + return FALSE; + } + + if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, (LPBYTE)pOrder, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ) + { + RegCloseKey(hKey); + return FALSE; + } + + + pBuffer = pOrder; + bFound = FALSE; + while(pBuffer[0]) + { + if (!wcsicmp(pBuffer, PrintProvidor)) + { + bFound = TRUE; + break; + } + pBuffer += wcslen(pBuffer) + 1; + } + + if (!bFound) + { + RegCloseKey(hKey); + HeapFree(GetProcessHeap(), 0, pOrder); + return FALSE; + } + + pNew = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize); + if (!pNew) + { + RegCloseKey(hKey); + HeapFree(GetProcessHeap(), 0, pOrder); + return FALSE; + } + + dwOffset = pBuffer - pOrder; + dwLength = (dwSize / sizeof(WCHAR)) - (dwOffset + wcslen(pBuffer) + 1); + CopyMemory(pNew, pOrder, dwOffset * sizeof(WCHAR)); + CopyMemory(&pNew[dwOffset], pBuffer + wcslen(pBuffer) + 1, dwLength); + + RegSetValueExW(hKey, L"Order", 0, REG_MULTI_SZ, (LPBYTE)pNew, (dwOffset + dwLength) * sizeof(WCHAR)); + RegDeleteKey(hKey, PrintProvidor); + + HeapFree(GetProcessHeap(), 0, pOrder); + HeapFree(GetProcessHeap(), 0, pNew); + RegCloseKey(hKey); + + return TRUE; +} Modified: trunk/reactos/dll/win32/winspool/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/stubs.c…
============================================================================== --- trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] Mon Oct 27 11:47:23 2008 @@ -554,35 +554,6 @@ return FALSE; } - -/* - * @unimplemented - */ -BOOL -STDCALL -DeletePrintProvidorA(LPSTR Name, LPSTR Environment, LPSTR PrintProvidor) -{ - OutputDebugStringW(L"winspool DeletePrintProvidorA stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} - - -/* - * @unimplemented - */ -BOOL -STDCALL -DeletePrintProvidorW(LPWSTR Name, LPWSTR Environment, LPWSTR PrintProvidor) -{ - OutputDebugStringW(L"winspool DeletePrintProvidorW stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} - - /* * @unimplemented */
16 years, 2 months
1
0
0
0
[janderwald] 37024: - Implement AddPrintProvidorA, AddPrintProvidorW
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Oct 27 10:40:21 2008 New Revision: 37024 URL:
http://svn.reactos.org/svn/reactos?rev=37024&view=rev
Log: - Implement AddPrintProvidorA, AddPrintProvidorW Modified: trunk/reactos/dll/win32/winspool/info.c trunk/reactos/dll/win32/winspool/stubs.c trunk/reactos/dll/win32/winspool/winspool.rbuild Modified: trunk/reactos/dll/win32/winspool/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/info.c?…
============================================================================== --- trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/info.c [iso-8859-1] Mon Oct 27 10:40:21 2008 @@ -36,6 +36,7 @@ #include "winbase.h" #include "winerror.h" #include "wingdi.h" +#include "winreg.h" #include "winspool.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -104,3 +105,183 @@ HeapFree (GetProcessHeap (), 0, buf); return ret; } + +/****************************************************************************** + * AddPrintProvidorA (WINSPOOL.@) + */ +BOOL +STDCALL +AddPrintProvidorA(LPSTR Name, DWORD Level, PBYTE Buffer) +{ + if (Name || Level > 2 || Buffer == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (Level == 1) + { + BOOL bRet; + PROVIDOR_INFO_1W Provider; + PROVIDOR_INFO_1A *Prov = (PROVIDOR_INFO_1A*)Buffer; + + if (Prov->pName == NULL || Prov->pDLLName == NULL || Prov->pEnvironment == NULL) + { + return FALSE; + } + + Provider.pDLLName = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pDLLName)+1) * sizeof(WCHAR)); + if (Provider.pDLLName) + { + MultiByteToWideChar(CP_ACP, 0, Prov->pDLLName, -1, Provider.pDLLName, strlen(Prov->pDLLName)+1); + Provider.pDLLName[strlen(Prov->pDLLName)] = L'\0'; + } + + Provider.pEnvironment = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pEnvironment)+1) * sizeof(WCHAR)); + if (Provider.pEnvironment) + { + MultiByteToWideChar(CP_ACP, 0, Prov->pEnvironment, -1, Provider.pEnvironment, strlen(Prov->pEnvironment)+1); + Provider.pEnvironment[strlen(Prov->pEnvironment)] = L'\0'; + } + + Provider.pName = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pName)+1) * sizeof(WCHAR)); + if (Provider.pName) + { + MultiByteToWideChar(CP_ACP, 0, Prov->pName, -1, Provider.pName, strlen(Prov->pName)+1); + Provider.pName[strlen(Prov->pName)] = L'\0'; + } + + bRet = AddPrintProvidorW(NULL, Level, (LPBYTE)&Provider); + + if (Provider.pDLLName) + HeapFree(GetProcessHeap(), 0, Provider.pDLLName); + + if (Provider.pEnvironment) + HeapFree(GetProcessHeap(), 0, Provider.pEnvironment); + + if (Provider.pName) + HeapFree(GetProcessHeap(), 0, Provider.pName); + + return bRet; + } + else + { + PROVIDOR_INFO_2W Provider; + PROVIDOR_INFO_2A *Prov = (PROVIDOR_INFO_2A*)Buffer; + + Provider.pOrder = HeapAlloc(GetProcessHeap(), 0, (strlen(Prov->pOrder)+1) * sizeof(WCHAR)); + if (Provider.pOrder) + { + BOOL bRet; + MultiByteToWideChar(CP_ACP, 0, Prov->pOrder, -1, Provider.pOrder, strlen(Prov->pOrder)+1); + Provider.pOrder[strlen(Prov->pOrder)] = L'\0'; + + bRet = AddPrintProvidorW(NULL, Level, (LPBYTE)&Provider); + HeapFree(GetProcessHeap(), 0, Provider.pOrder); + return bRet; + } + } + + return FALSE; +} + + +/****************************************************************************** + * AddPrintProvidorW (WINSPOOL.@) + */ +BOOL +STDCALL +AddPrintProvidorW(LPWSTR Name, DWORD Level, PBYTE Buffer) +{ + HKEY hKey; + LPWSTR pOrder; + DWORD dwSize, dwType; + BOOL bRet = FALSE; + + if (Name || Level > 2 || Buffer == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Print\\Providers", 0, KEY_READ | KEY_WRITE, &hKey) != ERROR_SUCCESS) + { + return FALSE; + } + + if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, NULL, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ) + { + RegCloseKey(hKey); + return FALSE; + } + + pOrder = HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!pOrder) + { + RegCloseKey(hKey); + return FALSE; + } + + if (RegQueryValueExW(hKey, L"Order", NULL, &dwType, (LPBYTE)pOrder, &dwSize) != ERROR_SUCCESS || dwType != REG_MULTI_SZ) + { + RegCloseKey(hKey); + return FALSE; + } + + if (Level == 1) + { + LPWSTR pBuffer; + BOOL bFound = FALSE; + PROVIDOR_INFO_1W * Prov = (PROVIDOR_INFO_1W*)Buffer; + + if (Prov->pName == NULL || Prov->pDLLName == NULL || Prov->pEnvironment == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + RegCloseKey(hKey); + return FALSE; + } + + pBuffer = pOrder; + + while(pBuffer[0]) + { + if (!wcsicmp(pBuffer, Prov->pName)) + { + bFound = TRUE; + break; + } + pBuffer += wcslen(pBuffer) + 1; + } + + if (!bFound) + { + HKEY hSubKey; + DWORD dwFullSize = dwSize + (wcslen(Prov->pName)+1) * sizeof(WCHAR); + + if (RegCreateKeyExW(hKey, Prov->pName, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + RegSetValueExW(hSubKey, L"Name", 0, REG_SZ, (LPBYTE)Prov->pDLLName, (wcslen(Prov->pDLLName)+1) * sizeof(WCHAR)); + RegCloseKey(hSubKey); + } + + pBuffer = HeapAlloc(GetProcessHeap(), 0, dwFullSize); + if (pBuffer) + { + CopyMemory(pBuffer, pOrder, dwSize); + wcscpy(&pBuffer[(dwSize/sizeof(WCHAR))-1], Prov->pName); + pBuffer[(dwSize/sizeof(WCHAR)) + wcslen(Prov->pName)] = L'\0'; + RegSetValueExW(hKey, L"Order", 0, REG_MULTI_SZ, (LPBYTE)pBuffer, dwFullSize); + HeapFree(GetProcessHeap(), 0, pBuffer); + } + bRet = TRUE; + } + + } + + RegCloseKey(hKey); + HeapFree(GetProcessHeap(), 0, pOrder); + + return bRet; +} + Modified: trunk/reactos/dll/win32/winspool/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/stubs.c…
============================================================================== --- trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] Mon Oct 27 10:40:21 2008 @@ -261,35 +261,6 @@ return FALSE; } - -/* - * @unimplemented - */ -BOOL -STDCALL -AddPrintProvidorA(LPSTR Name, DWORD Level, PBYTE Buffer) -{ - OutputDebugStringW(L"winspool AddPrintProvidorA stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} - - -/* - * @unimplemented - */ -BOOL -STDCALL -AddPrintProvidorW(LPWSTR Name, DWORD Level, PBYTE Buffer) -{ - OutputDebugStringW(L"winspool AddPrintProvidorW stub called\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; -} - - /* * @unimplemented */ Modified: trunk/reactos/dll/win32/winspool/winspool.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/winspoo…
============================================================================== --- trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] Mon Oct 27 10:40:21 2008 @@ -4,6 +4,7 @@ <define name="_DISABLE_TIDENTS" /> <library>ntdll</library> <library>kernel32</library> + <library>advapi32</library> <file>info.c</file> <file>stubs.c</file> <file>winspool.rc</file>
16 years, 2 months
1
0
0
0
[janderwald] 37023: - Add PROVIDER_INFO_1 and PROVIDER_INFO_2 struct
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Oct 27 10:16:05 2008 New Revision: 37023 URL:
http://svn.reactos.org/svn/reactos?rev=37023&view=rev
Log: - Add PROVIDER_INFO_1 and PROVIDER_INFO_2 struct Modified: trunk/reactos/include/psdk/winspool.h Modified: trunk/reactos/include/psdk/winspool.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winspool.h?re…
============================================================================== --- trunk/reactos/include/psdk/winspool.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winspool.h [iso-8859-1] Mon Oct 27 10:16:05 2008 @@ -700,6 +700,24 @@ ACCESS_MASK DesiredAccess; } PRINTER_DEFAULTSW,*PPRINTER_DEFAULTSW,*LPPRINTER_DEFAULTSW; +typedef struct _PROVIDOR_INFO_1A{ + LPSTR pName; + LPSTR pEnvironment; + LPSTR pDLLName; +} PROVIDOR_INFO_1A, *PPROVIDOR_INFO_1A, *LPPROVIDOR_INFO_1A; +typedef struct _PROVIDOR_INFO_1W{ + LPWSTR pName; + LPWSTR pEnvironment; + LPWSTR pDLLName; +} PROVIDOR_INFO_1W, *LPPROVIDOR_INFO_1W; + +typedef struct _PROVIDOR_INFO_2A{ + LPSTR pOrder; +} PROVIDOR_INFO_2A, *PPROVIDOR_INFO_2A, *LPPROVIDOR_INFO_2A; +typedef struct _PROVIDOR_INFO_2W{ + LPWSTR pOrder; +} PROVIDOR_INFO_2W, *LPPROVIDOR_INFO_2W; + BOOL WINAPI AbortPrinter(HANDLE); BOOL WINAPI AddFormA(HANDLE,DWORD,PBYTE); BOOL WINAPI AddFormW(HANDLE,DWORD,PBYTE); @@ -833,6 +851,10 @@ typedef PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1,*PPRINTPROCESSOR_INFO_1,*LPPRINTPROCESSOR_INFO_1; typedef FORM_INFO_1W FORM_INFO_1,*PFORM_INFO_1,*LPFORM_INFO_1; typedef PRINTER_DEFAULTSW PRINTER_DEFAULTS,*PPRINTER_DEFAULTS,*LPPRINTER_DEFAULTS; +typedef PROVIDOR_INFO_1W PROVIDOR_INFO_1; +typedef LPPROVIDOR_INFO_1W LPPROVIDOR_INFO_1; +typedef PROVIDOR_INFO_2W PROVIDOR_INFO_2; +typedef LPPROVIDOR_INFO_2W LPPROVIDOR_INFO_2; #define AddForm AddFormW #define AddJob AddJobW #define AddMonitor AddMonitorW
16 years, 2 months
1
0
0
0
[sginsberg] 37022: - Remove broken KGDT_64_R3_TEB
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Oct 27 09:09:17 2008 New Revision: 37022 URL:
http://svn.reactos.org/svn/reactos?rev=37022&view=rev
Log: - Remove broken KGDT_64_R3_TEB Modified: branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h Modified: branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] Mon Oct 27 09:09:17 2008 @@ -64,8 +64,6 @@ #define KGDT_64_R3_CODE 0x0030 // 33 #define KGDT_TSS 0x0040 #define KGDT_32_R3_TEB 0x0050 // 53 -#define KGDT_64_R3_TEB 0x0000 // FIXME - // // CR4
16 years, 2 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
52
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
Results per page:
10
25
50
100
200