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
December 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
3 participants
824 discussions
Start a n
N
ew thread
Michael Stefaniuc : localspl: Rename the wrappers around HeapAlloc() &Co to use the standard names.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 39c260e9fa6d707aeffbf9f5a4a18d9f93c3450e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39c260e9fa6d707aeffbf9f5a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 9 16:30:24 2007 +0100 localspl: Rename the wrappers around HeapAlloc() &Co to use the standard names. --- dlls/localspl/localmon.c | 18 +++++++++--------- dlls/localspl/localspl_private.h | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c index 9e31684..8f5f7af 100644 --- a/dlls/localspl/localmon.c +++ b/dlls/localspl/localmon.c @@ -143,7 +143,7 @@ static BOOL does_port_exist(LPCWSTR myname) TRACE("(%s)\n", debugstr_w(myname)); id = EnumPortsW(NULL, 1, NULL, 0, &needed, &returned); - pi = spl_alloc(needed); + pi = heap_alloc(needed); returned = 0; if (pi) id = EnumPortsW(NULL, 1, (LPBYTE) pi, needed, &needed, &returned); @@ -154,13 +154,13 @@ static BOOL does_port_exist(LPCWSTR myname) { if (lstrcmpiW(myname, pi[id].pName) == 0) { TRACE("(%u) found %s\n", id, debugstr_w(pi[id].pName)); - spl_free(pi); + heap_free(pi); return TRUE; } } } - spl_free(pi); + heap_free(pi); return FALSE; } @@ -332,7 +332,7 @@ static DWORD get_type_from_local_name(LPCWSTR nameW) TRACE("(%s)\n", debugstr_w(myname)); needed = get_ports_from_reg(1, NULL, 0, &numentries); - pi = spl_alloc(needed); + pi = heap_alloc(needed); if (pi) needed = get_ports_from_reg(1, (LPBYTE) pi, needed, &numentries); @@ -351,7 +351,7 @@ static DWORD get_type_from_local_name(LPCWSTR nameW) id = (myname) ? get_type_from_name(myname) : PORT_IS_UNKNOWN; - spl_free(pi); + heap_free(pi); return id; } @@ -433,7 +433,7 @@ static BOOL WINAPI localmon_ClosePort(HANDLE hPort) EnterCriticalSection(&port_handles_cs); list_remove(&port->entry); LeaveCriticalSection(&port_handles_cs); - spl_free(port); + heap_free(port); return TRUE; } @@ -526,7 +526,7 @@ static BOOL WINAPI localmon_OpenPortW(LPWSTR pName, PHANDLE phPort) if (!type) return FALSE; len = (lstrlenW(pName) + 1) * sizeof(WCHAR); - port = spl_alloc(sizeof(port_t) + len); + port = heap_alloc(sizeof(port_t) + len); if (!port) return FALSE; port->type = type; @@ -563,7 +563,7 @@ static BOOL WINAPI localmon_XcvClosePort(HANDLE hXcv) EnterCriticalSection(&xcv_handles_cs); list_remove(&xcv->entry); LeaveCriticalSection(&xcv_handles_cs); - spl_free(xcv); + heap_free(xcv); return TRUE; } @@ -740,7 +740,7 @@ static BOOL WINAPI localmon_XcvOpenPort(LPCWSTR pName, ACCESS_MASK GrantedAccess TRACE("%s, 0x%x, %p)\n", debugstr_w(pName), GrantedAccess, phXcv); /* No checks for any field is done in Windows */ len = (lstrlenW(pName) + 1) * sizeof(WCHAR); - xcv = spl_alloc( sizeof(xcv_t) + len); + xcv = heap_alloc( sizeof(xcv_t) + len); if (xcv) { xcv->GrantedAccess = GrantedAccess; memcpy(&xcv->nameW, pName, len); diff --git a/dlls/localspl/localspl_private.h b/dlls/localspl/localspl_private.h index 461f50c..7d76429 100644 --- a/dlls/localspl/localspl_private.h +++ b/dlls/localspl/localspl_private.h @@ -49,14 +49,14 @@ extern HINSTANCE LOCALSPL_hInstance; #define PORT_IS_LPR 8 -/* ## Memory allocation macros ## */ +/* ## Memory allocation functions ## */ -static inline void *spl_alloc( size_t len ) +static inline void *heap_alloc( size_t len ) { return HeapAlloc( GetProcessHeap(), 0, len ); } -static inline BOOL spl_free( void *mem ) +static inline BOOL heap_free( void *mem ) { return HeapFree( GetProcessHeap(), 0, mem ); }
1
0
0
0
Michael Stefaniuc : pdh: Rename the wrappers around HeapAlloc() &Co to use the standard names.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 2c80b9d2d24002f987ba572b83f34a6159d03a80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c80b9d2d24002f987ba572b8…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 9 16:30:15 2007 +0100 pdh: Rename the wrappers around HeapAlloc() &Co to use the standard names. --- dlls/pdh/pdh_main.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index 69c12df..a7aa21b 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -47,17 +47,17 @@ static CRITICAL_SECTION_DEBUG pdh_handle_cs_debug = }; static CRITICAL_SECTION pdh_handle_cs = { &pdh_handle_cs_debug, -1, 0, 0, 0, 0 }; -static inline void *pdh_alloc( SIZE_T size ) +static inline void *heap_alloc( SIZE_T size ) { return HeapAlloc( GetProcessHeap(), 0, size ); } -static inline void *pdh_alloc_zero( SIZE_T size ) +static inline void *heap_alloc_zero( SIZE_T size ) { return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size ); } -static inline void pdh_free( LPVOID mem ) +static inline void heap_free( LPVOID mem ) { HeapFree( GetProcessHeap(), 0, mem ); } @@ -67,7 +67,7 @@ static inline WCHAR *pdh_strdup( const WCHAR *src ) WCHAR *dst; if (!src) return NULL; - if ((dst = pdh_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src ); + if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src ); return dst; } @@ -78,7 +78,7 @@ static inline WCHAR *pdh_strdup_aw( const char *src ) if (!src) return NULL; len = MultiByteToWideChar( CP_ACP, 0, src, -1, NULL, 0 ); - if ((dst = pdh_alloc( len * sizeof(WCHAR) ))) MultiByteToWideChar( CP_ACP, 0, src, -1, dst, len ); + if ((dst = heap_alloc( len * sizeof(WCHAR) ))) MultiByteToWideChar( CP_ACP, 0, src, -1, dst, len ); return dst; } @@ -127,7 +127,7 @@ static struct counter *create_counter( void ) { struct counter *counter; - if ((counter = pdh_alloc_zero( sizeof(struct counter) ))) + if ((counter = heap_alloc_zero( sizeof(struct counter) ))) { counter->magic = PDH_MAGIC_COUNTER; return counter; @@ -138,8 +138,8 @@ static struct counter *create_counter( void ) static void destroy_counter( struct counter *counter ) { counter->magic = 0; - pdh_free( counter->path ); - pdh_free( counter ); + heap_free( counter->path ); + heap_free( counter ); } #define PDH_MAGIC_QUERY 0x50444830 /* 'PDH0' */ @@ -159,7 +159,7 @@ static struct query *create_query( void ) { struct query *query; - if ((query = pdh_alloc_zero( sizeof(struct query) ))) + if ((query = heap_alloc_zero( sizeof(struct query) ))) { query->magic = PDH_MAGIC_QUERY; list_init( &query->counters ); @@ -171,7 +171,7 @@ static struct query *create_query( void ) static void destroy_query( struct query *query ) { query->magic = 0; - pdh_free( query ); + heap_free( query ); } struct source @@ -244,7 +244,7 @@ PDH_STATUS WINAPI PdhAddCounterA( PDH_HQUERY query, LPCSTR path, ret = PdhAddCounterW( query, pathW, userdata, counter ); - pdh_free( pathW ); + heap_free( pathW ); return ret; } @@ -795,7 +795,7 @@ PDH_STATUS WINAPI PdhLookupPerfIndexByNameA( LPCSTR machine, LPCSTR name, LPDWOR ret = PdhLookupPerfIndexByNameW( NULL, nameW, index ); - pdh_free( nameW ); + heap_free( nameW ); return ret; } @@ -909,7 +909,7 @@ PDH_STATUS WINAPI PdhOpenQueryA( LPCSTR source, DWORD_PTR userdata, PDH_HQUERY * if (source && !(sourceW = pdh_strdup_aw( source ))) return PDH_MEMORY_ALLOCATION_FAILURE; ret = PdhOpenQueryW( sourceW, userdata, query ); - pdh_free( sourceW ); + heap_free( sourceW ); return ret; } @@ -1005,7 +1005,7 @@ PDH_STATUS WINAPI PdhValidatePathA( LPCSTR path ) ret = PdhValidatePathW( pathW ); - pdh_free( pathW ); + heap_free( pathW ); return ret; }
1
0
0
0
Michael Stefaniuc : iccvid: Rename the wrappers around HeapAlloc() &Co to use the standard names.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: d9873e23146147dcf2b230884c188534d4015670 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9873e23146147dcf2b230884…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 9 16:30:07 2007 +0100 iccvid: Rename the wrappers around HeapAlloc() &Co to use the standard names. --- dlls/iccvid/iccvid.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c index a34e58c..3d1be34 100644 --- a/dlls/iccvid/iccvid.c +++ b/dlls/iccvid/iccvid.c @@ -82,12 +82,12 @@ typedef struct _ICCVID_Info cinepak_info *cvinfo; } ICCVID_Info; -static inline LPVOID ICCVID_Alloc( size_t size, size_t count ) +static inline LPVOID heap_alloc( size_t size ) { - return HeapAlloc( GetProcessHeap(), 0, size*count ); + return HeapAlloc( GetProcessHeap(), 0, size ); } -static inline BOOL ICCVID_Free( LPVOID ptr ) +static inline BOOL heap_free( LPVOID ptr ) { return HeapFree( GetProcessHeap(), 0, ptr ); } @@ -338,7 +338,7 @@ static cinepak_info *decode_cinepak_init(void) cinepak_info *cvinfo; int i; - cvinfo = ICCVID_Alloc( sizeof (cinepak_info), 1 ); + cvinfo = heap_alloc( sizeof (cinepak_info) ); if( !cvinfo ) return NULL; cvinfo->strip_num = 0; @@ -359,10 +359,10 @@ static void free_cvinfo( cinepak_info *cvinfo ) for( i=0; i<cvinfo->strip_num; i++ ) { - ICCVID_Free(cvinfo->v4_codebook[i]); - ICCVID_Free(cvinfo->v1_codebook[i]); + heap_free(cvinfo->v4_codebook[i]); + heap_free(cvinfo->v1_codebook[i]); } - ICCVID_Free( cvinfo ); + heap_free( cvinfo ); } typedef void (*fn_cvid_v1)(unsigned char *frm, unsigned char *limit, @@ -457,13 +457,13 @@ static void decode_cinepak(cinepak_info *cvinfo, unsigned char *buf, int size, for(i = cvinfo->strip_num; i < strips; i++) { - if((cvinfo->v4_codebook[i] = ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) + if((cvinfo->v4_codebook[i] = heap_alloc(sizeof(cvid_codebook) * 260)) == NULL) { ERR("CVID: codebook v4 alloc err\n"); return; } - if((cvinfo->v1_codebook[i] = ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) + if((cvinfo->v1_codebook[i] = heap_alloc(sizeof(cvid_codebook) * 260)) == NULL) { ERR("CVID: codebook v1 alloc err\n"); return; @@ -918,7 +918,7 @@ static LRESULT ICCVID_Close( ICCVID_Info *info ) return 0; if( info->cvinfo ) free_cvinfo( info->cvinfo ); - ICCVID_Free( info ); + heap_free( info ); return 1; } @@ -978,7 +978,7 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, if (icinfo && icinfo->fccType != ICTYPE_VIDEO) return 0; - info = ICCVID_Alloc( sizeof (ICCVID_Info), 1 ); + info = heap_alloc( sizeof (ICCVID_Info) ); if( info ) { info->dwMagic = ICCVID_MAGIC;
1
0
0
0
Michael Stefaniuc : hhctrl.ocx: Rename the wrappers around HeapAlloc() &Co to use the standard names.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 7e8d79fa3d183944dbf8e0c0d03db2ed824e7d56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e8d79fa3d183944dbf8e0c0d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 9 16:29:44 2007 +0100 hhctrl.ocx: Rename the wrappers around HeapAlloc() &Co to use the standard names. --- dlls/hhctrl.ocx/chm.c | 28 ++++++++++++++-------------- dlls/hhctrl.ocx/content.c | 22 +++++++++++----------- dlls/hhctrl.ocx/help.c | 34 +++++++++++++++++----------------- dlls/hhctrl.ocx/hhctrl.c | 10 +++++----- dlls/hhctrl.ocx/hhctrl.h | 14 +++++++------- dlls/hhctrl.ocx/webbrowser.c | 6 +++--- 6 files changed, 57 insertions(+), 57 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7e8d79fa3d183944dbf8e…
1
0
0
0
Rob Shearman : rpcrt4: Add a missing break in DllMain.
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: 41937c57562a33e5721289b97801bddce9d2790e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41937c57562a33e5721289b97…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:14:30 2007 +0000 rpcrt4: Add a missing break in DllMain. --- dlls/rpcrt4/rpcrt4_main.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index d557664..d9efe9a 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -191,6 +191,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ERR("tdata->connection should be NULL but is still set to %p\n", tdata); HeapFree(GetProcessHeap(), 0, tdata); } + break; case DLL_PROCESS_DETACH: CloseHandle(master_mutex);
1
0
0
0
Rob Shearman : rpcrt4: Save the buffer in EmbeddedPointerMemorySize, like EmbeddedPointerUnmarshall does.
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: 417b9d80f27c3b03d5ef2282b0649d1cd02e75fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=417b9d80f27c3b03d5ef2282b…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:46:57 2007 +0000 rpcrt4: Save the buffer in EmbeddedPointerMemorySize, like EmbeddedPointerUnmarshall does. --- dlls/rpcrt4/ndr_marshall.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 6463a56..7578221 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1464,12 +1464,18 @@ static unsigned long EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Mark = pStubMsg->BufferMark; unsigned rep, count, stride; unsigned i; + unsigned char *saved_buffer = NULL; TRACE("(%p,%p)\n", pStubMsg, pFormat); if (pStubMsg->IgnoreEmbeddedPointers) return 0; - FIXME("(%p,%p): stub\n", pStubMsg, pFormat); + if (pStubMsg->PointerBufferMark) + { + saved_buffer = pStubMsg->Buffer; + pStubMsg->Buffer = pStubMsg->PointerBufferMark; + pStubMsg->PointerBufferMark = NULL; + } if (*pFormat != RPC_FC_PP) return 0; pFormat += 2; @@ -1509,6 +1515,12 @@ static unsigned long EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pFormat += 8 * count; } + if (saved_buffer) + { + pStubMsg->PointerBufferMark = pStubMsg->Buffer; + pStubMsg->Buffer = saved_buffer; + } + return 0; }
1
0
0
0
Rob Shearman : rpcrt4: Fix the return value from NdrSimpleStructMemorySize.
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: d7a0de303e2751183072e51b4a8231d43696b881 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7a0de303e2751183072e51b4…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:46:48 2007 +0000 rpcrt4: Fix the return value from NdrSimpleStructMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 17b84c4..6463a56 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1776,7 +1776,7 @@ ULONG WINAPI NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, if (pFormat[0] != RPC_FC_STRUCT) EmbeddedPointerMemorySize(pStubMsg, pFormat+4); - return size; + return pStubMsg->MemorySize; } /***********************************************************************
1
0
0
0
Rob Shearman : rpcrt4: Add a trace to NdrBaseTypeMemorySize.
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: 3a13de3115d042f9e4645f6961c10810df372f62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a13de3115d042f9e4645f696…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:46:41 2007 +0000 rpcrt4: Add a trace to NdrBaseTypeMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 77fed42..17b84c4 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -5667,6 +5667,8 @@ static ULONG WINAPI NdrBaseTypeMemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { + TRACE("pStubMsg %p, type 0x%02x\n", pStubMsg, *pFormat); + switch(*pFormat) { case RPC_FC_BYTE:
1
0
0
0
Rob Shearman : rpcrt4: Implement PointerMemorySize.
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: 7ae1d44816da8f8a1f026986b0f44e2053416786 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ae1d44816da8f8a1f026986b…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:46:34 2007 +0000 rpcrt4: Implement PointerMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 73bf08a..77fed42 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1126,8 +1126,10 @@ static unsigned long PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, unsigned type = pFormat[0], attr = pFormat[1]; PFORMAT_STRING desc; NDR_MEMORYSIZE m; + DWORD pointer_id = 0; + int pointer_needs_sizing; - FIXME("(%p,%p,%p): stub\n", pStubMsg, Buffer, pFormat); + TRACE("(%p,%p,%p)\n", pStubMsg, Buffer, pFormat); TRACE("type=0x%x, attr=", type); dump_pointer_attr(attr); pFormat += 2; if (attr & RPC_FC_P_SIMPLEPOINTER) desc = pFormat; @@ -1135,21 +1137,43 @@ static unsigned long PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, switch (type) { case RPC_FC_RP: /* ref pointer (always non-null) */ + pointer_needs_sizing = 1; + break; + case RPC_FC_UP: /* unique pointer */ + case RPC_FC_OP: /* object pointer - we must free data before overwriting it */ + pointer_id = NDR_LOCAL_UINT32_READ(Buffer); + TRACE("pointer_id is 0x%08x\n", pointer_id); + if (pointer_id) + pointer_needs_sizing = 1; + else + pointer_needs_sizing = 0; break; + case RPC_FC_FP: + { + void *pointer; + pointer_id = NDR_LOCAL_UINT32_READ(Buffer); + TRACE("pointer_id is 0x%08x\n", pointer_id); + pointer_needs_sizing = !NdrFullPointerQueryRefId( + pStubMsg->FullPtrXlatTables, pointer_id, 1, &pointer); + break; + } default: FIXME("unhandled ptr type=%02x\n", type); RpcRaiseException(RPC_X_BAD_STUB_DATA); + return 0; } if (attr & RPC_FC_P_DEREF) { TRACE("deref\n"); } - m = NdrMemorySizer[*desc & NDR_TABLE_MASK]; - if (m) m(pStubMsg, desc); - else FIXME("no memorysizer for data type=%02x\n", *desc); + if (pointer_needs_sizing) { + m = NdrMemorySizer[*desc & NDR_TABLE_MASK]; + if (m) m(pStubMsg, desc); + else FIXME("no memorysizer for data type=%02x\n", *desc); + } - return 0; + return pStubMsg->MemorySize; } /***********************************************************************
1
0
0
0
Rob Shearman : rpcrt4: Fix NdrConformantStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers .
by Alexandre Julliard
08 Dec '07
08 Dec '07
Module: wine Branch: master Commit: 8348f0413d398248c932b852087e2095b661105c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8348f0413d398248c932b8520…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sat Dec 8 17:14:24 2007 +0000 rpcrt4: Fix NdrConformantStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. --- dlls/rpcrt4/ndr_marshall.c | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 0a5bd9c..73bf08a 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -3457,6 +3457,7 @@ unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMs const NDR_CSTRUCT_FORMAT *pCStructFormat = (const NDR_CSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCArrayFormat; ULONG esize, bufsize; + unsigned char *saved_buffer; TRACE("(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc); @@ -3490,19 +3491,27 @@ unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMs pCStructFormat->memory_size, bufsize); RpcRaiseException(RPC_X_BAD_STUB_DATA); } - /* work out how much memory to allocate if we need to do so */ - if (!*ppMemory || fMustAlloc) + + if (fMustAlloc) { SIZE_T size = pCStructFormat->memory_size + bufsize; *ppMemory = NdrAllocate(pStubMsg, size); } + else + { + if (!pStubMsg->IsClient && !*ppMemory) + /* for servers, we just point straight into the RPC buffer */ + *ppMemory = pStubMsg->Buffer; + } - /* now copy the data */ - pStubMsg->BufferMark = pStubMsg->Buffer; - safe_copy_from_buffer(pStubMsg, *ppMemory, pCStructFormat->memory_size + bufsize); - + saved_buffer = pStubMsg->BufferMark = pStubMsg->Buffer; + safe_buffer_increment(pStubMsg, pCStructFormat->memory_size + bufsize); if (pCStructFormat->type == RPC_FC_CPSTRUCT) - EmbeddedPointerUnmarshall(pStubMsg, *ppMemory, *ppMemory, pFormat, TRUE /* FIXME */); + EmbeddedPointerUnmarshall(pStubMsg, saved_buffer, *ppMemory, pFormat, fMustAlloc); + + TRACE("copying %p to %p\n", saved_buffer, *ppMemory); + if (*ppMemory != saved_buffer) + memcpy(*ppMemory, saved_buffer, pCStructFormat->memory_size + bufsize); return NULL; }
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
83
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
Results per page:
10
25
50
100
200