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
March 2012
----- 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
3 participants
710 discussions
Start a n
N
ew thread
Detlef Riekenberg : comdlg32: Use a helper to get the printer driver info.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: ce9f0463880de180c1e2e400595ce19a1a11ea6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce9f0463880de180c1e2e4005…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Mar 18 22:14:21 2012 +0100 comdlg32: Use a helper to get the printer driver info. --- dlls/comdlg32/printdlg.c | 83 ++++++++++++++++++++++++++++++---------------- 1 files changed, 54 insertions(+), 29 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index 2d563ca..ccb7b5f 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -162,6 +162,53 @@ static LPWSTR strdupW(LPCWSTR p) } /*********************************************************************** + * get_driver_info [internal] + * + * get DRIVER_INFO_3W for the current printer handle, + * alloc the buffer, when needed + */ +static DRIVER_INFO_3W * get_driver_infoW(HANDLE hprn) +{ + DRIVER_INFO_3W *di3 = NULL; + DWORD needed = 0; + BOOL res; + + res = GetPrinterDriverW(hprn, NULL, 3, NULL, 0, &needed); + if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { + di3 = HeapAlloc(GetProcessHeap(), 0, needed); + res = GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)di3, needed, &needed); + } + + if (res) + return di3; + + TRACE("GetPrinterDriverW failed with %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, di3); + return NULL; +} + +static DRIVER_INFO_3A * get_driver_infoA(HANDLE hprn) +{ + DRIVER_INFO_3A *di3 = NULL; + DWORD needed = 0; + BOOL res; + + res = GetPrinterDriverA(hprn, NULL, 3, NULL, 0, &needed); + if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { + di3 = HeapAlloc(GetProcessHeap(), 0, needed); + res = GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)di3, needed, &needed); + } + + if (res) + return di3; + + TRACE("GetPrinterDriverA failed with %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, di3); + return NULL; +} + + +/*********************************************************************** * get_printer_info [internal] * * get PRINTER_INFO_2W for the current printer handle, @@ -3848,10 +3895,8 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd) if (lppd->Flags & PD_RETURNDEFAULT) { PRINTER_INFO_2A *pbuf; - DRIVER_INFO_2A *dbuf; + DRIVER_INFO_3A *dbuf; HANDLE hprn; - DWORD needed = 1024; - BOOL bRet; if (lppd->hDevMode || lppd->hDevNames) { @@ -3873,19 +3918,9 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd) return E_FAIL; } - dbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); - if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) + dbuf = get_driver_infoA(hprn); + if (!dbuf) { - HeapFree(GetProcessHeap(), 0, dbuf); - dbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); - } - if (!bRet) - { - ERR("GetPrinterDriverА failed, last error %d, fix your config for printer %s!\n", - GetLastError(), pbuf->pPrinterName); - HeapFree(GetProcessHeap(), 0, dbuf); HeapFree(GetProcessHeap(), 0, pbuf); COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); ClosePrinter(hprn); @@ -3976,10 +4011,8 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd) if (lppd->Flags & PD_RETURNDEFAULT) { PRINTER_INFO_2W *pbuf; - DRIVER_INFO_2W *dbuf; + DRIVER_INFO_3W *dbuf; HANDLE hprn; - DWORD needed = 1024; - BOOL bRet; if (lppd->hDevMode || lppd->hDevNames) { WARN("hDevMode or hDevNames non-zero for PD_RETURNDEFAULT\n"); @@ -3999,17 +4032,9 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd) return E_FAIL; } - dbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); - if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { - HeapFree(GetProcessHeap(), 0, dbuf); - dbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); - } - if (!bRet) { - ERR("GetPrinterDriverW failed, last error %d, fix your config for printer %s!\n", - GetLastError(), debugstr_w(pbuf->pPrinterName)); - HeapFree(GetProcessHeap(), 0, dbuf); + dbuf = get_driver_infoW(hprn); + if (!dbuf) + { HeapFree(GetProcessHeap(), 0, pbuf); COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); ClosePrinter(hprn);
1
0
0
0
Detlef Riekenberg : comdlg32: Use a helper to get the printer info.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: d0f5397b9e95579317ee6d930d574d507c9e774f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0f5397b9e95579317ee6d930…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Mar 18 22:14:20 2012 +0100 comdlg32: Use a helper to get the printer info. --- dlls/comdlg32/printdlg.c | 72 ++++++++++++++++++++++++++++++++------------- 1 files changed, 51 insertions(+), 21 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index b2edda9..2d563ca 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -161,6 +161,52 @@ static LPWSTR strdupW(LPCWSTR p) return ret; } +/*********************************************************************** + * get_printer_info [internal] + * + * get PRINTER_INFO_2W for the current printer handle, + * alloc the buffer, when needed + */ +static PRINTER_INFO_2W * get_printer_infoW(HANDLE hprn) +{ + PRINTER_INFO_2W *pi2 = NULL; + DWORD needed = 0; + BOOL res; + + res = GetPrinterW(hprn, 2, NULL, 0, &needed); + if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { + pi2 = HeapAlloc(GetProcessHeap(), 0, needed); + res = GetPrinterW(hprn, 2, (LPBYTE)pi2, needed, &needed); + } + + if (res) + return pi2; + + TRACE("GetPrinterW failed with %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, pi2); + return NULL; +} + +static PRINTER_INFO_2A * get_printer_infoA(HANDLE hprn) +{ + PRINTER_INFO_2A *pi2 = NULL; + DWORD needed = 0; + BOOL res; + + res = GetPrinterA(hprn, 2, NULL, 0, &needed); + if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { + pi2 = HeapAlloc(GetProcessHeap(), 0, needed); + res = GetPrinterA(hprn, 2, (LPBYTE)pi2, needed, &needed); + } + + if (res) + return pi2; + + TRACE("GetPrinterA failed with %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, pi2); + return NULL; +} + /*********************************************************** * convert_to_devmodeA * @@ -3820,22 +3866,13 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd) return E_FAIL; } - pbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterA(hprn, 2, (LPBYTE)pbuf, needed, &needed); - if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) - { - HeapFree(GetProcessHeap(), 0, pbuf); - pbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterA(hprn, 2, (LPBYTE)pbuf, needed, &needed); - } - if (!bRet) + pbuf = get_printer_infoA(hprn); + if (!pbuf) { - HeapFree(GetProcessHeap(), 0, pbuf); ClosePrinter(hprn); return E_FAIL; } - needed = 1024; dbuf = HeapAlloc(GetProcessHeap(), 0, needed); bRet = GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) @@ -3955,20 +3992,13 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd) return E_FAIL; } - pbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterW(hprn, 2, (LPBYTE)pbuf, needed, &needed); - if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { - HeapFree(GetProcessHeap(), 0, pbuf); - pbuf = HeapAlloc(GetProcessHeap(), 0, needed); - bRet = GetPrinterW(hprn, 2, (LPBYTE)pbuf, needed, &needed); - } - if (!bRet) { - HeapFree(GetProcessHeap(), 0, pbuf); + pbuf = get_printer_infoW(hprn); + if (!pbuf) + { ClosePrinter(hprn); return E_FAIL; } - needed = 1024; dbuf = HeapAlloc(GetProcessHeap(), 0, needed); bRet = GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed); if (!bRet && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) {
1
0
0
0
Detlef Riekenberg : comdlg32/tests: Test more parameters for PrintDlgEx.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 164a76fde30633d872f39262eb8502bc54d5f3b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=164a76fde30633d872f39262e…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Mar 18 22:14:19 2012 +0100 comdlg32/tests: Test more parameters for PrintDlgEx. --- dlls/comdlg32/tests/printdlg.c | 81 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c index 8597d5f..2eaf9d4 100644 --- a/dlls/comdlg32/tests/printdlg.c +++ b/dlls/comdlg32/tests/printdlg.c @@ -212,7 +212,9 @@ static void test_PrintDlgA(void) static void test_PrintDlgExW(void) { + PRINTPAGERANGE pagerange[2]; LPPRINTDLGEXW pDlg; + DEVNAMES *dn; HRESULT res; /* PrintDlgEx not present before w2k */ @@ -262,6 +264,85 @@ static void test_PrintDlgExW(void) "got 0x%x with %u and %u (expected 'E_HANDLE')\n", res, GetLastError(), CommDlgExtendedError()); + /* nStartPage must be START_PAGE_GENERAL for the general page or a valid property sheet index */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS; + res = pPrintDlgExW(pDlg); + ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + + /* Use PD_NOPAGENUMS or set nMaxPageRanges and lpPageRanges */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING; + pDlg->nStartPage = START_PAGE_GENERAL; + res = pPrintDlgExW(pDlg); + ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + + /* this is invalid: a valid lpPageRanges with 0 for nMaxPageRanges */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING; + pDlg->lpPageRanges = pagerange; + pDlg->nStartPage = START_PAGE_GENERAL; + res = pPrintDlgExW(pDlg); + ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + + /* this is invalid: NULL for lpPageRanges with a valid nMaxPageRanges */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING; + pDlg->nMaxPageRanges = 1; + pDlg->nStartPage = START_PAGE_GENERAL; + res = pPrintDlgExW(pDlg); + ok((res == E_INVALIDARG), "got 0x%x (expected 'E_INVALIDARG')\n", res); + + /* this works: lpPageRanges with a valid nMaxPageRanges */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING; + pDlg->nMaxPageRanges = 1; + pDlg->lpPageRanges = pagerange; + pDlg->nStartPage = START_PAGE_GENERAL; + res = pPrintDlgExW(pDlg); + if (res == E_FAIL) + { + skip("No printer configured.\n"); + HeapFree(GetProcessHeap(), 0, pDlg); + return; + } + + ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + + dn = GlobalLock(pDlg->hDevNames); + ok(dn != NULL, "expected '!= NULL' for GlobalLock(%p)\n",pDlg->hDevNames); + if (dn) + { + ok(dn->wDriverOffset, "(expected '!= 0' for wDriverOffset)\n"); + ok(dn->wDeviceOffset, "(expected '!= 0' for wDeviceOffset)\n"); + ok(dn->wOutputOffset, "(expected '!= 0' for wOutputOffset)\n"); + ok(dn->wDefault == DN_DEFAULTPRN, "got 0x%x (expected DN_DEFAULTPRN)\n", dn->wDefault); + + GlobalUnlock(pDlg->hDevNames); + } + GlobalFree(pDlg->hDevMode); + GlobalFree(pDlg->hDevNames); + + /* this works also: PD_NOPAGENUMS */ + ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); + pDlg->lStructSize = sizeof(PRINTDLGEXW); + pDlg->hwndOwner = GetDesktopWindow(); + pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS; + pDlg->nStartPage = START_PAGE_GENERAL; + res = pPrintDlgExW(pDlg); + ok(res == S_OK, "got 0x%x (expected S_OK)\n", res); + GlobalFree(pDlg->hDevMode); + GlobalFree(pDlg->hDevNames); HeapFree(GetProcessHeap(), 0, pDlg); return;
1
0
0
0
Detlef Riekenberg : comdlg32: Validate more parameters in PrintDlgEx.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: c2aeac3cc07b80d67866e66a6c25e7aadaaa2b09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c2aeac3cc07b80d67866e66a6…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Mar 18 22:14:18 2012 +0100 comdlg32: Validate more parameters in PrintDlgEx. --- dlls/comdlg32/printdlg.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index 7ce9148..b2edda9 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -3785,6 +3785,20 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd) if (!IsWindow(lppd->hwndOwner)) return E_HANDLE; + if (lppd->nStartPage != START_PAGE_GENERAL) + { + if (!lppd->nPropertyPages) + return E_INVALIDARG; + + FIXME("custom property sheets (%d at %p) not supported\n", lppd->nPropertyPages, lppd->lphPropertyPages); + } + + /* Use PD_NOPAGENUMS or set nMaxPageRanges and lpPageRanges */ + if (!(lppd->Flags & PD_NOPAGENUMS) && (!lppd->nMaxPageRanges || !lppd->lpPageRanges)) + { + return E_INVALIDARG; + } + if (lppd->Flags & PD_RETURNDEFAULT) { PRINTER_INFO_2A *pbuf; @@ -3909,6 +3923,20 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd) return E_HANDLE; } + if (lppd->nStartPage != START_PAGE_GENERAL) + { + if (!lppd->nPropertyPages) + return E_INVALIDARG; + + FIXME("custom property sheets (%d at %p) not supported\n", lppd->nPropertyPages, lppd->lphPropertyPages); + } + + /* Use PD_NOPAGENUMS or set nMaxPageRanges and lpPageRanges */ + if (!(lppd->Flags & PD_NOPAGENUMS) && (!lppd->nMaxPageRanges || !lppd->lpPageRanges)) + { + return E_INVALIDARG; + } + if (lppd->Flags & PD_RETURNDEFAULT) { PRINTER_INFO_2W *pbuf; DRIVER_INFO_2W *dbuf;
1
0
0
0
Detlef Riekenberg : comdlg32/tests: Remove outdated/unused code.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 65ab4b2cf077aa200a76cc8cb7b8f8dc39aeeaa7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65ab4b2cf077aa200a76cc8cb…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Mar 18 22:14:17 2012 +0100 comdlg32/tests: Remove outdated/unused code. --- dlls/comdlg32/tests/printdlg.c | 47 +++++++-------------------------------- 1 files changed, 9 insertions(+), 38 deletions(-) diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c index c295df0..8597d5f 100644 --- a/dlls/comdlg32/tests/printdlg.c +++ b/dlls/comdlg32/tests/printdlg.c @@ -36,7 +36,6 @@ /* ########################### */ static HMODULE hcomdlg32; -static HRESULT (WINAPI * pPrintDlgExA)(LPPRINTDLGEXA); static HRESULT (WINAPI * pPrintDlgExW)(LPPRINTDLGEXW); /* ########################### */ @@ -46,27 +45,6 @@ static const CHAR PrinterPortsA[] = "PrinterPorts"; /* ########################### */ -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "comdlg32.dll"; - hcomdlg32 = GetModuleHandleA(ptr); - - ptr = "PrintDlgExA"; - pPrintDlgExA = (void *) GetProcAddress(hcomdlg32, ptr); - if (!pPrintDlgExA) return ptr; - - ptr = "PrintDlgExW"; - pPrintDlgExW = (void *) GetProcAddress(hcomdlg32, ptr); - if (!pPrintDlgExW) return ptr; - - return NULL; - -} - -/* ########################### */ - static void test_PageSetupDlgA(void) { LPPAGESETUPDLGA pDlg; @@ -237,15 +215,16 @@ static void test_PrintDlgExW(void) LPPRINTDLGEXW pDlg; HRESULT res; + /* PrintDlgEx not present before w2k */ + if (!pPrintDlgExW) { + skip("PrintDlgExW not available\n"); + return; + } + /* Set CommDlgExtendedError != 0 */ PrintDlg(NULL); SetLastError(0xdeadbeef); res = pPrintDlgExW(NULL); - if(res == E_NOTIMPL) - { - win_skip("PrintDlgExW returns not implemented\n"); - return; - } ok( (res == E_INVALIDARG), "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", res, GetLastError(), CommDlgExtendedError()); @@ -371,19 +350,11 @@ end: START_TEST(printdlg) { - LPCSTR ptr; - - ptr = load_functions(); + hcomdlg32 = GetModuleHandleA("comdlg32.dll"); + pPrintDlgExW = (void *) GetProcAddress(hcomdlg32, "PrintDlgExW"); test_PageSetupDlgA(); test_PrintDlgA(); - test_abort_proc(); - - /* PrintDlgEx not present before w2k */ - if (ptr) { - win_skip("%s\n", ptr); - return; - } - test_PrintDlgExW(); + test_abort_proc(); }
1
0
0
0
André Hentschel : make_specfiles: Add vcomp group.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 41c4357f1523000ae93104ea1b79893f0b4296b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41c4357f1523000ae93104ea1…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Mar 18 19:30:10 2012 +0100 make_specfiles: Add vcomp group. --- tools/make_specfiles | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/make_specfiles b/tools/make_specfiles index 89af185..619c8ad 100755 --- a/tools/make_specfiles +++ b/tools/make_specfiles @@ -106,6 +106,10 @@ my @dll_groups = "setupapi", "cfgmgr32", ], + [ + "vcomp", + "vcomp100", + ], ); my $update_flags = 0;
1
0
0
0
André Hentschel : vcomp100: Add new stub dll.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 4078b0f1ab4cfd624ece4f2c70568e7ec95a43a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4078b0f1ab4cfd624ece4f2c7…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Mar 18 19:29:23 2012 +0100 vcomp100: Add new stub dll. --- configure | 1 + configure.ac | 1 + dlls/vcomp100/Makefile.in | 6 ++ dlls/vcomp100/main.c | 48 ++++++++++++++++++ dlls/vcomp100/vcomp100.spec | 112 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 8f0ed91..1a810b9 100755 --- a/configure +++ b/configure @@ -15351,6 +15351,7 @@ wine_fn_config_test dlls/uxtheme/tests uxtheme_test wine_fn_config_dll vbscript enable_vbscript wine_fn_config_test dlls/vbscript/tests vbscript_test wine_fn_config_dll vcomp enable_vcomp +wine_fn_config_dll vcomp100 enable_vcomp100 wine_fn_config_dll vdhcp.vxd enable_win16 wine_fn_config_dll vdmdbg enable_vdmdbg implib wine_fn_config_dll ver.dll16 enable_win16 diff --git a/configure.ac b/configure.ac index a0e785b..bebbb91 100644 --- a/configure.ac +++ b/configure.ac @@ -2858,6 +2858,7 @@ WINE_CONFIG_TEST(dlls/uxtheme/tests) WINE_CONFIG_DLL(vbscript) WINE_CONFIG_TEST(dlls/vbscript/tests) WINE_CONFIG_DLL(vcomp) +WINE_CONFIG_DLL(vcomp100) WINE_CONFIG_DLL(vdhcp.vxd,enable_win16) WINE_CONFIG_DLL(vdmdbg,,[implib]) WINE_CONFIG_DLL(ver.dll16,enable_win16) diff --git a/dlls/vcomp100/Makefile.in b/dlls/vcomp100/Makefile.in new file mode 100644 index 0000000..c79f7be --- /dev/null +++ b/dlls/vcomp100/Makefile.in @@ -0,0 +1,6 @@ +MODULE = vcomp100.dll + +C_SRCS = \ + main.c + +@MAKE_DLL_RULES@ diff --git a/dlls/vcomp100/main.c b/dlls/vcomp100/main.c new file mode 100644 index 0000000..a5105d3 --- /dev/null +++ b/dlls/vcomp100/main.c @@ -0,0 +1,48 @@ +/* + * + * vcomp100 implementation + * + * Copyright 2012 André Hentschel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vcomp100); + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + case DLL_PROCESS_DETACH: + break; + } + + return TRUE; +} diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec new file mode 100644 index 0000000..cd5a964 --- /dev/null +++ b/dlls/vcomp100/vcomp100.spec @@ -0,0 +1,112 @@ +@ stub _vcomp_atomic_add_i1 +@ stub _vcomp_atomic_add_i2 +@ stub _vcomp_atomic_add_i4 +@ stub _vcomp_atomic_add_i8 +@ stub _vcomp_atomic_add_r4 +@ stub _vcomp_atomic_add_r8 +@ stub _vcomp_atomic_and_i1 +@ stub _vcomp_atomic_and_i2 +@ stub _vcomp_atomic_and_i4 +@ stub _vcomp_atomic_and_i8 +@ stub _vcomp_atomic_div_i1 +@ stub _vcomp_atomic_div_i2 +@ stub _vcomp_atomic_div_i4 +@ stub _vcomp_atomic_div_i8 +@ stub _vcomp_atomic_div_r4 +@ stub _vcomp_atomic_div_r8 +@ stub _vcomp_atomic_div_ui1 +@ stub _vcomp_atomic_div_ui2 +@ stub _vcomp_atomic_div_ui4 +@ stub _vcomp_atomic_div_ui8 +@ stub _vcomp_atomic_mul_i1 +@ stub _vcomp_atomic_mul_i2 +@ stub _vcomp_atomic_mul_i4 +@ stub _vcomp_atomic_mul_i8 +@ stub _vcomp_atomic_mul_r4 +@ stub _vcomp_atomic_mul_r8 +@ stub _vcomp_atomic_or_i1 +@ stub _vcomp_atomic_or_i2 +@ stub _vcomp_atomic_or_i4 +@ stub _vcomp_atomic_or_i8 +@ stub _vcomp_atomic_shl_i1 +@ stub _vcomp_atomic_shl_i2 +@ stub _vcomp_atomic_shl_i4 +@ stub _vcomp_atomic_shl_i8 +@ stub _vcomp_atomic_shr_i1 +@ stub _vcomp_atomic_shr_i2 +@ stub _vcomp_atomic_shr_i4 +@ stub _vcomp_atomic_shr_i8 +@ stub _vcomp_atomic_shr_ui1 +@ stub _vcomp_atomic_shr_ui2 +@ stub _vcomp_atomic_shr_ui4 +@ stub _vcomp_atomic_shr_ui8 +@ stub _vcomp_atomic_sub_i1 +@ stub _vcomp_atomic_sub_i2 +@ stub _vcomp_atomic_sub_i4 +@ stub _vcomp_atomic_sub_i8 +@ stub _vcomp_atomic_sub_r4 +@ stub _vcomp_atomic_sub_r8 +@ stub _vcomp_atomic_xor_i1 +@ stub _vcomp_atomic_xor_i2 +@ stub _vcomp_atomic_xor_i4 +@ stub _vcomp_atomic_xor_i8 +@ stub _vcomp_barrier +@ stub _vcomp_copyprivate_broadcast +@ stub _vcomp_copyprivate_receive +@ stub _vcomp_enter_critsect +@ stub _vcomp_flush +@ stub _vcomp_for_dynamic_init +@ stub _vcomp_for_dynamic_init_i8 +@ stub _vcomp_for_dynamic_next +@ stub _vcomp_for_dynamic_next_i8 +@ stub _vcomp_for_static_end +@ stub _vcomp_for_static_init +@ stub _vcomp_for_static_init_i8 +@ stub _vcomp_for_static_simple_init +@ stub _vcomp_for_static_simple_init_i8 +@ stub _vcomp_fork +@ stub _vcomp_get_thread_num +@ stub _vcomp_leave_critsect +@ stub _vcomp_master_barrier +@ stub _vcomp_master_begin +@ stub _vcomp_master_end +@ stub _vcomp_ordered_begin +@ stub _vcomp_ordered_end +@ stub _vcomp_ordered_loop_end +@ stub _vcomp_reduction_i1 +@ stub _vcomp_reduction_i2 +@ stub _vcomp_reduction_i4 +@ stub _vcomp_reduction_i8 +@ stub _vcomp_reduction_r4 +@ stub _vcomp_reduction_r8 +@ stub _vcomp_reduction_u1 +@ stub _vcomp_reduction_u2 +@ stub _vcomp_reduction_u4 +@ stub _vcomp_reduction_u8 +@ stub _vcomp_sections_init +@ stub _vcomp_sections_next +@ stub _vcomp_set_num_threads +@ stub _vcomp_single_begin +@ stub _vcomp_single_end +@ stub omp_destroy_lock +@ stub omp_destroy_nest_lock +@ stub omp_get_dynamic +@ stub omp_get_max_threads +@ stub omp_get_nested +@ stub omp_get_num_procs +@ stub omp_get_num_threads +@ stub omp_get_thread_num +@ stub omp_get_wtick +@ stub omp_get_wtime +@ stub omp_in_parallel +@ stub omp_init_lock +@ stub omp_init_nest_lock +@ stub omp_set_dynamic +@ stub omp_set_lock +@ stub omp_set_nest_lock +@ stub omp_set_nested +@ stub omp_set_num_threads +@ stub omp_test_lock +@ stub omp_test_nest_lock +@ stub omp_unset_lock +@ stub omp_unset_nest_lock
1
0
0
0
André Hentschel : kernel32: Handle LOCALE_NAME_USER_DEFAULT with tests.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 21b6d994d2ebd09026208b04ea58e44f331f53a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21b6d994d2ebd09026208b04e…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Mar 18 19:28:41 2012 +0100 kernel32: Handle LOCALE_NAME_USER_DEFAULT with tests. --- dlls/kernel32/locale.c | 4 ++++ dlls/kernel32/tests/locale.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/winnls.h | 19 +++++++++++++++++++ include/winnt.h | 1 + 4 files changed, 66 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 2c3760c..20451ff 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -976,6 +976,10 @@ LCID WINAPI LocaleNameToLCID( LPCWSTR name, DWORD flags ) if (flags) FIXME( "unsupported flags %x\n", flags ); + if (name == LOCALE_NAME_USER_DEFAULT) + return GetUserDefaultLCID(); + + /* string parsing */ parse_locale_name( name, &locale_name ); TRACE( "found lcid %x for %s, matches %d\n", diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index f5b77f7..49678ce 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -71,6 +71,8 @@ static BOOL (WINAPI *pEnumSystemLanguageGroupsA)(LANGUAGEGROUP_ENUMPROC, DWORD, static BOOL (WINAPI *pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROC, LGRPID, DWORD, LONG_PTR); static BOOL (WINAPI *pEnumUILanguagesA)(UILANGUAGE_ENUMPROC, DWORD, LONG_PTR); static BOOL (WINAPI *pEnumSystemLocalesEx)(LOCALE_ENUMPROCEX, DWORD, LPARAM, LPVOID); +static LCID (WINAPI *pLocaleNameToLCID)(LPCWSTR, DWORD); +static INT (WINAPI *pLCIDToLocaleName)(LCID, LPWSTR, INT, DWORD); static INT (WINAPI *pFoldStringA)(DWORD, LPCSTR, INT, LPSTR, INT); static INT (WINAPI *pFoldStringW)(DWORD, LPCWSTR, INT, LPWSTR, INT); static BOOL (WINAPI *pIsValidLanguageGroup)(LGRPID, DWORD); @@ -80,6 +82,8 @@ static void InitFunctionPointers(void) hKernel32 = GetModuleHandleA("kernel32"); pEnumSystemLanguageGroupsA = (void*)GetProcAddress(hKernel32, "EnumSystemLanguageGroupsA"); pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA"); + pLocaleNameToLCID = (void*)GetProcAddress(hKernel32, "LocaleNameToLCID"); + pLCIDToLocaleName = (void*)GetProcAddress(hKernel32, "LCIDToLocaleName"); pFoldStringA = (void*)GetProcAddress(hKernel32, "FoldStringA"); pFoldStringW = (void*)GetProcAddress(hKernel32, "FoldStringW"); pIsValidLanguageGroup = (void*)GetProcAddress(hKernel32, "IsValidLanguageGroup"); @@ -1637,6 +1641,43 @@ static void test_LCMapStringW(void) "unexpected error code %d\n", GetLastError()); } +static void test_LocaleNames(void) +{ + LCID lcid; + INT ret; + WCHAR buffer[LOCALE_NAME_MAX_LENGTH]; + + if (!pLocaleNameToLCID) + { + win_skip( "LocaleNameToLCID not available\n" ); + return; + } + + /* special cases */ + buffer[0] = 0; + lcid = pLocaleNameToLCID(LOCALE_NAME_USER_DEFAULT, 0); + ok(lcid == GetUserDefaultLCID() || broken(GetLastError() == ERROR_INVALID_PARAMETER /* Vista */), + "Expected lcid == %08x, got %08x, error %d\n", lcid, GetUserDefaultLCID(), GetLastError()); + ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); + ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); + trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); + + buffer[0] = 0; + lcid = pLocaleNameToLCID(LOCALE_NAME_SYSTEM_DEFAULT, 0); + todo_wine ok(!lcid && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected lcid != 0, got %08x, error %d\n", lcid, GetLastError()); + ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); + ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); + trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); + + buffer[0] = 0; + lcid = pLocaleNameToLCID(LOCALE_NAME_INVARIANT, 0); + todo_wine ok(lcid == 0x7F, "Expected lcid = 0x7F, got %08x, error %d\n", lcid, GetLastError()); + ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); + ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); + trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); +} + /* this requires collation table patch to make it MS compatible */ static const char * const strings_sorted[] = { @@ -2782,6 +2823,7 @@ START_TEST(locale) test_CompareStringA(); test_LCMapStringA(); test_LCMapStringW(); + test_LocaleNames(); test_FoldStringA(); test_FoldStringW(); test_ConvertDefaultLocale(); diff --git a/include/winnls.h b/include/winnls.h index de6f875..c7da119 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -321,6 +321,25 @@ extern "C" { #define LOCALE_SSORTNAME 0x1013 #define LOCALE_IDIGITSUBSTITUTION 0x1014 +/* Locale name special values */ +#if defined(__GNUC__) +# define LOCALE_NAME_INVARIANT (const WCHAR []){ 0 } +#elif defined(_MSC_VER) +# define LOCALE_NAME_INVARIANT L"" +#else +static const WCHAR LOCALE_NAME_INVARIANT[] = { 0 }; +#endif + +#if defined(__GNUC__) +# define LOCALE_NAME_SYSTEM_DEFAULT (const WCHAR []){'!','s','y','s','-','d','e','f','a','u','l','t','-','l','o','c','a','l','e',0} +#elif defined(_MSC_VER) +# define LOCALE_NAME_SYSTEM_DEFAULT L"!sys-default-locale" +#else +static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = {'!','s','y','s','-','d','e','f','a','u','l','t','-','l','o','c','a','l','e',0}; +#endif + +#define LOCALE_NAME_USER_DEFAULT NULL + #define LOCALE_IDEFAULTUNIXCODEPAGE 0x1030 /* Wine extension */ #define NORM_IGNORECASE 0x00001 diff --git a/include/winnt.h b/include/winnt.h index fc471b8..5cde0f4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -1985,6 +1985,7 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*); #define LOCALE_CUSTOM_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_CUSTOM_DEFAULT),SORT_DEFAULT)) #define LOCALE_CUSTOM_UNSPECIFIED (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_CUSTOM_UNSPECIFIED),SORT_DEFAULT)) #define LOCALE_CUSTOM_UI_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_UI_CUSTOM_DEFAULT),SORT_DEFAULT)) +#define LOCALE_NAME_MAX_LENGTH 85 #define UNREFERENCED_PARAMETER(u) (void)(u)
1
0
0
0
André Hentschel : wevtapi: Add stubs for EvtGetChannelConfigProperty, EvtSetChannelConfigProperty and EvtSubscribe.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 32612b7de872704bebbf6e5e186fef503cca49ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32612b7de872704bebbf6e5e1…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Mar 18 19:21:04 2012 +0100 wevtapi: Add stubs for EvtGetChannelConfigProperty, EvtSetChannelConfigProperty and EvtSubscribe. --- dlls/wevtapi/main.c | 30 ++++++++++++++++++++++++++++++ dlls/wevtapi/wevtapi.spec | 6 +++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/dlls/wevtapi/main.c b/dlls/wevtapi/main.c index a39c7c9..fb673bb 100644 --- a/dlls/wevtapi/main.c +++ b/dlls/wevtapi/main.c @@ -46,6 +46,36 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } +BOOL WINAPI EvtGetChannelConfigProperty(EVT_HANDLE ChannelConfig, + EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId, + DWORD Flags, + DWORD PropertyValueBufferSize, + PEVT_VARIANT PropertyValueBuffer, + DWORD *PropertyValueBufferUsed) +{ + FIXME("(%p %i %u %u %p %p) stub\n", ChannelConfig, PropertyId, Flags, PropertyValueBufferSize, + PropertyValueBuffer, PropertyValueBufferUsed); + return FALSE; +} + +BOOL WINAPI EvtSetChannelConfigProperty(EVT_HANDLE ChannelConfig, + EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId, + DWORD Flags, + PEVT_VARIANT PropertyValue) +{ + FIXME("(%p %i %u %p) stub\n", ChannelConfig, PropertyId, Flags, PropertyValue); + return FALSE; +} + +EVT_HANDLE WINAPI EvtSubscribe(EVT_HANDLE Session, HANDLE SignalEvent, LPCWSTR ChannelPath, + LPCWSTR Query, EVT_HANDLE Bookmark, PVOID context, + EVT_SUBSCRIBE_CALLBACK Callback, DWORD Flags) +{ + FIXME("(%p %p %s %s %p %p %p %u) stub\n", Session, SignalEvent, debugstr_w(ChannelPath), + debugstr_w(Query), Bookmark, context, Callback, Flags); + return NULL; +} + EVT_HANDLE WINAPI EvtOpenChannelConfig(EVT_HANDLE Session, LPCWSTR ChannelPath, DWORD Flags) { FIXME("(%p %s %u) stub\n", Session, debugstr_w(ChannelPath), Flags); diff --git a/dlls/wevtapi/wevtapi.spec b/dlls/wevtapi/wevtapi.spec index adc3706..a493da4 100644 --- a/dlls/wevtapi/wevtapi.spec +++ b/dlls/wevtapi/wevtapi.spec @@ -6,7 +6,7 @@ @ stub EvtCreateRenderContext @ stub EvtExportLog @ stub EvtFormatMessage -@ stub EvtGetChannelConfigProperty +@ stdcall EvtGetChannelConfigProperty(ptr long long long ptr ptr) @ stub EvtGetEventInfo @ stub EvtGetEventMetadataProperty @ stub EvtGetExtendedStatus @@ -40,7 +40,7 @@ @ stub EvtRender @ stub EvtSaveChannelConfig @ stub EvtSeek -@ stub EvtSetChannelConfigProperty +@ stdcall EvtSetChannelConfigProperty(ptr long long ptr) @ stub EvtSetObjectArrayProperty -@ stub EvtSubscribe +@ stdcall EvtSubscribe(ptr ptr wstr wstr ptr ptr ptr long) @ stub EvtUpdateBookmark
1
0
0
0
André Hentschel : wevtapi: Add stub for EvtOpenChannelConfig.
by Alexandre Julliard
27 Mar '12
27 Mar '12
Module: wine Branch: master Commit: 35c272caa33f692d085c627fafdc77f559d0cae8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35c272caa33f692d085c627fa…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Mar 18 19:20:08 2012 +0100 wevtapi: Add stub for EvtOpenChannelConfig. --- dlls/wevtapi/main.c | 8 +++ dlls/wevtapi/wevtapi.spec | 2 +- include/Makefile.in | 1 + include/winevt.h | 132 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+), 1 deletions(-) diff --git a/dlls/wevtapi/main.c b/dlls/wevtapi/main.c index 583ddba..a39c7c9 100644 --- a/dlls/wevtapi/main.c +++ b/dlls/wevtapi/main.c @@ -1,5 +1,6 @@ /* * Copyright 2012 Austin English + * Copyright 2012 André Hentschel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +23,7 @@ #include "windef.h" #include "winbase.h" +#include "winevt.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wevtapi); @@ -43,3 +45,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } + +EVT_HANDLE WINAPI EvtOpenChannelConfig(EVT_HANDLE Session, LPCWSTR ChannelPath, DWORD Flags) +{ + FIXME("(%p %s %u) stub\n", Session, debugstr_w(ChannelPath), Flags); + return NULL; +} diff --git a/dlls/wevtapi/wevtapi.spec b/dlls/wevtapi/wevtapi.spec index f6a5786..adc3706 100644 --- a/dlls/wevtapi/wevtapi.spec +++ b/dlls/wevtapi/wevtapi.spec @@ -29,7 +29,7 @@ @ stub EvtNextChannelPath @ stub EvtNextEventMetadata @ stub EvtNextPublisherId -@ stub EvtOpenChannelConfig +@ stdcall EvtOpenChannelConfig(ptr wstr long) @ stub EvtOpenChannelEnum @ stub EvtOpenEventMetadataEnum @ stub EvtOpenLog diff --git a/include/Makefile.in b/include/Makefile.in index fa6f837..a83e56d 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -539,6 +539,7 @@ SRCDIR_INCLUDES = \ wine/library.h \ wine/unicode.h \ winerror.h \ + winevt.h \ wingdi.h \ winhttp.h \ wininet.h \ diff --git a/include/winevt.h b/include/winevt.h new file mode 100644 index 0000000..53ffe44 --- /dev/null +++ b/include/winevt.h @@ -0,0 +1,132 @@ +/* Definitions for the Windows Event Log (wevtapi.dll) + * + * Copyright 2012 André Hentschel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINEVT_H +#define __WINE_WINEVT_H + +#include <wtypes.h> + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +typedef HANDLE EVT_HANDLE, *PEVT_HANDLE; + +typedef enum _EVT_CHANNEL_CONFIG_PROPERTY_ID { + EvtChannelConfigEnabled = 0, + EvtChannelConfigIsolation, + EvtChannelConfigType, + EvtChannelConfigOwningPublisher, + EvtChannelConfigClassicEventlog, + EvtChannelConfigAccess, + EvtChannelLoggingConfigRetention, + EvtChannelLoggingConfigAutoBackup, + EvtChannelLoggingConfigMaxSize, + EvtChannelLoggingConfigLogFilePath, + EvtChannelPublishingConfigLevel, + EvtChannelPublishingConfigKeywords, + EvtChannelPublishingConfigControlGuid, + EvtChannelPublishingConfigBufferSize, + EvtChannelPublishingConfigMinBuffers, + EvtChannelPublishingConfigMaxBuffers, + EvtChannelPublishingConfigLatency, + EvtChannelPublishingConfigClockType, + EvtChannelPublishingConfigSidType, + EvtChannelPublisherList, + EvtChannelPublishingConfigFileMax, + EvtChannelConfigPropertyIdEND +} EVT_CHANNEL_CONFIG_PROPERTY_ID; + +typedef enum _EVT_SUBSCRIBE_NOTIFY_ACTION { + EvtSubscribeActionError = 0, + EvtSubscribeActionDeliver +} EVT_SUBSCRIBE_NOTIFY_ACTION; + +typedef struct _EVT_VARIANT { + union { + BOOL BooleanVal; + INT8 SByteVal; + INT16 Int16Val; + INT32 Int32Val; + INT64 Int64Val; + UINT8 ByteVal; + UINT16 UInt16Val; + UINT32 UInt32Val; + UINT64 UInt64Val; + FLOAT SingleVal; + DOUBLE DoubleVal; + ULONGLONG FileTimeVal; + SYSTEMTIME* SysTimeVal; + GUID* GuidVal; + LPCWSTR StringVal; + LPCSTR AnsiStringVal; + PBYTE BinaryVal; + PSID SidVal; + SIZE_T SizeTVal; + + BOOL* BooleanArr; + INT8* SByteArr; + INT16* Int16Arr; + INT32* Int32Arr; + INT64* Int64Arr; + UINT8* ByteArr; + UINT16* UInt16Arr; + UINT32* UInt32Arr; + UINT64* UInt64Arr; + FLOAT* SingleArr; + DOUBLE* DoubleArr; + FILETIME* FileTimeArr; + SYSTEMTIME* SysTimeArr; + GUID* GuidArr; + LPWSTR* StringArr; + LPSTR* AnsiStringArr; + PSID* SidArr; + SIZE_T* SizeTArr; + + EVT_HANDLE EvtHandleVal; + LPCWSTR XmlVal; + LPCWSTR* XmlValArr; + } DUMMYUNIONNAME; + + DWORD Count; + DWORD Type; +} EVT_VARIANT, *PEVT_VARIANT; + +typedef DWORD (WINAPI *EVT_SUBSCRIBE_CALLBACK)(EVT_SUBSCRIBE_NOTIFY_ACTION Action, + PVOID UserContext, EVT_HANDLE Event); + +BOOL WINAPI EvtGetChannelConfigProperty(EVT_HANDLE ChannelConfig, + EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId, + DWORD Flags, DWORD PropertyValueBufferSize, + PEVT_VARIANT PropertyValueBuffer, + PDWORD PropertyValueBufferUsed); +BOOL WINAPI EvtSetChannelConfigProperty(EVT_HANDLE ChannelConfig, + EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId, + DWORD Flags, PEVT_VARIANT PropertyValue); +EVT_HANDLE WINAPI EvtSubscribe(EVT_HANDLE Session, HANDLE SignalEvent, LPCWSTR ChannelPath, + LPCWSTR Query, EVT_HANDLE Bookmark, PVOID context, + EVT_SUBSCRIBE_CALLBACK Callback, DWORD Flags); +EVT_HANDLE WINAPI EvtOpenChannelConfig(EVT_HANDLE Session, LPCWSTR ChannelPath, DWORD Flags); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_WINEVT_H */
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
71
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
Results per page:
10
25
50
100
200