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
July
June
May
April
March
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
November 2011
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
2 participants
852 discussions
Start a n
N
ew thread
Piotr Caban : msvcp90: Added empty locale constructor and destructor implementation.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: a3c395b7918f3d5f6110ec40a7d9edb30d29e174 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3c395b7918f3d5f6110ec40a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Nov 23 16:14:11 2011 +0100 msvcp90: Added empty locale constructor and destructor implementation. --- dlls/msvcp90/locale.c | 17 +++++++++++++---- dlls/msvcp90/msvcp90.h | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index ad6c44b..f05cc79 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -491,8 +491,16 @@ locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized) DEFINE_THISCALL_WRAPPER(locale_ctor, 4) locale* __thiscall locale_ctor(locale *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); + if(!this->ptr) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + return NULL; + } + + locale__Locimp_ctor(this->ptr); + return this; } /* ??1locale@std@@QAE@XZ */ @@ -500,13 +508,14 @@ locale* __thiscall locale_ctor(locale *this) DEFINE_THISCALL_WRAPPER(locale_dtor, 4) void __thiscall locale_dtor(locale *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + locale__Locimp_dtor(this->ptr); } DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8) locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags) { - TRACE("(%p %x) stub\n", this, flags); + TRACE("(%p %x)\n", this, flags); if(flags & 2) { /* we have an array, with the number of elements stored before the first object */ int i, *ptr = (int *)this-1; diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index b9000a4..cb2a9b8 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -195,7 +195,7 @@ MSVCP_size_t __stdcall MSVCP_allocator_wchar_max_size(void*); /* class locale */ typedef struct { - struct locale__Locimp *ptr; + struct _locale__Locimp *ptr; } locale; locale* __thiscall locale_ctor(locale*);
1
0
0
0
Piotr Caban : msvcp90: Added partial locale::_Locimp implementation.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: b7b0c1b18ba2df0fc99e8d1fe885d82d8ab2b3e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7b0c1b18ba2df0fc99e8d1fe…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Nov 23 16:13:46 2011 +0100 msvcp90: Added partial locale::_Locimp implementation. --- dlls/msvcp90/locale.c | 119 ++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 98 insertions(+), 21 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 6ebfb51..ad6c44b 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -115,6 +115,25 @@ locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsi static const vtable_ptr MSVCP_locale_facet_vtable[] = { (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor) }; +#ifdef __i386__ +static inline locale_facet* call_locale_facet_vector_dtor(locale_facet *this, unsigned int flags) +{ + locale_facet *ret; + void *dummy; + + __asm__ __volatile__ ("pushl %3\n\tcall *%2" + : "=a" (ret), "=c" (dummy) + : "r" (this->vtable[0]), "r" (flags), "1" (this) + : "edx", "memory" ); + return ret; +} +#else +static inline locale_facet* call_locale_facet_vector_dtor(locale_facet *this, unsigned int flags) +{ + locale_facet * (__thiscall *dtor)(locale_facet *, unsigned int) = (void *)this->vtable[0]; + return dtor(this, flags); +} +#endif /* ??0id@locale@std@@QAE@I@Z */ /* ??0id@locale@std@@QEAA@_K@Z */ @@ -214,7 +233,7 @@ locale_facet* __thiscall locale_facet__Decref(locale_facet *this) if(this->refs) this->refs--; - ret = this->refs ? this : NULL; + ret = this->refs ? NULL : this; _Lockit_dtor(&lock); return ret; @@ -228,22 +247,26 @@ MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const loca return -1; } -/* ??_F_Locimp@locale@std@@QAEXXZ */ -/* ??_F_Locimp@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4) -locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this) -{ - FIXME("(%p) stub\n", this); - return NULL; -} - /* ??0_Locimp@locale@std@@AAE@_N@Z */ /* ??0_Locimp@locale@std@@AEAA@_N@Z */ DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8) locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent) { - FIXME("(%p %d) stub\n", this, transparent); - return NULL; + TRACE("(%p %d)\n", this, transparent); + + memset(this, 0, sizeof(locale__Locimp)); + locale_facet_ctor_refs(&this->facet, 1); + this->transparent = transparent; + MSVCP_basic_string_char_ctor_cstr(&this->name, "*"); + return this; +} + +/* ??_F_Locimp@locale@std@@QAEXXZ */ +/* ??_F_Locimp@locale@std@@QEAAXXZ */ +DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4) +locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this) +{ + return locale__Locimp_ctor_transparent(this, FALSE); } /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */ @@ -251,16 +274,32 @@ locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8) locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy) { - FIXME("(%p %p) stub\n", this, copy); - return NULL; + MSVCP_size_t i; + + TRACE("(%p %p)\n", this, copy); + + memcpy(this, copy, sizeof(locale__Locimp)); + locale_facet_ctor_refs(&this->facet, 1); + if(copy->facetvec) { + this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*)); + if(!this->facetvec) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + return NULL; + } + for(i=0; i<this->facet_cnt; i++) + if(this->facetvec[i]) + locale_facet__Incref(this->facetvec[i]); + } + MSVCP_basic_string_char_copy_ctor(&this->name, ©->name); + return this; } /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */ /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */ locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy) { - FIXME("(%p %p) stub\n", this, copy); - return NULL; + return locale__Locimp_copy_ctor(this, copy); } /* ??1_Locimp@locale@std@@MAE@XZ */ @@ -268,20 +307,30 @@ locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4) void __thiscall locale__Locimp_dtor(locale__Locimp *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + + if(locale_facet__Decref(&this->facet)) { + MSVCP_size_t i; + for(i=0; i<this->facet_cnt; i++) + if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i])) + call_locale_facet_vector_dtor(this->facetvec[i], 0); + + MSVCRT_operator_delete(this->facetvec); + MSVCP_basic_string_char_dtor(&this->name); + } } /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */ /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */ void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this) { - FIXME("(%p) stub\n", this); + locale__Locimp_dtor(this); } DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8) locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags) { - TRACE("(%p %x) stub\n", this, flags); + TRACE("(%p %x)\n", this, flags); if(flags & 2) { /* we have an array, with the number of elements stored before the first object */ int i, *ptr = (int *)this-1; @@ -302,7 +351,35 @@ locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */ void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id) { - FIXME("(%p %p %lu) stub\n", locimp, facet, id); + TRACE("(%p %p %lu)\n", locimp, facet, id); + + if(id >= locimp->facet_cnt) { + MSVCP_size_t new_size = id+1; + locale_facet **new_facetvec; + + if(new_size < locale_id__Id_cnt+1) + new_size = locale_id__Id_cnt+1; + + new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size); + if(!new_facetvec) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + return; + } + + memset(new_facetvec, 0, sizeof(locale_facet*)*new_size); + memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt); + MSVCRT_operator_delete(locimp->facetvec); + locimp->facetvec = new_facetvec; + locimp->facet_cnt = new_size; + } + + if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id])) + call_locale_facet_vector_dtor(locimp->facetvec[id], 0); + + locimp->facetvec[id] = facet; + if(facet) + locale_facet__Incref(facet); } /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */ @@ -310,7 +387,7 @@ void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12) void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id) { - FIXME("(%p %p %lu) stub\n", this, facet, id); + locale__Locimp__Locimp_Addfac(this, facet, id); } /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
1
0
0
0
Bernhard Loos : winedevice: A driver path can also start with \systemroot\.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: 6840a9273c92875c551e669b00d48c2944b3ef0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6840a9273c92875c551e669b0…
Author: Bernhard Loos <bernhardloos(a)googlemail.com> Date: Wed Nov 23 13:12:31 2011 +0100 winedevice: A driver path can also start with \systemroot\. --- programs/winedevice/device.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 2ce8c15..e48218e 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -170,6 +170,7 @@ static NTSTATUS init_driver( HMODULE module, UNICODE_STRING *keyname ) static BOOL load_driver(void) { static const WCHAR driversW[] = {'\\','d','r','i','v','e','r','s','\\',0}; + static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t','\\',0}; static const WCHAR postfixW[] = {'.','s','y','s',0}; static const WCHAR ntprefixW[] = {'\\','?','?','\\',0}; static const WCHAR ImagePathW[] = {'I','m','a','g','e','P','a','t','h',0}; @@ -209,6 +210,24 @@ static BOOL load_driver(void) } HeapFree( GetProcessHeap(), 0, str ); if (!path) return FALSE; + + if (!strncmpiW( path, systemrootW, 12 )) + { + WCHAR buffer[MAX_PATH]; + + GetWindowsDirectoryW(buffer, MAX_PATH); + + str = HeapAlloc(GetProcessHeap(), 0, (size -11 + strlenW(buffer)) + * sizeof(WCHAR)); + lstrcpyW(str, buffer); + lstrcatW(str, path + 11); + HeapFree( GetProcessHeap(), 0, path ); + path = str; + } + else if (!strncmpW( path, ntprefixW, 4 )) + str = path + 4; + else + str = path; } else { @@ -222,12 +241,9 @@ static BOOL load_driver(void) lstrcatW(path, driversW); lstrcatW(path, driver_name); lstrcatW(path, postfixW); + str = path; } - /* GameGuard uses an NT-style path name */ - str = path; - if (!strncmpW( path, ntprefixW, 4 )) str += 4; - WINE_TRACE( "loading driver %s\n", wine_dbgstr_w(str) ); module = load_driver_module( str );
1
0
0
0
Andy Clayton : wininet: Avoid calling HTTP_ReceiveRequestData before reading headers.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: da11075000d7acf4ba3e4a32e03442a4578e2442 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da11075000d7acf4ba3e4a32e…
Author: Andy Clayton <q3aiml(a)gmail.com> Date: Wed Nov 23 08:45:44 2011 -0600 wininet: Avoid calling HTTP_ReceiveRequestData before reading headers. --- dlls/wininet/http.c | 2 +- dlls/wininet/tests/http.c | 90 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 69 insertions(+), 23 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 16f550c..5d6fdd0 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -4936,7 +4936,7 @@ lend: if (request->session->appInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) { if (res == ERROR_SUCCESS) { - if(request->contentLength && request->bytesWritten == request->bytesToWrite) + if(bEndRequest && request->contentLength && request->bytesWritten == request->bytesToWrite) HTTP_ReceiveRequestData(request, TRUE); else send_request_complete(request, diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 881f1e6..7c6d97c 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -3245,7 +3245,8 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW return; } - while (info->test[i].status != status && info->test[i].optional && + while (info->test[i].status != status && + (info->test[i].optional || info->test[i].todo) && i < info->count - 1 && info->test[i].function == info->test[i + 1].function) { @@ -3282,6 +3283,13 @@ static void setup_test( struct info *info, enum api function, unsigned int line info->line = line; } +struct notification_data +{ + const struct notification *test; + const unsigned int count; + const char *data; +}; + static const struct notification async_send_request_ex_test[] = { { internet_connect, INTERNET_STATUS_HANDLE_CREATED, 0 }, @@ -3305,7 +3313,40 @@ static const struct notification async_send_request_ex_test[] = { internet_close_handle, INTERNET_STATUS_HANDLE_CLOSING, 0, } }; -static void test_async_HttpSendRequestEx(void) +static const struct notification async_send_request_ex_test2[] = +{ + { internet_connect, INTERNET_STATUS_HANDLE_CREATED, 0 }, + { http_open_request, INTERNET_STATUS_HANDLE_CREATED, 0 }, + { http_send_request_ex, INTERNET_STATUS_DETECTING_PROXY, 1, 0, 1 }, + { http_send_request_ex, INTERNET_STATUS_RESOLVING_NAME, 1, 0, 1 }, + { http_send_request_ex, INTERNET_STATUS_NAME_RESOLVED, 1, 0, 1 }, + { http_send_request_ex, INTERNET_STATUS_CONNECTING_TO_SERVER, 1, 1 }, + { http_send_request_ex, INTERNET_STATUS_CONNECTED_TO_SERVER, 1, 1 }, + { http_send_request_ex, INTERNET_STATUS_SENDING_REQUEST, 1 }, + { http_send_request_ex, INTERNET_STATUS_REQUEST_SENT, 1 }, + { http_send_request_ex, INTERNET_STATUS_REQUEST_COMPLETE, 1 }, + { http_end_request, INTERNET_STATUS_RECEIVING_RESPONSE, 1 }, + { http_end_request, INTERNET_STATUS_RESPONSE_RECEIVED, 1 }, + { http_end_request, INTERNET_STATUS_REQUEST_COMPLETE, 1 }, + { internet_close_handle, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0, 1 }, + { internet_close_handle, INTERNET_STATUS_CONNECTION_CLOSED, 0, 0, 1 }, + { internet_close_handle, INTERNET_STATUS_HANDLE_CLOSING, 0, }, + { internet_close_handle, INTERNET_STATUS_HANDLE_CLOSING, 0, } +}; + +static const struct notification_data notification_data[] = { + { + async_send_request_ex_test, + sizeof(async_send_request_ex_test)/sizeof(async_send_request_ex_test[0]), + "Public ID=codeweavers" + }, + { + async_send_request_ex_test2, + sizeof(async_send_request_ex_test)/sizeof(async_send_request_ex_test[0]) + }, +}; + +static void test_async_HttpSendRequestEx(const struct notification_data *nd) { BOOL ret; HINTERNET ses, req, con; @@ -3313,13 +3354,14 @@ static void test_async_HttpSendRequestEx(void) DWORD size, written, error; INTERNET_BUFFERSA b; static const char *accept[2] = {"*/*", NULL}; - static char data[] = "Public ID=codeweavers"; char buffer[32]; + trace("\n"); + InitializeCriticalSection( ¬ification_cs ); - info.test = async_send_request_ex_test; - info.count = sizeof(async_send_request_ex_test)/sizeof(async_send_request_ex_test[0]); + info.test = nd->test; + info.count = nd->count; info.index = 0; info.wait = CreateEvent( NULL, FALSE, FALSE, NULL ); info.thread = GetCurrentThreadId(); @@ -3345,10 +3387,10 @@ static void test_async_HttpSendRequestEx(void) b.dwStructSize = sizeof(INTERNET_BUFFERSA); b.lpcszHeader = "Content-Type: application/x-www-form-urlencoded"; b.dwHeadersLength = strlen( b.lpcszHeader ); - b.dwBufferTotal = strlen( data ); + b.dwBufferTotal = nd->data ? strlen( nd->data ) : 0; setup_test( &info, http_send_request_ex, __LINE__ ); - ret = HttpSendRequestExA( req, &b, NULL, 0x28, 0 ); + ret = HttpSendRequestExA( req, nd->data ? &b : NULL, NULL, 0x28, 0 ); ok( !ret && GetLastError() == ERROR_IO_PENDING, "HttpSendRequestExA failed %d %u\n", ret, GetLastError() ); WaitForSingleObject( info.wait, 10000 ); @@ -3362,20 +3404,23 @@ static void test_async_HttpSendRequestEx(void) ok( error == ERROR_INTERNET_INCORRECT_HANDLE_STATE, "expected ERROR_INTERNET_INCORRECT_HANDLE_STATE got %u\n", error ); - written = 0; - size = strlen( data ); - setup_test( &info, internet_writefile, __LINE__ ); - ret = InternetWriteFile( req, data, size, &written ); - ok( ret, "InternetWriteFile failed %u\n", GetLastError() ); - ok( written == size, "expected %u got %u\n", written, size ); - - WaitForSingleObject( info.wait, 10000 ); - - SetLastError( 0xdeadbeef ); - ret = HttpEndRequestA( req, (void *)data, 0x28, 0 ); - error = GetLastError(); - ok( !ret, "HttpEndRequestA succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error ); + if (nd->data) + { + written = 0; + size = strlen( nd->data ); + setup_test( &info, internet_writefile, __LINE__ ); + ret = InternetWriteFile( req, nd->data, size, &written ); + ok( ret, "InternetWriteFile failed %u\n", GetLastError() ); + ok( written == size, "expected %u got %u\n", written, size ); + + WaitForSingleObject( info.wait, 10000 ); + + SetLastError( 0xdeadbeef ); + ret = HttpEndRequestA( req, (void *)nd->data, 0x28, 0 ); + error = GetLastError(); + ok( !ret, "HttpEndRequestA succeeded\n" ); + ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error ); + } SetLastError( 0xdeadbeef ); setup_test( &info, http_end_request, __LINE__ ); @@ -3524,7 +3569,8 @@ START_TEST(http) InternetReadFile_test(0, &test_data[2]); InternetReadFileExA_test(INTERNET_FLAG_ASYNC); test_open_url_async(); - test_async_HttpSendRequestEx(); + test_async_HttpSendRequestEx(¬ification_data[0]); + test_async_HttpSendRequestEx(¬ification_data[1]); InternetOpenRequest_test(); test_http_cache(); InternetOpenUrlA_test();
1
0
0
0
Jacek Caban : mshtml: Added IMutable::SetMutable implementation.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: e034ddee5e7846ffb4d07e79d33e13f61300b5c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e034ddee5e7846ffb4d07e79d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 23 16:19:42 2011 +0100 mshtml: Added IMutable::SetMutable implementation. --- dlls/mshtml/nsio.c | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index faf40ed..251c4b2 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -66,6 +66,7 @@ struct nsWineURI { IUri *uri; IUriBuilder *uri_builder; BOOL is_doc_uri; + BOOL is_mutable; }; static BOOL ensure_uri(nsWineURI *This) @@ -1656,6 +1657,11 @@ static void invalidate_uri(nsWineURI *This) static BOOL ensure_uri_builder(nsWineURI *This) { + if(!This->is_mutable) { + WARN("Not mutable URI\n"); + return FALSE; + } + if(!This->uri_builder) { HRESULT hres; @@ -1792,6 +1798,9 @@ static nsresult NSAPI nsURI_SetSpec(nsIURL *iface, const nsACString *aSpec) TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aSpec)); + if(!This->is_mutable) + return NS_ERROR_UNEXPECTED; + nsACString_GetData(aSpec, &speca); spec = heap_strdupAtoW(speca); if(!spec) @@ -2473,6 +2482,9 @@ static nsresult NSAPI nsURL_SetFilePath(nsIURL *iface, const nsACString *aFilePa TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aFilePath)); + if(!This->is_mutable) + return NS_ERROR_UNEXPECTED; + return nsIURL_SetPath(&This->nsIURL_iface, aFilePath); } @@ -2595,6 +2607,9 @@ static nsresult NSAPI nsURL_SetFileName(nsIURL *iface, const nsACString *aFileNa TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aFileName)); + if(!This->is_mutable) + return NS_ERROR_UNEXPECTED; + if(This->nsurl) { invalidate_uri(This); return nsIURL_SetFileName(This->nsurl, aFileName); @@ -2623,6 +2638,9 @@ static nsresult NSAPI nsURL_SetFileBaseName(nsIURL *iface, const nsACString *aFi TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aFileBaseName)); + if(!This->is_mutable) + return NS_ERROR_UNEXPECTED; + if(This->nsurl) { invalidate_uri(This); return nsIURL_SetFileBaseName(This->nsurl, aFileBaseName); @@ -2647,6 +2665,9 @@ static nsresult NSAPI nsURL_SetFileExtension(nsIURL *iface, const nsACString *aF TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aFileExtension)); + if(!This->is_mutable) + return NS_ERROR_UNEXPECTED; + if(This->nsurl) { invalidate_uri(This); return nsIURL_SetFileExtension(This->nsurl, aFileExtension); @@ -2766,15 +2787,18 @@ static nsresult NSAPI nsStandardURL_GetMutable(nsIStandardURL *iface, PRBool *aM TRACE("(%p)->(%p)\n", This, aMutable); - *aMutable = TRUE; + *aMutable = This->is_mutable; return NS_OK; } static nsresult NSAPI nsStandardURL_SetMutable(nsIStandardURL *iface, PRBool aMutable) { nsWineURI *This = impl_from_nsIStandardURL(iface); - FIXME("(%p)->(%x)\n", This, aMutable); - return NS_ERROR_NOT_IMPLEMENTED; + + TRACE("(%p)->(%x)\n", This, aMutable); + + This->is_mutable = aMutable; + return NS_OK; } static nsresult NSAPI nsStandardURL_Init(nsIStandardURL *iface, PRUint32 aUrlType, PRInt32 aDefaultPort, @@ -2802,6 +2826,7 @@ static nsresult create_nsuri(IUri *iuri, nsIURI *nsuri, HTMLWindow *window, NSCo ret->nsIStandardURL_iface.lpVtbl = &nsStandardURLVtbl; ret->ref = 1; ret->nsuri = nsuri; + ret->is_mutable = TRUE; set_uri_nscontainer(ret, container); set_uri_window(ret, window);
1
0
0
0
Jacek Caban : mshtml: Use codepage reported by http headers.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: 42d98d2a3ed5b04b6e1cddabbe9ef7926a320103 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42d98d2a3ed5b04b6e1cddabb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 23 16:19:05 2011 +0100 mshtml: Use codepage reported by http headers. --- dlls/mshtml/navigate.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 71 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index fe0d4c6..2d8bcd8 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -626,6 +626,57 @@ static void call_docview_84(HTMLDocumentObj *doc) FIXME("handle result\n"); } +static void parse_content_type(nsChannelBSC *This, const WCHAR *value) +{ + const WCHAR *ptr; + size_t len; + + static const WCHAR charsetW[] = {'c','h','a','r','s','e','t','='}; + + ptr = strchrW(value, ';'); + if(!ptr) + return; + + ptr++; + while(*ptr && isspaceW(*ptr)) + ptr++; + + len = strlenW(value); + if(ptr + sizeof(charsetW)/sizeof(WCHAR) < value+len && !memicmpW(ptr, charsetW, sizeof(charsetW)/sizeof(WCHAR))) { + size_t charset_len, lena; + nsACString charset_str; + const WCHAR *charset; + char *charseta; + + ptr += sizeof(charsetW)/sizeof(WCHAR); + + if(*ptr == '\'') { + FIXME("Quoted value\n"); + return; + }else { + charset = ptr; + while(*ptr && *ptr != ',') + ptr++; + charset_len = ptr-charset; + } + + lena = WideCharToMultiByte(CP_ACP, 0, charset, charset_len, NULL, 0, NULL, NULL); + charseta = heap_alloc(lena+1); + if(!charseta) + return; + + WideCharToMultiByte(CP_ACP, 0, charset, charset_len, charseta, lena, NULL, NULL); + charseta[lena] = 0; + + nsACString_InitDepend(&charset_str, charseta); + nsIHttpChannel_SetContentCharset(&This->nschannel->nsIHttpChannel_iface, &charset_str); + nsACString_Finish(&charset_str); + heap_free(charseta); + }else { + FIXME("unhandled: %s\n", debugstr_wn(ptr, len - (ptr-value))); + } +} + static HRESULT parse_headers(const WCHAR *headers, struct list *headers_list) { const WCHAR *header, *header_end, *colon, *value; @@ -659,6 +710,25 @@ static HRESULT parse_headers(const WCHAR *headers, struct list *headers_list) return S_OK; } +static HRESULT process_response_headers(nsChannelBSC *This, const WCHAR *headers) +{ + http_header_t *iter; + HRESULT hres; + + static const WCHAR content_typeW[] = {'c','o','n','t','e','n','t','-','t','y','p','e',0}; + + hres = parse_headers(headers, &This->nschannel->response_headers); + if(FAILED(hres)) + return hres; + + LIST_FOR_EACH_ENTRY(iter, &This->nschannel->response_headers, http_header_t, entry) { + if(!strcmpiW(iter->header, content_typeW)) + parse_content_type(This, iter->data); + } + + return S_OK; +} + HRESULT start_binding(HTMLWindow *window, HTMLDocumentNode *doc, BSCallback *bscallback, IBindCtx *bctx) { IStream *str = NULL; @@ -1471,7 +1541,7 @@ static HRESULT nsChannelBSC_on_response(BSCallback *bsc, DWORD response_code, headers = strchrW(response_headers, '\r'); if(headers && headers[1] == '\n') { headers += 2; - hres = parse_headers(headers, &This->nschannel->response_headers); + hres = process_response_headers(This, headers); if(FAILED(hres)) { WARN("parsing headers failed: %08x\n", hres); return hres;
1
0
0
0
Jacek Caban : mshtml: Added nsIChannel::SetContentCharset implementation.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: 3a3daead74927c1871d0dac4bf1df75a8d1ea4dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a3daead74927c1871d0dac4b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 23 16:18:53 2011 +0100 mshtml: Added nsIChannel::SetContentCharset implementation. --- dlls/mshtml/nsio.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 59f9c2f..faf40ed 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -802,10 +802,19 @@ static nsresult NSAPI nsChannel_SetContentCharset(nsIHttpChannel *iface, const nsACString *aContentCharset) { nsChannel *This = impl_from_nsIHttpChannel(iface); + const char *data; + char *charset; - FIXME("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset)); + TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aContentCharset)); - return NS_ERROR_NOT_IMPLEMENTED; + nsACString_GetData(aContentCharset, &data); + charset = heap_strdupA(data); + if(!charset) + return NS_ERROR_OUT_OF_MEMORY; + + heap_free(This->charset); + This->charset = charset; + return NS_OK; } static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, PRInt32 *aContentLength)
1
0
0
0
Jacek Caban : mshtml: Use IUri for IHTMLLocation:: get_hostname implementation.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: dd61c7953ee83b61bfb438425136e05f2914c660 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd61c7953ee83b61bfb438425…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 23 15:30:06 2011 +0100 mshtml: Use IUri for IHTMLLocation::get_hostname implementation. --- dlls/mshtml/htmllocation.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index cf591d7..b3354f0 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -359,7 +359,7 @@ static HRESULT WINAPI HTMLLocation_put_hostname(IHTMLLocation *iface, BSTR v) static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p) { HTMLLocation *This = impl_from_IHTMLLocation(iface); - URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)}; + BSTR hostname; HRESULT hres; TRACE("(%p)->(%p)\n", This, p); @@ -367,19 +367,21 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p) if(!p) return E_POINTER; - url.dwHostNameLength = 1; - hres = get_url_components(This, &url); - if(FAILED(hres)) - return hres; + if(!This->window || !This->window->uri) { + FIXME("No current URI\n"); + return E_NOTIMPL; + } - if(!url.dwHostNameLength){ + hres = IUri_GetHost(This->window->uri, &hostname); + if(hres == S_OK) { + *p = hostname; + }else if(hres == S_FALSE) { + SysFreeString(hostname); *p = NULL; - return S_OK; + }else { + return hres; } - *p = SysAllocStringLen(url.lpszHostName, url.dwHostNameLength); - if(!*p) - return E_OUTOFMEMORY; return S_OK; }
1
0
0
0
Piotr Caban : msvcrt: Keep FILE critical section initialized after closing file.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: 3fe5e6ee8a89cce691144e0a3d501be43d09c566 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3fe5e6ee8a89cce691144e0a3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Nov 23 12:32:45 2011 +0100 msvcrt: Keep FILE critical section initialized after closing file. --- dlls/msvcrt/file.c | 35 ++++++++++++++++------------------- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index c636e85..7a034d3 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -362,7 +362,12 @@ static MSVCRT_FILE* msvcrt_alloc_fp(void) if (file->_flag == 0) { - if (i == MSVCRT_stream_idx) MSVCRT_stream_idx++; + if (i == MSVCRT_stream_idx) + { + InitializeCriticalSection(&((file_crit*)file)->crit); + ((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit"); + MSVCRT_stream_idx++; + } return file; } } @@ -385,12 +390,6 @@ static int msvcrt_init_fp(MSVCRT_FILE* file, int fd, unsigned stream_flags) file->_file = fd; file->_flag = stream_flags; - if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES) - { - InitializeCriticalSection(&((file_crit*)file)->crit); - ((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit"); - } - TRACE(":got FILE* (%p)\n",file); return 0; } @@ -985,6 +984,16 @@ void msvcrt_free_io(void) for(i=0; i<sizeof(MSVCRT___pioinfo)/sizeof(MSVCRT___pioinfo[0]); i++) MSVCRT_free(MSVCRT___pioinfo[i]); + for(i=0; i<MSVCRT_stream_idx; i++) + { + MSVCRT_FILE *file = msvcrt_get_file(i); + if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES) + { + ((file_crit*)file)->crit.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&((file_crit*)file)->crit); + } + } + for(i=0; i<sizeof(MSVCRT_fstream)/sizeof(MSVCRT_fstream[0]); i++) MSVCRT_free(MSVCRT_fstream[i]); @@ -2607,18 +2616,6 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file) file->_flag = 0; MSVCRT__unlock_file(file); - if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES) - { - ((file_crit*)file)->crit.DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&((file_crit*)file)->crit); - } - - if(file == msvcrt_get_file(MSVCRT_stream_idx-1)) { - while(MSVCRT_stream_idx>3 && !file->_flag) { - MSVCRT_stream_idx--; - file = msvcrt_get_file(MSVCRT_stream_idx-1); - } - } return ((r == -1) || (flag & MSVCRT__IOERR) ? MSVCRT_EOF : 0); }
1
0
0
0
Dmitry Timoshkov : ntdll: Revert 33b0f0edffa0c8a06b4ee8831c92fdc373f83ece.
by Alexandre Julliard
23 Nov '11
23 Nov '11
Module: wine Branch: master Commit: 517d0800df64239df484d231063d3fdace1abead URL:
http://source.winehq.org/git/wine.git/?a=commit;h=517d0800df64239df484d2310…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 22 18:03:22 2011 +0800 ntdll: Revert 33b0f0edffa0c8a06b4ee8831c92fdc373f83ece. The tests clearly show that this commit is wrong. --- dlls/kernel32/tests/loader.c | 10 ---------- dlls/ntdll/virtual.c | 8 +------- 2 files changed, 1 insertions(+), 17 deletions(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 3bc7540..2af7cc5 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -691,11 +691,6 @@ static void test_section_access(void) "%d: VirtualQuery error %d\n", i, GetLastError()); ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - /* FIXME: remove the condition below once Wine is fixed */ - if ((td[i].scn_file_access & IMAGE_SCN_MEM_WRITE) && - (td[i].scn_file_access & IMAGE_SCN_CNT_UNINITIALIZED_DATA)) - todo_wine ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); - else ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); @@ -735,11 +730,6 @@ static void test_section_access(void) "%d: VirtualQuery error %d\n", i, GetLastError()); ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - /* FIXME: remove the condition below once Wine is fixed */ - if ((td[i].scn_file_access & IMAGE_SCN_MEM_WRITE) && - (td[i].scn_file_access & IMAGE_SCN_CNT_UNINITIALIZED_DATA)) - todo_wine ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); - else ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index fb8786f..9853628 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1345,14 +1345,8 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz size = ROUND_SIZE( sec->VirtualAddress, sec->SizeOfRawData ); if (sec->Characteristics & IMAGE_SCN_MEM_READ) vprot |= VPROT_READ; + if (sec->Characteristics & IMAGE_SCN_MEM_WRITE) vprot |= VPROT_WRITECOPY; if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC; - if (sec->Characteristics & IMAGE_SCN_MEM_WRITE) - { - if (sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) - vprot |= VPROT_WRITE; - else - vprot |= VPROT_WRITECOPY; - } /* Dumb game crack lets the AOEP point into a data section. Adjust. */ if ((nt->OptionalHeader.AddressOfEntryPoint >= sec->VirtualAddress) &&
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
86
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
Results per page:
10
25
50
100
200