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
Jacek Caban : itss: Added more protocol tests.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: 6489a1c2423f7153bcf870ed6ca568b7b9996419 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6489a1c2423f7153bcf870ed6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jan 13 12:47:57 2007 +0100 itss: Added more protocol tests. --- dlls/itss/tests/protocol.c | 77 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 67 insertions(+), 10 deletions(-) diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index 02a0ca0..4b594b2 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -60,11 +60,18 @@ DEFINE_EXPECT(GetBindInfo); DEFINE_EXPECT(ReportProgress_BEGINDOWNLOADDATA); DEFINE_EXPECT(ReportProgress_SENDINGREQUEST); DEFINE_EXPECT(ReportProgress_MIMETYPEAVAILABLE); +DEFINE_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); +DEFINE_EXPECT(ReportProgress_DIRECTBIND); DEFINE_EXPECT(ReportData); DEFINE_EXPECT(ReportResult); static HRESULT expect_hrResult; +static enum { + ITS_PROTOCOL, + MK_PROTOCOL +} test_protocol; + static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) { if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocolSink, riid)) { @@ -95,6 +102,8 @@ static HRESULT WINAPI ProtocolSink_Repor { static const WCHAR blank_html[] = {'b','l','a','n','k','.','h','t','m','l',0}; static const WCHAR text_html[] = {'t','e','x','t','/','h','t','m','l',0}; + static const WCHAR cache_file[] = + {'t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; switch(ulStatusCode) { case BINDSTATUS_BEGINDOWNLOADDATA: @@ -103,12 +112,23 @@ static HRESULT WINAPI ProtocolSink_Repor break; case BINDSTATUS_SENDINGREQUEST: CHECK_EXPECT(ReportProgress_SENDINGREQUEST); - ok(!lstrcmpW(szStatusText, blank_html), "unexpected szStatusText\n"); + if(test_protocol == ITS_PROTOCOL) + ok(!lstrcmpW(szStatusText, blank_html), "unexpected szStatusText\n"); + else + ok(szStatusText == NULL, "szStatusText != NULL\n"); break; case BINDSTATUS_MIMETYPEAVAILABLE: CHECK_EXPECT(ReportProgress_MIMETYPEAVAILABLE); ok(!lstrcmpW(szStatusText, text_html), "unexpected szStatusText\n"); break; + case BINDSTATUS_CACHEFILENAMEAVAILABLE: + CHECK_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); + ok(!lstrcmpW(szStatusText, cache_file), "unexpected szStatusText\n"); + break; + case BINDSTATUS_DIRECTBIND: + CHECK_EXPECT(ReportProgress_DIRECTBIND); + ok(!szStatusText, "szStatusText != NULL\n"); + break; default: ok(0, "unexpected ulStatusCode %d\n", ulStatusCode); break; @@ -123,7 +143,10 @@ static HRESULT WINAPI ProtocolSink_Repor CHECK_EXPECT(ReportData); ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n"); - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcf = %08x\n", grfBSCF); + if(test_protocol == ITS_PROTOCOL) + ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcf = %08x\n", grfBSCF); + else + ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION), "grcf = %08x\n", grfBSCF); return S_OK; } @@ -225,10 +248,15 @@ static void protocol_start(IInternetProt HRESULT hres; SET_EXPECT(GetBindInfo); + if(test_protocol == MK_PROTOCOL) + SET_EXPECT(ReportProgress_DIRECTBIND); SET_EXPECT(ReportProgress_SENDINGREQUEST); SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); + if(test_protocol == MK_PROTOCOL) + SET_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); SET_EXPECT(ReportData); - SET_EXPECT(ReportProgress_BEGINDOWNLOADDATA); + if(test_protocol == ITS_PROTOCOL) + SET_EXPECT(ReportProgress_BEGINDOWNLOADDATA); SET_EXPECT(ReportResult); expect_hrResult = S_OK; @@ -236,14 +264,19 @@ static void protocol_start(IInternetProt ok(hres == S_OK, "Start failed: %08x\n", hres); CHECK_CALLED(GetBindInfo); + if(test_protocol == MK_PROTOCOL) + CHECK_CALLED(ReportProgress_DIRECTBIND); CHECK_CALLED(ReportProgress_SENDINGREQUEST); CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); + if(test_protocol == MK_PROTOCOL) + SET_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); CHECK_CALLED(ReportData); - CHECK_CALLED(ReportProgress_BEGINDOWNLOADDATA); + if(test_protocol == ITS_PROTOCOL) + CHECK_CALLED(ReportProgress_BEGINDOWNLOADDATA); CHECK_CALLED(ReportResult); } -static void test_its_protocol_url(IClassFactory *factory, LPCWSTR url) +static void test_protocol_url(IClassFactory *factory, LPCWSTR url) { IInternetProtocol *protocol; BYTE buf[512]; @@ -270,8 +303,8 @@ static void test_its_protocol_url(IClass cb = 0xdeadbeef; hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == INET_E_DATA_NOT_AVAILABLE, - "Read returned %08x expected INET_E_DATA_NOT_AVAILABLE\n", hres); + ok(hres == (test_protocol == ITS_PROTOCOL ? INET_E_DATA_NOT_AVAILABLE : E_FAIL), + "Read returned %08x\n", hres); ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb); protocol_start(protocol, url); @@ -358,6 +391,8 @@ static void test_its_protocol(void) static const WCHAR wrong_url5[] = {'f','i','l','e',':', 't','e','s','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; + test_protocol = ITS_PROTOCOL; + hres = CoGetClassObject(&CLSID_ITSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); if(!SUCCEEDED(hres)) @@ -386,9 +421,9 @@ static void test_its_protocol(void) ref = IInternetProtocol_Release(protocol); ok(!ref, "protocol ref=%d\n", ref); - test_its_protocol_url(factory, blank_url1); - test_its_protocol_url(factory, blank_url2); - test_its_protocol_url(factory, blank_url3); + test_protocol_url(factory, blank_url1); + test_protocol_url(factory, blank_url2); + test_protocol_url(factory, blank_url3); } IClassFactory_Release(factory); @@ -397,6 +432,27 @@ static void test_its_protocol(void) IUnknown_Release(unk); } +static void test_mk_protocol(void) +{ + IClassFactory *cf; + HRESULT hres; + + static const WCHAR blank_url[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', + 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; + + test_protocol = MK_PROTOCOL; + + hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, + (void**)&cf); + ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); + if(!SUCCEEDED(hres)) + return; + + test_protocol_url(cf, blank_url); + + IClassFactory_Release(cf); +} + static BOOL create_chm(void) { HANDLE file; @@ -433,6 +489,7 @@ START_TEST(protocol) return; test_its_protocol(); + test_mk_protocol(); delete_chm(); OleUninitialize();
1
0
0
0
Jacek Caban : itss: Close chm file when destroying Storage.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: 05d2aa450605dc46c598bee3826055a06063f170 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05d2aa450605dc46c598bee38…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jan 13 12:47:27 2007 +0100 itss: Close chm file when destroying Storage. --- dlls/itss/storage.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/itss/storage.c b/dlls/itss/storage.c index 9d1b343..6c163ad 100644 --- a/dlls/itss/storage.c +++ b/dlls/itss/storage.c @@ -296,6 +296,7 @@ static ULONG WINAPI ITSS_IStorageImpl_Re if (ref == 0) { + chm_close(This->chmfile); HeapFree(GetProcessHeap(), 0, This); ITSS_UnlockModule(); }
1
0
0
0
Jacek Caban : itss: Return S_FALSE in IStream:: Read if there is no more data to read.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: f925e0c0d1c5fe4be0511e1f9e7a8b9137d2cbf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f925e0c0d1c5fe4be0511e1f9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jan 13 12:46:29 2007 +0100 itss: Return S_FALSE in IStream::Read if there is no more data to read. --- dlls/itss/storage.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/itss/storage.c b/dlls/itss/storage.c index d2e346c..9d1b343 100644 --- a/dlls/itss/storage.c +++ b/dlls/itss/storage.c @@ -660,7 +660,7 @@ static HRESULT WINAPI ITSS_IStream_Read( if( pcbRead ) *pcbRead = count; - return S_OK; + return count ? S_OK : S_FALSE; } static HRESULT WINAPI ITSS_IStream_Write(
1
0
0
0
Jacek Caban : urlmon: Added mk protocol implementation.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: 6ea7a445ce044f458449924ac9b85e59117c3dbe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ea7a445ce044f458449924ac…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jan 13 12:46:06 2007 +0100 urlmon: Added mk protocol implementation. --- dlls/urlmon/mk.c | 137 ++++++++++++++++++++++++++++++++++++++--- dlls/urlmon/tests/protocol.c | 30 +++++++++- 2 files changed, 156 insertions(+), 11 deletions(-) diff --git a/dlls/urlmon/mk.c b/dlls/urlmon/mk.c index a11e40f..3ee4329 100644 --- a/dlls/urlmon/mk.c +++ b/dlls/urlmon/mk.c @@ -28,12 +28,16 @@ #include "urlmon_main.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { const IInternetProtocolVtbl *lpInternetProtocolVtbl; + LONG ref; + + IStream *stream; } MkProtocol; #define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, InternetProtocol, iface) @@ -81,6 +85,9 @@ static ULONG WINAPI MkProtocol_Release(I TRACE("(%p) ref=%d\n", This, ref); if(!ref) { + if(This->stream) + IStream_Release(This->stream); + HeapFree(GetProcessHeap(), 0, This); URLMON_UnlockModule(); @@ -89,14 +96,112 @@ static ULONG WINAPI MkProtocol_Release(I return ref; } +static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres, DWORD dwError) +{ + IInternetProtocolSink_ReportResult(sink, hres, dwError, NULL); + return hres; +} + static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, DWORD dwReserved) { MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink, + IParseDisplayName *pdn; + IMoniker *mon; + LPWSTR mime, progid, display_name; + LPCWSTR ptr, ptr2; + BINDINFO bindinfo; + STATSTG statstg; + DWORD bindf=0, eaten=0, len; + CLSID clsid; + HRESULT hres; + + static const WCHAR wszMK[] = {'m','k',':'}; + + TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); - return E_NOTIMPL; + + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = sizeof(BINDINFO); + hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &bindinfo); + if(FAILED(hres)) { + WARN("GetBindInfo failed: %08x\n", hres); + return hres; + } + + ReleaseBindInfo(&bindinfo); + + if(strncmpiW(szUrl, wszMK, sizeof(wszMK)/sizeof(WCHAR))) + return MK_E_SYNTAX; + + IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DIRECTBIND, NULL); + IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, NULL); + + hres = FindMimeFromData(NULL, szUrl, NULL, 0, NULL, 0, &mime, 0); + if(SUCCEEDED(hres)) { + IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, mime); + CoTaskMemFree(mime); + } + + ptr2 = szUrl + sizeof(wszMK)/sizeof(WCHAR); + if(*ptr2 != '@') + return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + ptr2++; + + ptr = strchrW(ptr2, ':'); + if(!ptr) + return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + + progid = HeapAlloc(GetProcessHeap(), 0, (ptr-ptr2+1)*sizeof(WCHAR)); + memcpy(progid, ptr2, (ptr-ptr2)*sizeof(WCHAR)); + progid[ptr-ptr2] = 0; + hres = CLSIDFromProgID(progid, &clsid); + HeapFree(GetProcessHeap(), 0, progid); + if(FAILED(hres)) + return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + + hres = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IParseDisplayName, (void**)&pdn); + if(FAILED(hres)) { + WARN("Could not create object %s\n", debugstr_guid(&clsid)); + return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER); + } + + len = strlenW(--ptr2); + display_name = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)); + memcpy(display_name, ptr2, (len+1)*sizeof(WCHAR)); + hres = IParseDisplayName_ParseDisplayName(pdn, NULL /* FIXME */, display_name, &eaten, &mon); + HeapFree(GetProcessHeap(), 0, display_name); + IParseDisplayName_Release(pdn); + if(FAILED(hres)) { + WARN("ParseDisplayName failed: %08x\n", hres); + return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER); + } + + if(This->stream) { + IStream_Release(This->stream); + This->stream = NULL; + } + + hres = IMoniker_BindToStorage(mon, NULL /* FIXME */, NULL, &IID_IStream, (void**)&This->stream); + IMoniker_Release(mon); + if(FAILED(hres)) { + WARN("BindToStorage failed: %08x\n", hres); + return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER); + } + + hres = IStream_Stat(This->stream, &statstg, STATFLAG_NONAME); + if(FAILED(hres)) { + WARN("Stat failed: %08x\n", hres); + return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER); + } + + IInternetProtocolSink_ReportData(pOIProtSink, + BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, + statstg.cbSize.u.LowPart, statstg.cbSize.u.LowPart); + + return report_result(pOIProtSink, S_OK, ERROR_SUCCESS); } static HRESULT WINAPI MkProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData) @@ -117,8 +222,10 @@ static HRESULT WINAPI MkProtocol_Abort(I static HRESULT WINAPI MkProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) { MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%08x)\n", This, dwOptions); - return E_NOTIMPL; + + TRACE("(%p)->(%08x)\n", This, dwOptions); + + return S_OK; } static HRESULT WINAPI MkProtocol_Suspend(IInternetProtocol *iface) @@ -139,8 +246,13 @@ static HRESULT WINAPI MkProtocol_Read(II ULONG cb, ULONG *pcbRead) { MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); - return E_NOTIMPL; + + TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); + + if(!This->stream) + return E_FAIL; + + return IStream_Read(This->stream, pv, cb, pcbRead); } static HRESULT WINAPI MkProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, @@ -154,15 +266,19 @@ static HRESULT WINAPI MkProtocol_Seek(II static HRESULT WINAPI MkProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) { MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%08x)\n", This, dwOptions); - return E_NOTIMPL; + + TRACE("(%p)->(%08x)\n", This, dwOptions); + + return S_OK; } static HRESULT WINAPI MkProtocol_UnlockRequest(IInternetProtocol *iface) { MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; + + TRACE("(%p)\n", This); + + return S_OK; } #undef PROTOCOL_THIS @@ -195,6 +311,7 @@ HRESULT MkProtocol_Construct(IUnknown *p ret->lpInternetProtocolVtbl = &MkProtocolVtbl; ret->ref = 1; + ret->stream = NULL; /* NOTE: * Native returns NULL ppobj and S_OK in CreateInstance if called with IID_IUnknown riid. diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index 221df9c..4551a89 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -86,7 +86,8 @@ static DWORD bindf = 0; static enum { FILE_TEST, - HTTP_TEST + HTTP_TEST, + MK_TEST } tested_protocol; static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) @@ -926,6 +927,12 @@ static void test_mk_protocol(void) IUnknown *unk; HRESULT hres; + static const WCHAR wrong_url1[] = {'t','e','s','t',':','@','M','S','I','T','S','t','o','r','e', + ':',':','/','t','e','s','t','.','h','t','m','l',0}; + static const WCHAR wrong_url2[] = {'m','k',':','/','t','e','s','t','.','h','t','m','l',0}; + + tested_protocol = MK_TEST; + hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); @@ -946,6 +953,27 @@ static void test_mk_protocol(void) IClassFactory_Release(factory); ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + SET_EXPECT(GetBindInfo); + hres = IInternetProtocol_Start(protocol, wrong_url1, &protocol_sink, &bind_info, 0, 0); + ok(hres == MK_E_SYNTAX, "Start failed: %08x, expected MK_E_SYNTAX\n", hres); + CHECK_CALLED(GetBindInfo); + + SET_EXPECT(GetBindInfo); + SET_EXPECT(ReportProgress_DIRECTBIND); + SET_EXPECT(ReportProgress_SENDINGREQUEST); + SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); + SET_EXPECT(ReportResult); + expect_hrResult = INET_E_RESOURCE_NOT_FOUND; + + hres = IInternetProtocol_Start(protocol, wrong_url2, &protocol_sink, &bind_info, 0, 0); + ok(hres == INET_E_RESOURCE_NOT_FOUND, "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND\n", hres); + + CHECK_CALLED(GetBindInfo); + CHECK_CALLED(ReportProgress_DIRECTBIND); + CHECK_CALLED(ReportProgress_SENDINGREQUEST); + CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); + CHECK_CALLED(ReportResult); + IInternetProtocol_Release(protocol); }
1
0
0
0
Bill Medland : odbccp32: Implement SQLGet/SetConfigMode.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: c4a7c821f1c0eda8304c0287af52c18d42747046 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4a7c821f1c0eda8304c0287a…
Author: Bill Medland <billmedland(a)shaw.ca> Date: Fri Jan 12 12:48:17 2007 -0800 odbccp32: Implement SQLGet/SetConfigMode. --- dlls/odbccp32/odbccp32.c | 28 +++++++++++++++++++++------- dlls/odbccp32/tests/misc.c | 28 ++++++++++++++++++++++++++++ include/odbcinst.h | 5 +++++ 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index eab71cc..44957a2 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -36,9 +36,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(odbc); -/* Registry key namess */ +/* Registry key names */ static const WCHAR drivers_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','O','D','B','C','I','N','S','T','.','I','N','I','\\','O','D','B','C',' ','D','r','i','v','e','r','s',0}; +/* This config mode is known to be process-wide. + * MSDN documentation suggests that the value is hidden somewhere in the registry but I haven't found it yet. + * Although both the registry and the ODBC.ini files appear to be maintained together they are not maintained automatically through the registry's IniFileMapping. + */ +static UWORD config_mode = ODBC_BOTH_DSN; + /* MSDN documentation suggests that the error subsystem handles errors 1 to 8 * only and experimentation (Windows 2000) shows that the errors are process- * wide so go for the simple solution; static arrays. @@ -50,6 +56,7 @@ static const WCHAR odbc_error_general_er static const WCHAR odbc_error_invalid_buff_len[] = {'I','n','v','a','l','i','d',' ','b','u','f','f','e','r',' ','l','e','n','g','t','h',0}; static const WCHAR odbc_error_component_not_found[] = {'C','o','m','p','o','n','e','n','t',' ','n','o','t',' ','f','o','u','n','d',0}; static const WCHAR odbc_error_out_of_mem[] = {'O','u','t',' ','o','f',' ','m','e','m','o','r','y',0}; +static const WCHAR odbc_error_invalid_param_sequence[] = {'I','n','v','a','l','i','d',' ','p','a','r','a','m','e','t','e','r',' ','s','e','q','u','e','n','c','e',0}; /* Push an error onto the error stack, taking care of ranges etc. */ static void push_error(int code, LPCWSTR msg) @@ -264,9 +271,9 @@ BOOL WINAPI SQLGetAvailableDrivers(LPCST BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode) { clear_errors(); - FIXME("\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + if (pwConfigMode) + *pwConfigMode = config_mode; + return TRUE; } /* This is implemented sensibly rather than according to exact conformance to Microsoft's buggy implementations @@ -886,9 +893,16 @@ BOOL WINAPI SQLRemoveTranslator(LPCSTR l BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode) { clear_errors(); - FIXME("\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + if (wConfigMode > ODBC_SYSTEM_DSN) + { + push_error(ODBC_ERROR_INVALID_PARAM_SEQUENCE, odbc_error_invalid_param_sequence); + return FALSE; + } + else + { + config_mode = wConfigMode; + return TRUE; + } } BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN) diff --git a/dlls/odbccp32/tests/misc.c b/dlls/odbccp32/tests/misc.c index 0a949a6..20ba1cc 100644 --- a/dlls/odbccp32/tests/misc.c +++ b/dlls/odbccp32/tests/misc.c @@ -23,6 +23,33 @@ #include "winbase.h" #include "odbcinst.h" +static void test_SQLConfigMode(void) +{ + BOOL bool_ret; + DWORD error_code; + RETCODE sql_ret; + UWORD config_mode; + int i; + + ok(SQLGetConfigMode(NULL), "SQLGetConfigMode(NULL) should succeed\n"); + + bool_ret = SQLGetConfigMode(&config_mode); + ok(bool_ret && config_mode == ODBC_BOTH_DSN, "Failed to get the initial SQLGetConfigMode or it was not both\n"); + + bool_ret = SQLSetConfigMode(3); + sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); + ok(!bool_ret && sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_PARAM_SEQUENCE, "SQLSetConfigMode with invalid argument did not fail correctly"); + + ok (ODBC_SYSTEM_DSN == 2 && ODBC_USER_DSN == 1 && ODBC_BOTH_DSN == 0, "SQLSetConfigMode modes not as expected\n"); + for (i = ODBC_SYSTEM_DSN; i >= ODBC_BOTH_DSN; --i) + { + ok(SQLSetConfigMode((UWORD)i), "SQLSetConfigMode Failed to set config mode\n"); + bool_ret = SQLGetConfigMode(&config_mode); + ok(bool_ret && config_mode == i, "Failed to confirm SQLSetConfigMode.\n"); + } + /* And that leaves it correctly on BOTH */ +} + static void test_SQLInstallerError(void) { RETCODE sql_ret; @@ -49,5 +76,6 @@ static void test_SQLInstallerError(void) START_TEST(misc) { + test_SQLConfigMode(); test_SQLInstallerError(); } diff --git a/include/odbcinst.h b/include/odbcinst.h index 430f83c..f377197 100644 --- a/include/odbcinst.h +++ b/include/odbcinst.h @@ -34,6 +34,11 @@ extern "C" { #define ODBC_CONFIG_DRIVER 3 #define ODBC_CONFIG_DRIVER_MAX 100 +/* Mode values for SQLSetConfigMode/SQLGetConfigMode */ +#define ODBC_BOTH_DSN 0 +#define ODBC_USER_DSN 1 +#define ODBC_SYSTEM_DSN 2 + /* error values */ #define ODBC_ERROR_GENERAL_ERR 1 #define ODBC_ERROR_INVALID_BUFF_LEN 2
1
0
0
0
Alexandre Julliard : server: Set the specified in/ out buffer sizes on named pipes using SO_SND/RCVBUF.
by Alexandre Julliard
15 Jan '07
15 Jan '07
Module: wine Branch: master Commit: 1db223954fa96abbc04e5ff6766eafa9603e669b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1db223954fa96abbc04e5ff67…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 12 20:59:22 2007 +0100 server: Set the specified in/out buffer sizes on named pipes using SO_SND/RCVBUF. --- dlls/kernel32/tests/pipe.c | 22 ++++++++++++++++++++++ server/named_pipe.c | 11 +++++++++++ 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index c0d0abe..6da65a0 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -754,6 +754,8 @@ static void test_CreatePipe(void) HANDLE piperead, pipewrite; DWORD written; DWORD read; + DWORD i, size; + BYTE *buffer; char readbuf[32]; pipe_attr.nLength = sizeof(SECURITY_ATTRIBUTES); @@ -764,6 +766,8 @@ static void test_CreatePipe(void) ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %d bytes\n", written); ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL), "Read from non empty pipe failed\n"); ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); + ok(CloseHandle(pipewrite), "CloseHandle for the write pipe failed\n"); + ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); /* Now write another chunk*/ ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, 0) != 0, "CreatePipe failed\n"); @@ -775,6 +779,24 @@ static void test_CreatePipe(void) ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); /* But now we need to get informed that the pipe is closed */ ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); + ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); + + /* Try bigger chunks */ + size = 32768; + buffer = HeapAlloc( GetProcessHeap(), 0, size ); + for (i = 0; i < size; i++) buffer[i] = i; + ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, size) != 0, "CreatePipe failed\n"); + ok(WriteFile(pipewrite, buffer, size, &written, NULL), "Write to anonymous pipe failed\n"); + ok(written == size, "Write to anonymous pipe wrote %d bytes\n", written); + /* and close the write end, read should still succeed*/ + ok(CloseHandle(pipewrite), "CloseHandle for the Write Pipe failed\n"); + memset( buffer, 0, size ); + ok(ReadFile(piperead, buffer, size, &read, NULL), "Read from broken pipe withe with pending data failed\n"); + ok(read == size, "Read from anonymous pipe got %d bytes\n", read); + for (i = 0; i < size; i++) ok( buffer[i] == (BYTE)i, "invalid data %x at %x\n", buffer[i], i ); + /* But now we need to get informed that the pipe is closed */ + ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); + ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); } START_TEST(pipe) diff --git a/server/named_pipe.c b/server/named_pipe.c index 9077c58..173290f 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -776,6 +776,17 @@ DECL_HANDLER(open_named_pipe) if ((res != -1) && is_overlapped( server->options )) res = fcntl( fds[0], F_SETFL, O_NONBLOCK ); + if (pipe->insize) + { + setsockopt( fds[0], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) ); + setsockopt( fds[1], SOL_SOCKET, SO_RCVBUF, &pipe->insize, sizeof(pipe->insize) ); + } + if (pipe->outsize) + { + setsockopt( fds[0], SOL_SOCKET, SO_SNDBUF, &pipe->outsize, sizeof(pipe->outsize) ); + setsockopt( fds[1], SOL_SOCKET, SO_SNDBUF, &pipe->outsize, sizeof(pipe->outsize) ); + } + client->fd = create_anonymous_fd( &pipe_client_fd_ops, fds[1], &client->obj ); server->fd = create_anonymous_fd( &pipe_server_fd_ops,
1
0
0
0
Andrew Talbot : msrle32: Declare some functions static.
by Alexandre Julliard
12 Jan '07
12 Jan '07
Module: wine Branch: master Commit: ba313be7b286fcc115bf821b1ec4ccbe207f35f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba313be7b286fcc115bf821b1…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Fri Jan 12 17:25:44 2007 +0000 msrle32: Declare some functions static. --- dlls/msrle32/msrle32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msrle32/msrle32.c b/dlls/msrle32/msrle32.c index 96a0807..5decd74 100644 --- a/dlls/msrle32/msrle32.c +++ b/dlls/msrle32/msrle32.c @@ -38,12 +38,12 @@ static HINSTANCE MSRLE32_hModule = 0; #define SQR(a) ((a) * (a)) #define QUALITY_to_DIST(q) (ICQUALITY_HIGH - q) -inline WORD ColorCmp(WORD clr1, WORD clr2) +static inline WORD ColorCmp(WORD clr1, WORD clr2) { register UINT a = (clr1-clr2); return SQR(a); } -inline WORD Intensity(RGBQUAD clr) +static inline WORD Intensity(RGBQUAD clr) { return (30 * clr.rgbRed + 59 * clr.rgbGreen + 11 * clr.rgbBlue)/4; }
1
0
0
0
Andrew Talbot : msi: Declare some functions static.
by Alexandre Julliard
12 Jan '07
12 Jan '07
Module: wine Branch: master Commit: 020bda7ee277086eb8a228f88e3ef54a08c33d05 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=020bda7ee277086eb8a228f88…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Fri Jan 12 16:47:57 2007 +0000 msi: Declare some functions static. --- dlls/msi/action.c | 4 ++-- dlls/msi/events.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a90a81a..83ba416 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1931,7 +1931,7 @@ static UINT ITERATE_CostFinalizeConditio return ERROR_SUCCESS; } -LPWSTR msi_get_disk_file_version( LPCWSTR filename ) +static LPWSTR msi_get_disk_file_version( LPCWSTR filename ) { static const WCHAR name_fmt[] = {'%','u','.','%','u','.','%','u','.','%','u',0}; @@ -3869,7 +3869,7 @@ static UINT ACTION_ForceReboot(MSIPACKAG return ERROR_INSTALL_SUSPEND; } -UINT msi_set_sourcedir_props(MSIPACKAGE *package) +static UINT msi_set_sourcedir_props(MSIPACKAGE *package) { LPWSTR p, source; DWORD len; diff --git a/dlls/msi/events.c b/dlls/msi/events.c index c946512..4ddab41 100644 --- a/dlls/msi/events.c +++ b/dlls/msi/events.c @@ -53,7 +53,7 @@ struct subscriber { LPWSTR attribute; }; -UINT ControlEvent_HandleControlEvent(MSIPACKAGE *, LPCWSTR, LPCWSTR, msi_dialog*); +static UINT ControlEvent_HandleControlEvent(MSIPACKAGE *, LPCWSTR, LPCWSTR, msi_dialog*); static VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog); /*
1
0
0
0
Andrew Talbot : msi: Remove unused variables.
by Alexandre Julliard
12 Jan '07
12 Jan '07
Module: wine Branch: master Commit: e5938d6fbb0baf8a9b9d37017a262d57e4270426 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5938d6fbb0baf8a9b9d37017…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Fri Jan 12 16:47:21 2007 +0000 msi: Remove unused variables. --- dlls/msi/registry.c | 22 ---------------------- dlls/msi/table.c | 1 - dlls/msi/tokenize.c | 9 --------- 3 files changed, 0 insertions(+), 32 deletions(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index bb50ae0..1aa1303 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -107,14 +107,6 @@ static const WCHAR szUserProduct_fmt[] = 'P','r','o','d','u','c','t','s','\\', '%','s',0}; -static const WCHAR szInstaller_Products[] = { -'S','o','f','t','w','a','r','e','\\', -'M','i','c','r','o','s','o','f','t','\\', -'W','i','n','d','o','w','s','\\', -'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', -'I','n','s','t','a','l','l','e','r','\\', -'P','r','o','d','u','c','t','s',0}; - static const WCHAR szInstaller_Products_fmt[] = { 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', @@ -124,14 +116,6 @@ static const WCHAR szInstaller_Products_ 'P','r','o','d','u','c','t','s','\\', '%','s',0}; -static const WCHAR szInstaller_UpgradeCodes[] = { -'S','o','f','t','w','a','r','e','\\', -'M','i','c','r','o','s','o','f','t','\\', -'W','i','n','d','o','w','s','\\', -'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', -'I','n','s','t','a','l','l','e','r','\\', -'U','p','g','r','a','d','e','C','o','d','e','s',0}; - static const WCHAR szInstaller_UpgradeCodes_fmt[] = { 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', @@ -141,12 +125,6 @@ static const WCHAR szInstaller_UpgradeCo 'U','p','g','r','a','d','e','C','o','d','e','s','\\', '%','s',0}; -static const WCHAR szInstaller_UserUpgradeCodes[] = { -'S','o','f','t','w','a','r','e','\\', -'M','i','c','r','o','s','o','f','t','\\', -'I','n','s','t','a','l','l','e','r','\\', -'U','p','g','r','a','d','e','C','o','d','e','s',0}; - static const WCHAR szInstaller_UserUpgradeCodes_fmt[] = { 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 014c453..dd611d2 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -860,7 +860,6 @@ static const WCHAR szTables[] = { '_',' static const WCHAR szTable[] = { 'T','a','b','l','e',0 }; static const WCHAR szName[] = { 'N','a','m','e',0 }; static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 }; -static const WCHAR szColumn[] = { 'C','o','l','u','m','n',0 }; static const WCHAR szNumber[] = { 'N','u','m','b','e','r',0 }; static const WCHAR szType[] = { 'T','y','p','e',0 }; diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c index 5a5172b..14bcaf2 100644 --- a/dlls/msi/tokenize.c +++ b/dlls/msi/tokenize.c @@ -44,40 +44,31 @@ static const WCHAR BY_W[] = { 'B','Y',0 static const WCHAR CHAR_W[] = { 'C','H','A','R',0 }; static const WCHAR CHARACTER_W[] = { 'C','H','A','R','A','C','T','E','R',0 }; static const WCHAR CREATE_W[] = { 'C','R','E','A','T','E',0 }; -static const WCHAR CROSS_W[] = { 'C','R','O','S','S',0 }; static const WCHAR DELETE_W[] = { 'D','E','L','E','T','E',0 }; static const WCHAR DISTINCT_W[] = { 'D','I','S','T','I','N','C','T',0 }; static const WCHAR FREE_W[] = { 'F','R','E','E',0 }; static const WCHAR FROM_W[] = { 'F','R','O','M',0 }; -static const WCHAR FULL_W[] = { 'F','U','L','L',0 }; static const WCHAR HOLD_W[] = { 'H','O','L','D',0 }; -static const WCHAR INNER_W[] = { 'I','N','N','E','R',0 }; static const WCHAR INSERT_W[] = { 'I','N','S','E','R','T',0 }; static const WCHAR INT_W[] = { 'I','N','T',0 }; static const WCHAR INTEGER_W[] = { 'I','N','T','E','G','E','R',0 }; static const WCHAR INTO_W[] = { 'I','N','T','O',0 }; static const WCHAR IS_W[] = { 'I','S',0 }; -static const WCHAR JOIN_W[] = { 'J','O','I','N',0 }; static const WCHAR KEY_W[] = { 'K','E','Y',0 }; -static const WCHAR LEFT_W[] = { 'L','E','F','T',0 }; static const WCHAR LIKE_W[] = { 'L','I','K','E',0 }; static const WCHAR LOCALIZABLE_W[] = { 'L','O','C','A','L','I','Z','A','B','L','E',0 }; static const WCHAR LONG_W[] = { 'L','O','N','G',0 }; static const WCHAR LONGCHAR_W[] = { 'L','O','N','G','C','H','A','R',0 }; -static const WCHAR NATURAL_W[] = { 'N','A','T','U','R','A','L',0 }; static const WCHAR NOT_W[] = { 'N','O','T',0 }; static const WCHAR NULL_W[] = { 'N','U','L','L',0 }; static const WCHAR OBJECT_W[] = { 'O','B','J','E','C','T',0 }; static const WCHAR OR_W[] = { 'O','R',0 }; static const WCHAR ORDER_W[] = { 'O','R','D','E','R',0 }; -static const WCHAR OUTER_W[] = { 'O','U','T','E','R',0 }; static const WCHAR PRIMARY_W[] = { 'P','R','I','M','A','R','Y',0 }; -static const WCHAR RIGHT_W[] = { 'R','I','G','H','T',0 }; static const WCHAR SELECT_W[] = { 'S','E','L','E','C','T',0 }; static const WCHAR SET_W[] = { 'S','E','T',0 }; static const WCHAR SHORT_W[] = { 'S','H','O','R','T',0 }; static const WCHAR TABLE_W[] = { 'T','A','B','L','E',0 }; -static const WCHAR TEMP_W[] = { 'T','E','M','P',0 }; static const WCHAR TEMPORARY_W[] = { 'T','E','M','P','O','R','A','R','Y',0 }; static const WCHAR UPDATE_W[] = { 'U','P','D','A','T','E',0 }; static const WCHAR VALUES_W[] = { 'V','A','L','U','E','S',0 };
1
0
0
0
Bill Medland : odbccp32: Remove A->W cross-call.
by Alexandre Julliard
12 Jan '07
12 Jan '07
Module: wine Branch: master Commit: 68d30e9a168b17ac5f2799a1e5fd16fcaae2f5a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68d30e9a168b17ac5f2799a1e…
Author: Bill Medland <billmedland(a)shaw.ca> Date: Fri Jan 12 07:12:57 2007 -0800 odbccp32: Remove A->W cross-call. --- dlls/odbccp32/odbccp32.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index 8575b0d..eab71cc 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -36,6 +36,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(odbc); +/* Registry key namess */ +static const WCHAR drivers_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','O','D','B','C','I','N','S','T','.','I','N','I','\\','O','D','B','C',' ','D','r','i','v','e','r','s',0}; + /* MSDN documentation suggests that the error subsystem handles errors 1 to 8 * only and experimentation (Windows 2000) shows that the errors are process- * wide so go for the simple solution; static arrays. @@ -282,8 +285,8 @@ BOOL WINAPI SQLGetInstalledDriversW(LPWS { push_error(ODBC_ERROR_INVALID_BUFF_LEN, odbc_error_invalid_buff_len); } - else if ((reg_ret = RegOpenKeyExA (HKEY_LOCAL_MACHINE /* The drivers does not depend on the config mode */, - "Software\\ODBC\\ODBCINST.INI\\ODBC Drivers", 0, KEY_READ /* Maybe overkill */, + else if ((reg_ret = RegOpenKeyExW (HKEY_LOCAL_MACHINE /* The drivers does not depend on the config mode */, + drivers_key, 0, KEY_READ /* Maybe overkill */, &hDrivers)) == ERROR_SUCCESS) { DWORD index = 0;
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
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