winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
893 discussions
Start a n
N
ew thread
Detlef Riekenberg : winspool: Support xcv in AddPortW.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 5012fa06fcdd8e4d2af078f2a3c6a7ceeb06b7fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5012fa06fcdd8e4d2af078f2a…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jan 15 05:37:24 2007 +0100 winspool: Support xcv in AddPortW. --- dlls/winspool.drv/info.c | 48 ++++++++++++++++++++++++++++++--------------- 1 files changed, 32 insertions(+), 16 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 934565c..053cbbe 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -6001,7 +6001,8 @@ BOOL WINAPI AddPortA(LPSTR pName, HWND h BOOL WINAPI AddPortW(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName) { monitor_t * pm; - DWORD res = ROUTER_UNKNOWN; + monitor_t * pui; + DWORD res; TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pMonitorName)); @@ -6016,28 +6017,43 @@ BOOL WINAPI AddPortW(LPWSTR pName, HWND } /* an empty Monitorname is Invalid */ - if (!pMonitorName[0]) goto cleanup; + if (!pMonitorName[0]) { + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; + } pm = monitor_load(pMonitorName, NULL); - if (pm && pm->monitor) { - if (pm->monitor->pfnAddPort != NULL) { - res = pm->monitor->pfnAddPort(pName, hWnd, pMonitorName); - TRACE("got %d with %d\n", res, GetLastError()); + if (pm && pm->monitor && pm->monitor->pfnAddPort) { + res = pm->monitor->pfnAddPort(pName, hWnd, pMonitorName); + TRACE("got %d with %u\n", res, GetLastError()); + res = TRUE; + } + else + { + pui = monitor_loadui(pm); + if (pui && pui->monitorUI && pui->monitorUI->pfnAddPortUI) { + TRACE("use %p: %s\n", pui, debugstr_w(pui->dllname)); + res = pui->monitorUI->pfnAddPortUI(pName, hWnd, pMonitorName, NULL); + TRACE("got %d with %u\n", res, GetLastError()); + res = TRUE; } - else if (pm->monitor->pfnXcvOpenPort != NULL) + else { - FIXME("XcvOpenPort not implemented (dwMonitorSize: %d)\n", pm->dwMonitorSize); + FIXME("not implemented for %s (%p: %s => %p: %s)\n", debugstr_w(pMonitorName), + pm, pm ? debugstr_w(pm->dllname) : NULL, pui, pui ? debugstr_w(pui->dllname) : NULL); + + /* XP: ERROR_NOT_SUPPORTED, NT351,9x: ERROR_INVALID_PARAMETER */ + SetLastError(ERROR_NOT_SUPPORTED); + res = FALSE; } - /* invalidate cached PORT_INFO_2W */ - if (res == ROUTER_SUCCESS) monitor_flush(pm); + monitor_unload(pui); } - monitor_unload(pm); + /* invalidate cached PORT_INFO_2W */ + monitor_flush(pm); -cleanup: - /* XP: ERROR_NOT_SUPPORTED, NT351,9x: ERROR_INVALID_PARAMETER */ - if (res == ROUTER_UNKNOWN) SetLastError(ERROR_NOT_SUPPORTED); - TRACE("returning %d with %d\n", (res == ROUTER_SUCCESS), GetLastError()); - return (res == ROUTER_SUCCESS); + monitor_unload(pm); + TRACE("returning %d with %u\n", res, GetLastError()); + return res; } /******************************************************************************
1
0
0
0
Detlef Riekenberg : winspool: Support xcv in DeletePortW.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 917b0eed550c75b0436db988437d50142e4c25b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=917b0eed550c75b0436db9884…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jan 15 05:37:20 2007 +0100 winspool: Support xcv in DeletePortW. --- dlls/winspool.drv/info.c | 47 ++++++++++++++++++++++++++++++--------------- 1 files changed, 31 insertions(+), 16 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 40a7dd5..934565c 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -2380,7 +2380,8 @@ BOOL WINAPI DeletePortA (LPSTR pName, HW BOOL WINAPI DeletePortW (LPWSTR pName, HWND hWnd, LPWSTR pPortName) { monitor_t * pm; - DWORD res = ROUTER_UNKNOWN; + monitor_t * pui; + DWORD res; TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName)); @@ -2395,29 +2396,43 @@ BOOL WINAPI DeletePortW (LPWSTR pName, H } /* an empty Portname is Invalid */ - if (!pPortName[0]) goto cleanup; + if (!pPortName[0]) { + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; + } pm = monitor_load_by_port(pPortName); - if (pm && pm->monitor) { - if (pm->monitor->pfnDeletePort != NULL) { - TRACE("Using %s for %s:\n", debugstr_w(pm->name), debugstr_w(pPortName)); - res = pm->monitor->pfnDeletePort(pName, hWnd, pPortName); - TRACE("got %d with %d\n", res, GetLastError()); + if (pm && pm->monitor && pm->monitor->pfnDeletePort) { + TRACE("Using %s for %s (%p: %s)\n", debugstr_w(pm->name), debugstr_w(pPortName), pm, debugstr_w(pm->dllname)); + res = pm->monitor->pfnDeletePort(pName, hWnd, pPortName); + TRACE("got %d with %u\n", res, GetLastError()); + } + else + { + pui = monitor_loadui(pm); + if (pui && pui->monitorUI && pui->monitorUI->pfnDeletePortUI) { + TRACE("use %s for %s (%p: %s)\n", debugstr_w(pui->name), debugstr_w(pPortName), pui, debugstr_w(pui->dllname)); + res = pui->monitorUI->pfnDeletePortUI(pName, hWnd, pPortName); + TRACE("got %d with %u\n", res, GetLastError()); } - else if (pm->monitor->pfnXcvOpenPort) + else { - FIXME("XcvOpenPort not implemented (dwMonitorSize: %d)\n", pm->dwMonitorSize); + FIXME("not implemented for %s (%p: %s => %p: %s)\n", debugstr_w(pPortName), + pm, pm ? debugstr_w(pm->dllname) : NULL, pui, pui ? debugstr_w(pui->dllname) : NULL); + + /* XP: ERROR_NOT_SUPPORTED, NT351,9x: ERROR_INVALID_PARAMETER */ + SetLastError(ERROR_NOT_SUPPORTED); + res = FALSE; } - /* invalidate cached PORT_INFO_2W */ - if (res == ROUTER_SUCCESS) monitor_flush(pm); + monitor_unload(pui); } + /* always invalidate cached PORT_INFO_2W */ + monitor_flush(pm); + monitor_unload(pm); -cleanup: - /* XP: ERROR_NOT_SUPPORTED, NT351,9x: ERROR_INVALID_PARAMETER */ - if (res == ROUTER_UNKNOWN) SetLastError(ERROR_NOT_SUPPORTED); - TRACE("returning %d with %d\n", (res == ROUTER_SUCCESS), GetLastError()); - return (res == ROUTER_SUCCESS); + TRACE("returning %d with %u\n", res, GetLastError()); + return res; } /******************************************************************************
1
0
0
0
Detlef Riekenberg : winspool/tests: Use a more generic name for a variable.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: f9402b87ca9c77ca1e5dedcd261f54db7e57c50a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9402b87ca9c77ca1e5dedcd2…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jan 15 05:37:14 2007 +0100 winspool/tests: Use a more generic name for a variable. --- dlls/winspool.drv/tests/info.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index c7478b7..d1c3282 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -44,7 +44,7 @@ static CHAR portname_file[] = "FILE: static CHAR portname_lpt1[] = "LPT1:"; static CHAR server_does_not_exist[] = "\\does_not_exist"; static CHAR version_dll[] = "version.dll"; -static CHAR winetest_monitor[] = "winetest"; +static CHAR winetest[] = "winetest"; static HANDLE hwinspool; static FARPROC pGetDefaultPrinterA; @@ -156,11 +156,11 @@ static struct monitor_entry * find_insta num_tests = (sizeof(monitor_table)/sizeof(struct monitor_entry)); /* cleanup */ - DeleteMonitorA(NULL, env_x86, winetest_monitor); - DeleteMonitorA(NULL, env_win9x_case, winetest_monitor); + DeleteMonitorA(NULL, env_x86, winetest); + DeleteMonitorA(NULL, env_win9x_case, winetest); - /* find a usable monitor from the table */ - mi2a.pName = winetest_monitor; + /* find a usable monitor from the table */ + mi2a.pName = winetest; while ((entry == NULL) && (i < num_tests)) { entry = &monitor_table[i]; i++; @@ -170,7 +170,7 @@ static struct monitor_entry * find_insta if (AddMonitorA(NULL, 2, (LPBYTE) &mi2a)) { /* we got one */ trace("using '%s', '%s'\n", entry->env, entry->dllname); - DeleteMonitorA(NULL, entry->env, winetest_monitor); + DeleteMonitorA(NULL, entry->env, winetest); } else { @@ -286,7 +286,7 @@ static void test_AddMonitor(void) "ERROR_PRIVILEGE_NOT_HELD)\n", res, GetLastError()); - mi2a.pName = winetest_monitor; + mi2a.pName = winetest; SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_PRIVILEGE_NOT_HELD */ @@ -323,7 +323,7 @@ static void test_AddMonitor(void) (GetLastError() == ERROR_INVALID_PARAMETER)), "returned %d with %d (expected '0' with: ERROR_PROC_NOT_FOUND or " "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - if (res) DeleteMonitorA(NULL, entry->env, winetest_monitor); + if (res) DeleteMonitorA(NULL, entry->env, winetest); /* Test AddMonitor with real options */ mi2a.pDLLName = entry->dllname; @@ -342,13 +342,13 @@ static void test_AddMonitor(void) "ERROR_PRINT_MONITOR_ALREADY_INSTALLED or ERROR_ALREADY_EXISTS)\n", res, GetLastError()); - DeleteMonitorA(NULL, entry->env, winetest_monitor); + DeleteMonitorA(NULL, entry->env, winetest); SetLastError(MAGIC_DEAD); res = AddMonitorA(empty, 2, (LPBYTE) &mi2a); ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); /* cleanup */ - DeleteMonitorA(NULL, entry->env, winetest_monitor); + DeleteMonitorA(NULL, entry->env, winetest); } @@ -472,7 +472,7 @@ static void test_DeleteMonitor(void) return; } - mi2a.pName = winetest_monitor; + mi2a.pName = winetest; mi2a.pEnvironment = entry->env; mi2a.pDLLName = entry->dllname; @@ -480,12 +480,12 @@ static void test_DeleteMonitor(void) AddMonitorA(NULL, 2, (LPBYTE) &mi2a); SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(NULL, entry->env, winetest_monitor); + res = DeleteMonitorA(NULL, entry->env, winetest); ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); /* Delete the Monitor twice */ SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(NULL, entry->env, winetest_monitor); + res = DeleteMonitorA(NULL, entry->env, winetest); /* NT: ERROR_UNKNOWN_PRINT_MONITOR (3000), 9x: ERROR_INVALID_PARAMETER (87) */ ok( !res && ((GetLastError() == ERROR_UNKNOWN_PRINT_MONITOR) || @@ -496,17 +496,17 @@ static void test_DeleteMonitor(void) /* the environment */ AddMonitorA(NULL, 2, (LPBYTE) &mi2a); SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(NULL, NULL, winetest_monitor); + res = DeleteMonitorA(NULL, NULL, winetest); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); AddMonitorA(NULL, 2, (LPBYTE) &mi2a); SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(NULL, empty, winetest_monitor); + res = DeleteMonitorA(NULL, empty, winetest); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); AddMonitorA(NULL, 2, (LPBYTE) &mi2a); SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(NULL, invalid_env, winetest_monitor); + res = DeleteMonitorA(NULL, invalid_env, winetest); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); /* the monitor-name */ @@ -532,11 +532,11 @@ static void test_DeleteMonitor(void) AddMonitorA(NULL, 2, (LPBYTE) &mi2a); SetLastError(MAGIC_DEAD); - res = DeleteMonitorA(empty, entry->env, winetest_monitor); + res = DeleteMonitorA(empty, entry->env, winetest); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); /* cleanup */ - DeleteMonitorA(NULL, entry->env, winetest_monitor); + DeleteMonitorA(NULL, entry->env, winetest); } /* ########################### */
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: Recalc the toolbar after a TB_SETIMAGELIST.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: e6b1bd5f303f13c6d4af7cfeb79b6ed1d35c0ebe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6b1bd5f303f13c6d4af7cfeb…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Sat Jan 13 23:51:24 2007 +0100 comctl32: toolbar: Recalc the toolbar after a TB_SETIMAGELIST. --- dlls/comctl32/toolbar.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index bda17e9..85ada79 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -4910,6 +4910,7 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM infoPtr->nBitmapHeight = 1; } infoPtr->nVBitmapHeight = infoPtr->nBitmapHeight; + TOOLBAR_CalcToolbar(hwnd); TRACE("hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d\n", hwnd, infoPtr->himlDef, id, infoPtr->nNumBitmaps,
1
0
0
0
Mikołaj Zalewski : comctl32: listview: When shrinking the last column clear the now unused field.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 749d975a41bdbccf8a96d45ae305f4cc15c7d402 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=749d975a41bdbccf8a96d45ae…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Sat Jan 13 23:50:23 2007 +0100 comctl32: listview: When shrinking the last column clear the now unused field. --- dlls/comctl32/listview.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a2deee3..bc0db87 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8611,10 +8611,16 @@ static LRESULT LISTVIEW_HeaderNotificati /* resizing left-aligned columns leaves most of the left side untouched */ if ((lpColumnInfo->fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_LEFT) { - INT nMaxDirty = infoPtr->nEllipsisWidth + infoPtr->ntmMaxCharWidth + dx; + INT nMaxDirty = infoPtr->nEllipsisWidth + infoPtr->ntmMaxCharWidth; + if (dx > 0) + nMaxDirty += dx; rcCol.left = max (rcCol.left, rcCol.right - nMaxDirty); } - + + /* when shrinking the last column clear the now unused field */ + if (lpnmh->iItem == DPA_GetPtrCount(infoPtr->hdpaColumns) - 1 && dx < 0) + rcCol.right -= dx; + LISTVIEW_InvalidateRect(infoPtr, &rcCol); } }
1
0
0
0
Mikołaj Zalewski : comctl32: listview: A CDRF_SKIPDEFAULT for an item should skip the whole row.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 495455c0f8f002ada05cbe0e8701a5b4f24ea2f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=495455c0f8f002ada05cbe0e8…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Sat Jan 13 23:49:23 2007 +0100 comctl32: listview: A CDRF_SKIPDEFAULT for an item should skip the whole row. --- dlls/comctl32/listview.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 11e02ee..a2deee3 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3749,6 +3749,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_I hOldFont = GetCurrentObject(hdc, OBJ_FONT); if (nSubItem > 0) cdmode = infoPtr->cditemmode; + if (cdmode & CDRF_SKIPDEFAULT) goto postpaint; if (cdmode & CDRF_NOTIFYITEMDRAW) cdsubitemmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); if (nSubItem == 0) infoPtr->cditemmode = cdsubitemmode;
1
0
0
0
Alexandre Julliard : ntdll: Implemented NtLockVirtualMemory and NtUnlockVirtualMemory.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: c122260b9d2f60f78fac610775d3bd767e38680b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c122260b9d2f60f78fac61077…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 16 09:50:08 2007 +0100 ntdll: Implemented NtLockVirtualMemory and NtUnlockVirtualMemory. --- dlls/ntdll/virtual.c | 56 ++++++++++++++++++++++++++++++++++----- include/wine/server_protocol.h | 32 +++++++++++++++++++++- server/protocol.def | 30 ++++++++++++++++++++- server/thread.c | 2 + server/trace.c | 18 +++++++++++++ 5 files changed, 127 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index fe92383..ce8b500 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1802,12 +1802,32 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HA */ NTSTATUS WINAPI NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, ULONG unknown ) { - if (!is_current_process( process )) + NTSTATUS status = STATUS_SUCCESS; + + if (process != NtCurrentProcess()) { - ERR("Unsupported on other process\n"); - return STATUS_ACCESS_DENIED; + apc_call_t call; + apc_result_t result; + + call.virtual_lock.type = APC_VIRTUAL_LOCK; + call.virtual_lock.addr = *addr; + call.virtual_lock.size = *size; + status = NTDLL_queue_process_apc( process, &call, &result ); + if (status != STATUS_SUCCESS) return status; + + if (result.virtual_lock.status == STATUS_SUCCESS) + { + *addr = result.virtual_lock.addr; + *size = result.virtual_lock.size; + } + return result.virtual_lock.status; } - return STATUS_SUCCESS; + + *size = ROUND_SIZE( *addr, *size ); + *addr = ROUND_ADDR( *addr, page_mask ); + + if (mlock( *addr, *size )) status = STATUS_ACCESS_DENIED; + return status; } @@ -1817,12 +1837,32 @@ NTSTATUS WINAPI NtLockVirtualMemory( HAN */ NTSTATUS WINAPI NtUnlockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, ULONG unknown ) { - if (!is_current_process( process )) + NTSTATUS status = STATUS_SUCCESS; + + if (process != NtCurrentProcess()) { - ERR("Unsupported on other process\n"); - return STATUS_ACCESS_DENIED; + apc_call_t call; + apc_result_t result; + + call.virtual_unlock.type = APC_VIRTUAL_UNLOCK; + call.virtual_unlock.addr = *addr; + call.virtual_unlock.size = *size; + status = NTDLL_queue_process_apc( process, &call, &result ); + if (status != STATUS_SUCCESS) return status; + + if (result.virtual_unlock.status == STATUS_SUCCESS) + { + *addr = result.virtual_unlock.addr; + *size = result.virtual_unlock.size; + } + return result.virtual_unlock.status; } - return STATUS_SUCCESS; + + *size = ROUND_SIZE( *addr, *size ); + *addr = ROUND_ADDR( *addr, page_mask ); + + if (munlock( *addr, *size )) status = STATUS_ACCESS_DENIED; + return status; } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 0f4d3f2..ca98f28 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -219,7 +219,9 @@ enum apc_type APC_VIRTUAL_FREE, APC_VIRTUAL_QUERY, APC_VIRTUAL_PROTECT, - APC_VIRTUAL_FLUSH + APC_VIRTUAL_FLUSH, + APC_VIRTUAL_LOCK, + APC_VIRTUAL_UNLOCK }; typedef union @@ -280,6 +282,18 @@ typedef union const void *addr; unsigned long size; } virtual_flush; + struct + { + enum apc_type type; + void *addr; + unsigned long size; + } virtual_lock; + struct + { + enum apc_type type; + void *addr; + unsigned long size; + } virtual_unlock; } apc_call_t; typedef union @@ -326,6 +340,20 @@ typedef union const void *addr; unsigned long size; } virtual_flush; + struct + { + enum apc_type type; + unsigned int status; + void *addr; + unsigned long size; + } virtual_lock; + struct + { + enum apc_type type; + unsigned int status; + void *addr; + unsigned long size; + } virtual_unlock; } apc_result_t; @@ -4547,6 +4575,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 269 +#define SERVER_PROTOCOL_VERSION 270 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 9987fd4..343fbbb 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -235,7 +235,9 @@ enum apc_type APC_VIRTUAL_FREE, APC_VIRTUAL_QUERY, APC_VIRTUAL_PROTECT, - APC_VIRTUAL_FLUSH + APC_VIRTUAL_FLUSH, + APC_VIRTUAL_LOCK, + APC_VIRTUAL_UNLOCK }; typedef union @@ -296,6 +298,18 @@ typedef union const void *addr; /* requested address */ unsigned long size; /* requested address */ } virtual_flush; + struct + { + enum apc_type type; /* APC_VIRTUAL_LOCK */ + void *addr; /* requested address */ + unsigned long size; /* requested address */ + } virtual_lock; + struct + { + enum apc_type type; /* APC_VIRTUAL_UNLOCK */ + void *addr; /* requested address */ + unsigned long size; /* requested address */ + } virtual_unlock; } apc_call_t; typedef union @@ -342,6 +356,20 @@ typedef union const void *addr; /* resulting address */ unsigned long size; /* resulting size */ } virtual_flush; + struct + { + enum apc_type type; /* APC_VIRTUAL_LOCK */ + unsigned int status; /* status returned by call */ + void *addr; /* resulting address */ + unsigned long size; /* resulting size */ + } virtual_lock; + struct + { + enum apc_type type; /* APC_VIRTUAL_UNLOCK */ + unsigned int status; /* status returned by call */ + void *addr; /* resulting address */ + unsigned long size; /* resulting size */ + } virtual_unlock; } apc_result_t; /****************************************************************/ diff --git a/server/thread.c b/server/thread.c index 6c53e5c..5b0268a 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1159,6 +1159,8 @@ DECL_HANDLER(queue_apc) case APC_VIRTUAL_QUERY: case APC_VIRTUAL_PROTECT: case APC_VIRTUAL_FLUSH: + case APC_VIRTUAL_LOCK: + case APC_VIRTUAL_UNLOCK: access = (apc->call.type == APC_VIRTUAL_QUERY) ? PROCESS_QUERY_INFORMATION : PROCESS_VM_OPERATION; if ((process = get_process_from_handle( req->process, access ))) { diff --git a/server/trace.c b/server/trace.c index 7422912..6766faf 100644 --- a/server/trace.c +++ b/server/trace.c @@ -142,6 +142,14 @@ static void dump_apc_call( const apc_cal fprintf( stderr, "APC_VIRTUAL_FLUSH,addr=%p,size=%lu", call->virtual_flush.addr, call->virtual_flush.size ); break; + case APC_VIRTUAL_LOCK: + fprintf( stderr, "APC_VIRTUAL_LOCK,addr=%p,size=%lu", + call->virtual_lock.addr, call->virtual_lock.size ); + break; + case APC_VIRTUAL_UNLOCK: + fprintf( stderr, "APC_VIRTUAL_UNLOCK,addr=%p,size=%lu", + call->virtual_unlock.addr, call->virtual_unlock.size ); + break; default: fprintf( stderr, "type=%u", call->type ); break; @@ -185,6 +193,16 @@ static void dump_apc_result( const apc_r get_status_name( result->virtual_flush.status ), result->virtual_flush.addr, result->virtual_flush.size ); break; + case APC_VIRTUAL_LOCK: + fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s,addr=%p,size=%lu", + get_status_name( result->virtual_lock.status ), + result->virtual_lock.addr, result->virtual_lock.size ); + break; + case APC_VIRTUAL_UNLOCK: + fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s,addr=%p,size=%lu", + get_status_name( result->virtual_unlock.status ), + result->virtual_unlock.addr, result->virtual_unlock.size ); + break; default: fprintf( stderr, "type=%u", result->type ); break;
1
0
0
0
Alexandre Julliard : ntdll: Implementation of inter-process NtFlushVirtualMemory.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 5a1ad74a67bc48f4420a0e5e2f1199dbd72cb94f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5a1ad74a67bc48f4420a0e5e2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 15 22:31:07 2007 +0100 ntdll: Implementation of inter-process NtFlushVirtualMemory. --- dlls/ntdll/sync.c | 8 ++++++++ dlls/ntdll/virtual.c | 20 +++++++++++++++++--- include/wine/server_protocol.h | 18 ++++++++++++++++-- server/protocol.def | 16 +++++++++++++++- server/thread.c | 1 + server/trace.c | 9 +++++++++ 6 files changed, 66 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 8cfd1e5..eff643e 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -756,6 +756,14 @@ static BOOL call_apcs( BOOL alertable ) call.virtual_protect.prot, &result.virtual_protect.prot ); break; + case APC_VIRTUAL_FLUSH: + result.type = call.type; + result.virtual_flush.addr = call.virtual_flush.addr; + result.virtual_flush.size = call.virtual_flush.size; + result.virtual_flush.status = NtFlushVirtualMemory( NtCurrentProcess(), + &result.virtual_flush.addr, + &result.virtual_flush.size, 0 ); + break; default: server_protocol_error( "get_apc_request: bad type %d\n", call.type ); break; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 57cbb20..fe92383 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2095,11 +2095,25 @@ NTSTATUS WINAPI NtFlushVirtualMemory( HA sigset_t sigset; void *addr = ROUND_ADDR( *addr_ptr, page_mask ); - if (!is_current_process( process )) + if (process != NtCurrentProcess()) { - ERR("Unsupported on other process\n"); - return STATUS_ACCESS_DENIED; + apc_call_t call; + apc_result_t result; + + call.virtual_flush.type = APC_VIRTUAL_FLUSH; + call.virtual_flush.addr = addr; + call.virtual_flush.size = *size_ptr; + status = NTDLL_queue_process_apc( process, &call, &result ); + if (status != STATUS_SUCCESS) return status; + + if (result.virtual_flush.status == STATUS_SUCCESS) + { + *addr_ptr = result.virtual_flush.addr; + *size_ptr = result.virtual_flush.size; + } + return result.virtual_flush.status; } + server_enter_uninterrupted_section( &csVirtual, &sigset ); if (!(view = VIRTUAL_FindView( addr ))) status = STATUS_INVALID_PARAMETER; else diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 890dabd..0f4d3f2 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -218,7 +218,8 @@ enum apc_type APC_VIRTUAL_ALLOC, APC_VIRTUAL_FREE, APC_VIRTUAL_QUERY, - APC_VIRTUAL_PROTECT + APC_VIRTUAL_PROTECT, + APC_VIRTUAL_FLUSH }; typedef union @@ -273,6 +274,12 @@ typedef union unsigned long size; unsigned int prot; } virtual_protect; + struct + { + enum apc_type type; + const void *addr; + unsigned long size; + } virtual_flush; } apc_call_t; typedef union @@ -312,6 +319,13 @@ typedef union unsigned long size; unsigned int prot; } virtual_protect; + struct + { + enum apc_type type; + unsigned int status; + const void *addr; + unsigned long size; + } virtual_flush; } apc_result_t; @@ -4533,6 +4547,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 268 +#define SERVER_PROTOCOL_VERSION 269 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 8c40e10..9987fd4 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -234,7 +234,8 @@ enum apc_type APC_VIRTUAL_ALLOC, APC_VIRTUAL_FREE, APC_VIRTUAL_QUERY, - APC_VIRTUAL_PROTECT + APC_VIRTUAL_PROTECT, + APC_VIRTUAL_FLUSH }; typedef union @@ -289,6 +290,12 @@ typedef union unsigned long size; /* requested address */ unsigned int prot; /* new protection flags */ } virtual_protect; + struct + { + enum apc_type type; /* APC_VIRTUAL_FLUSH */ + const void *addr; /* requested address */ + unsigned long size; /* requested address */ + } virtual_flush; } apc_call_t; typedef union @@ -328,6 +335,13 @@ typedef union unsigned long size; /* resulting size */ unsigned int prot; /* old protection flags */ } virtual_protect; + struct + { + enum apc_type type; /* APC_VIRTUAL_FLUSH */ + unsigned int status; /* status returned by call */ + const void *addr; /* resulting address */ + unsigned long size; /* resulting size */ + } virtual_flush; } apc_result_t; /****************************************************************/ diff --git a/server/thread.c b/server/thread.c index 35484a4..6c53e5c 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1158,6 +1158,7 @@ DECL_HANDLER(queue_apc) case APC_VIRTUAL_FREE: case APC_VIRTUAL_QUERY: case APC_VIRTUAL_PROTECT: + case APC_VIRTUAL_FLUSH: access = (apc->call.type == APC_VIRTUAL_QUERY) ? PROCESS_QUERY_INFORMATION : PROCESS_VM_OPERATION; if ((process = get_process_from_handle( req->process, access ))) { diff --git a/server/trace.c b/server/trace.c index b878c02..7422912 100644 --- a/server/trace.c +++ b/server/trace.c @@ -138,6 +138,10 @@ static void dump_apc_call( const apc_cal call->virtual_protect.addr, call->virtual_protect.size, call->virtual_protect.prot ); break; + case APC_VIRTUAL_FLUSH: + fprintf( stderr, "APC_VIRTUAL_FLUSH,addr=%p,size=%lu", + call->virtual_flush.addr, call->virtual_flush.size ); + break; default: fprintf( stderr, "type=%u", call->type ); break; @@ -176,6 +180,11 @@ static void dump_apc_result( const apc_r result->virtual_protect.addr, result->virtual_protect.size, result->virtual_protect.prot ); break; + case APC_VIRTUAL_FLUSH: + fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s,addr=%p,size=%lu", + get_status_name( result->virtual_flush.status ), + result->virtual_flush.addr, result->virtual_flush.size ); + break; default: fprintf( stderr, "type=%u", result->type ); break;
1
0
0
0
Alexandre Julliard : ntdll: Implementation of inter-process VirtualProtectEx.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 1ea968016f1eaa9fada60a328e6f310fa0d5d7e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ea968016f1eaa9fada60a328…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 15 22:30:04 2007 +0100 ntdll: Implementation of inter-process VirtualProtectEx. --- dlls/kernel32/tests/virtual.c | 16 ++++++---------- dlls/ntdll/sync.c | 10 ++++++++++ dlls/ntdll/virtual.c | 21 ++++++++++++++++++--- include/wine/server_protocol.h | 20 ++++++++++++++++++-- server/protocol.def | 18 +++++++++++++++++- server/thread.c | 1 + server/trace.c | 11 +++++++++++ 7 files changed, 81 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 3c64a06..d19818c 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -118,7 +118,7 @@ static void test_VirtualAllocEx(void) SetLastError(0xdeadbeef); ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtectEx should fail on a not committed memory\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || + ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); @@ -141,21 +141,17 @@ static void test_VirtualAllocEx(void) SetLastError(0xdeadbeef); ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), "VirtualProtectEx should fail on a not committed memory\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || + ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); old_prot = 0; - todo_wine ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READONLY, - &old_prot), "VirtualProtectEx failed\n"); - todo_wine ok(old_prot == PAGE_NOACCESS, - "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); + ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtectEx failed\n"); + ok(old_prot == PAGE_NOACCESS, "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); old_prot = 0; - todo_wine ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READWRITE, - &old_prot), "VirtualProtectEx failed\n"); - todo_wine ok(old_prot == PAGE_READONLY, - "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); + ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtectEx failed\n"); + ok(old_prot == PAGE_READONLY, "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); ok(!VirtualFreeEx(hProcess, addr1, 0x10000, 0), "VirtualFreeEx should fail with type 0\n"); diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index e0eb2d4..8cfd1e5 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -746,6 +746,16 @@ static BOOL call_apcs( BOOL alertable ) } break; } + case APC_VIRTUAL_PROTECT: + result.type = call.type; + result.virtual_protect.addr = call.virtual_protect.addr; + result.virtual_protect.size = call.virtual_protect.size; + result.virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), + &result.virtual_protect.addr, + &result.virtual_protect.size, + call.virtual_protect.prot, + &result.virtual_protect.prot ); + break; default: server_protocol_error( "get_apc_request: bad type %d\n", call.type ); break; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 0407a21..57cbb20 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1597,10 +1597,25 @@ NTSTATUS WINAPI NtProtectVirtualMemory( TRACE("%p %p %08lx %08x\n", process, addr, size, new_prot ); - if (!is_current_process( process )) + if (process != NtCurrentProcess()) { - ERR("Unsupported on other process\n"); - return STATUS_ACCESS_DENIED; + apc_call_t call; + apc_result_t result; + + call.virtual_protect.type = APC_VIRTUAL_PROTECT; + call.virtual_protect.addr = addr; + call.virtual_protect.size = size; + call.virtual_protect.prot = new_prot; + status = NTDLL_queue_process_apc( process, &call, &result ); + if (status != STATUS_SUCCESS) return status; + + if (result.virtual_protect.status == STATUS_SUCCESS) + { + *addr_ptr = result.virtual_protect.addr; + *size_ptr = result.virtual_protect.size; + if (old_prot) *old_prot = result.virtual_protect.prot; + } + return result.virtual_protect.status; } /* Fix the parameters */ diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 60715ff..890dabd 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -217,7 +217,8 @@ enum apc_type APC_ASYNC_IO, APC_VIRTUAL_ALLOC, APC_VIRTUAL_FREE, - APC_VIRTUAL_QUERY + APC_VIRTUAL_QUERY, + APC_VIRTUAL_PROTECT }; typedef union @@ -265,6 +266,13 @@ typedef union enum apc_type type; const void *addr; } virtual_query; + struct + { + enum apc_type type; + void *addr; + unsigned long size; + unsigned int prot; + } virtual_protect; } apc_call_t; typedef union @@ -296,6 +304,14 @@ typedef union unsigned int alloc_prot; unsigned int alloc_type; } virtual_query; + struct + { + enum apc_type type; + unsigned int status; + void *addr; + unsigned long size; + unsigned int prot; + } virtual_protect; } apc_result_t; @@ -4517,6 +4533,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 267 +#define SERVER_PROTOCOL_VERSION 268 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index b24e275..8c40e10 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -233,7 +233,8 @@ enum apc_type APC_ASYNC_IO, APC_VIRTUAL_ALLOC, APC_VIRTUAL_FREE, - APC_VIRTUAL_QUERY + APC_VIRTUAL_QUERY, + APC_VIRTUAL_PROTECT }; typedef union @@ -281,6 +282,13 @@ typedef union enum apc_type type; /* APC_VIRTUAL_QUERY */ const void *addr; /* requested address */ } virtual_query; + struct + { + enum apc_type type; /* APC_VIRTUAL_PROTECT */ + void *addr; /* requested address */ + unsigned long size; /* requested address */ + unsigned int prot; /* new protection flags */ + } virtual_protect; } apc_call_t; typedef union @@ -312,6 +320,14 @@ typedef union unsigned int alloc_prot;/* resulting allocation protection */ unsigned int alloc_type;/* resulting region allocation type */ } virtual_query; + struct + { + enum apc_type type; /* APC_VIRTUAL_PROTECT */ + unsigned int status; /* status returned by call */ + void *addr; /* resulting address */ + unsigned long size; /* resulting size */ + unsigned int prot; /* old protection flags */ + } virtual_protect; } apc_result_t; /****************************************************************/ diff --git a/server/thread.c b/server/thread.c index 62bd559..35484a4 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1157,6 +1157,7 @@ DECL_HANDLER(queue_apc) case APC_VIRTUAL_ALLOC: case APC_VIRTUAL_FREE: case APC_VIRTUAL_QUERY: + case APC_VIRTUAL_PROTECT: access = (apc->call.type == APC_VIRTUAL_QUERY) ? PROCESS_QUERY_INFORMATION : PROCESS_VM_OPERATION; if ((process = get_process_from_handle( req->process, access ))) { diff --git a/server/trace.c b/server/trace.c index 2b9ee8c..b878c02 100644 --- a/server/trace.c +++ b/server/trace.c @@ -133,6 +133,11 @@ static void dump_apc_call( const apc_cal case APC_VIRTUAL_QUERY: fprintf( stderr, "APC_VIRTUAL_QUERY,addr=%p", call->virtual_query.addr ); break; + case APC_VIRTUAL_PROTECT: + fprintf( stderr, "APC_VIRTUAL_PROTECT,addr=%p,size=%lu,prot=%x", + call->virtual_protect.addr, call->virtual_protect.size, + call->virtual_protect.prot ); + break; default: fprintf( stderr, "type=%u", call->type ); break; @@ -165,6 +170,12 @@ static void dump_apc_result( const apc_r result->virtual_query.prot, result->virtual_query.alloc_prot, result->virtual_query.alloc_type ); break; + case APC_VIRTUAL_PROTECT: + fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s,addr=%p,size=%lu,prot=%x", + get_status_name( result->virtual_protect.status ), + result->virtual_protect.addr, result->virtual_protect.size, + result->virtual_protect.prot ); + break; default: fprintf( stderr, "type=%u", result->type ); break;
1
0
0
0
Alexandre Julliard : ntdll: Implementation of inter-process VirtualQueryEx.
by Alexandre Julliard
16 Jan '07
16 Jan '07
Module: wine Branch: master Commit: 3d002395868c38d8c7d2a3207cc037ac135d729b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d002395868c38d8c7d2a3207…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 15 22:28:42 2007 +0100 ntdll: Implementation of inter-process VirtualQueryEx. --- dlls/kernel32/tests/virtual.c | 41 +++++++++++++++------------------------ dlls/ntdll/sync.c | 20 +++++++++++++++++++ dlls/ntdll/virtual.c | 25 +++++++++++++++++++++-- include/wine/server_protocol.h | 22 +++++++++++++++++++- server/protocol.def | 20 ++++++++++++++++++- server/thread.c | 5 +++- server/trace.c | 11 ++++++++++ 7 files changed, 112 insertions(+), 32 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3d002395868c38d8c7d2a…
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200