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 2009
----- 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
1233 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Moved set_last_index call to do_regexp_match_next.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: c665b86cd00353eb1345dba792db95476213b6d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c665b86cd00353eb1345dba79…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 8 01:13:11 2009 +0100 jscript: Moved set_last_index call to do_regexp_match_next. --- dlls/jscript/regexp.c | 16 ++++++++-------- dlls/jscript/tests/regexp.js | 28 ++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index bcc1665..ff9807b 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -3301,6 +3301,13 @@ static inline RegExpInstance *regexp_from_vdisp(vdisp_t *vdisp) return (RegExpInstance*)vdisp->u.jsdisp; } +static void set_last_index(RegExpInstance *This, DWORD last_index) +{ + This->last_index = last_index; + VariantClear(&This->last_index_var); + num_set_val(&This->last_index_var, last_index); +} + static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, const WCHAR *str, DWORD len, const WCHAR **cp, match_result_t **parens, DWORD *parens_size, DWORD *parens_cnt, match_result_t *ret) { @@ -3363,6 +3370,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, c *cp = result->cp; ret->str = result->cp-matchlen; ret->len = matchlen; + set_last_index(regexp, result->cp-str); return S_OK; } @@ -3437,13 +3445,6 @@ HRESULT regexp_match(script_ctx_t *ctx, DispatchEx *dispex, const WCHAR *str, DW return S_OK; } -static void set_last_index(RegExpInstance *This, DWORD last_index) -{ - This->last_index = last_index; - VariantClear(&This->last_index_var); - num_set_val(&This->last_index_var, last_index); -} - static HRESULT RegExp_source(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { @@ -3657,7 +3658,6 @@ static HRESULT run_exec(script_ctx_t *ctx, vdisp_t *jsthis, VARIANT *arg, jsexce } if(hres == S_OK) { - set_last_index(regexp, cp-string); *ret = VARIANT_TRUE; }else { set_last_index(regexp, 0); diff --git a/dlls/jscript/tests/regexp.js b/dlls/jscript/tests/regexp.js index 9a14a93..c9066c6 100644 --- a/dlls/jscript/tests/regexp.js +++ b/dlls/jscript/tests/regexp.js @@ -96,10 +96,11 @@ ok(m[1] === "test", "m[1] = " + m[1]); b = /a*/.test(); ok(b === true, "/a*/.test() returned " + b); -m = "abcabc".match(/ca/); +m = "abcabc".match(re = /ca/); ok(typeof(m) === "object", "typeof m is not object"); ok(m.length === 1, "m.length is not 1"); ok(m["0"] === "ca", "m[0] is not \"ca\""); +ok(re.lastIndex === 4, "re.lastIndex = " + re.lastIndex); m = "abcabc".match(/ab/); ok(typeof(m) === "object", "typeof m is not object"); @@ -165,8 +166,9 @@ ok(m["0"] === "ab", "m[0] is not \"ab\""); m = "abcabc".match(); ok(m === null, "m is not null"); -r = "- [test] -".replace(/\[([^\[]+)\]/g, "success"); +r = "- [test] -".replace(re = /\[([^\[]+)\]/g, "success"); ok(r === "- success -", "r = " + r + " expected '- success -'"); +ok(re.lastIndex === 8, "re.lastIndex = " + re.lastIndex); r = "[test] [test]".replace(/\[([^\[]+)\]/g, "aa"); ok(r === "aa aa", "r = " + r + "aa aa"); @@ -285,6 +287,28 @@ ok(r.length === 2, "r.length = " + r.length); ok(r[0] === "1", "r[0] = " + r[0]); ok(r[1] === "2", "r[1] = " + r[1]); +re = /,+/; +r = "1,,2,".split(re); +ok(r.length === 2, "r.length = " + r.length); +ok(r[0] === "1", "r[0] = " + r[0]); +ok(r[1] === "2", "r[1] = " + r[1]); +ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); + +re = /,+/g; +r = "1,,2,".split(re); +ok(r.length === 2, "r.length = " + r.length); +ok(r[0] === "1", "r[0] = " + r[0]); +ok(r[1] === "2", "r[1] = " + r[1]); +ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); + +re = /,+/; +re.lastIndex = 4; +r = "1,,2,".split(re); +ok(r.length === 2, "r.length = " + r.length); +ok(r[0] === "1", "r[0] = " + r[0]); +ok(r[1] === "2", "r[1] = " + r[1]); +ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); + re = /abc[^d]/g; ok(re.source === "abc[^d]", "re.source = '" + re.source + "', expected 'abc[^d]'");
1
0
0
0
Juan Lang : inetmib1: Return SNMP_ERRORSTATUS_NOSUCHNAME for an interface' s physical address if it has none.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 91d62162da316f7a25781ea1a88460aa237a116b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91d62162da316f7a25781ea1a…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Dec 7 13:18:02 2009 -0800 inetmib1: Return SNMP_ERRORSTATUS_NOSUCHNAME for an interface's physical address if it has none. --- dlls/inetmib1/main.c | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c index 204c0e2..2a5f97a 100644 --- a/dlls/inetmib1/main.c +++ b/dlls/inetmib1/main.c @@ -553,13 +553,30 @@ static INT setOidWithItemAndInteger(AsnObjectIdentifier *dst, return ret; } +static DWORD copyIfRowPhysAddr(AsnAny *value, void *src) +{ + PMIB_IFROW row = (PMIB_IFROW)((BYTE *)src - + FIELD_OFFSET(MIB_IFROW, dwPhysAddrLen)); + DWORD ret; + + if (row->dwPhysAddrLen) + { + setStringValue(value, ASN_OCTETSTRING, row->dwPhysAddrLen, + row->bPhysAddr); + ret = SNMP_ERRORSTATUS_NOERROR; + } + else + ret = SNMP_ERRORSTATUS_NOSUCHNAME; + return ret; +} + static struct structToAsnValue mib2IfEntryMap[] = { { FIELD_OFFSET(MIB_IFROW, dwIndex), copyInt }, { FIELD_OFFSET(MIB_IFROW, dwDescrLen), copyLengthPrecededString }, { FIELD_OFFSET(MIB_IFROW, dwType), copyInt }, { FIELD_OFFSET(MIB_IFROW, dwMtu), copyInt }, { FIELD_OFFSET(MIB_IFROW, dwSpeed), copyInt }, - { FIELD_OFFSET(MIB_IFROW, dwPhysAddrLen), copyLengthPrecededString }, + { FIELD_OFFSET(MIB_IFROW, dwPhysAddrLen), copyIfRowPhysAddr }, { FIELD_OFFSET(MIB_IFROW, dwAdminStatus), copyInt }, { FIELD_OFFSET(MIB_IFROW, dwOperStatus), copyOperStatus }, { FIELD_OFFSET(MIB_IFROW, dwLastChange), copyInt },
1
0
0
0
Juan Lang : inetmib1: Return error value from MIB copy functions.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 632b759ffe1bd9727469177ed0335c16209a4acc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=632b759ffe1bd9727469177ed…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Dec 7 13:14:46 2009 -0800 inetmib1: Return error value from MIB copy functions. --- dlls/inetmib1/main.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c index 85e1708..204c0e2 100644 --- a/dlls/inetmib1/main.c +++ b/dlls/inetmib1/main.c @@ -32,10 +32,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetmib1); /** * Utility functions */ -static void copyInt(AsnAny *value, void *src) +static DWORD copyInt(AsnAny *value, void *src) { value->asnType = ASN_INTEGER; value->asnValue.number = *(DWORD *)src; + return SNMP_ERRORSTATUS_NOERROR; } static void setStringValue(AsnAny *value, BYTE type, DWORD len, BYTE *str) @@ -49,14 +50,15 @@ static void setStringValue(AsnAny *value, BYTE type, DWORD len, BYTE *str) SnmpUtilAsnAnyCpy(value, &strValue); } -static void copyLengthPrecededString(AsnAny *value, void *src) +static DWORD copyLengthPrecededString(AsnAny *value, void *src) { DWORD len = *(DWORD *)src; setStringValue(value, ASN_OCTETSTRING, len, (BYTE *)src + sizeof(DWORD)); + return SNMP_ERRORSTATUS_NOERROR; } -typedef void (*copyValueFunc)(AsnAny *value, void *src); +typedef DWORD (*copyValueFunc)(AsnAny *value, void *src); struct structToAsnValue { @@ -75,13 +77,13 @@ static AsnInteger32 mapStructEntryToValue(struct structToAsnValue *map, return SNMP_ERRORSTATUS_NOSUCHNAME; if (!map[id].copy) return SNMP_ERRORSTATUS_NOSUCHNAME; - map[id].copy(&pVarBind->value, (BYTE *)record + map[id].offset); - return SNMP_ERRORSTATUS_NOERROR; + return map[id].copy(&pVarBind->value, (BYTE *)record + map[id].offset); } -static void copyIpAddr(AsnAny *value, void *src) +static DWORD copyIpAddr(AsnAny *value, void *src) { setStringValue(value, ASN_IPADDRESS, sizeof(DWORD), src); + return SNMP_ERRORSTATUS_NOERROR; } static UINT mib2[] = { 1,3,6,1,2,1 }; @@ -168,7 +170,7 @@ static BOOL mib2IfNumberQuery(BYTE bPduType, SnmpVarBind *pVarBind, return ret; } -static void copyOperStatus(AsnAny *value, void *src) +static DWORD copyOperStatus(AsnAny *value, void *src) { value->asnType = ASN_INTEGER; /* The IPHlpApi definition of operational status differs from the MIB2 one, @@ -186,6 +188,7 @@ static void copyOperStatus(AsnAny *value, void *src) default: value->asnValue.number = MIB_IF_ADMIN_STATUS_DOWN; }; + return SNMP_ERRORSTATUS_NOERROR; } /* Given an OID and a base OID that it must begin with, finds the item and
1
0
0
0
Juan Lang : inetmib1: Don't claim a value is dynamic when it isn't.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 7060f8961a61483a96a3527ec249aad71558cdfc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7060f8961a61483a96a3527ec…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Dec 7 13:12:36 2009 -0800 inetmib1: Don't claim a value is dynamic when it isn't. --- dlls/inetmib1/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c index 1e56710..85e1708 100644 --- a/dlls/inetmib1/main.c +++ b/dlls/inetmib1/main.c @@ -45,7 +45,7 @@ static void setStringValue(AsnAny *value, BYTE type, DWORD len, BYTE *str) strValue.asnType = type; strValue.asnValue.string.stream = str; strValue.asnValue.string.length = len; - strValue.asnValue.string.dynamic = TRUE; + strValue.asnValue.string.dynamic = FALSE; SnmpUtilAsnAnyCpy(value, &strValue); }
1
0
0
0
Vincent Povirk : ole32: Use the storage vtable to read streams.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 62e54bacba086cf279936c28f75942c019b887cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62e54bacba086cf279936c28f…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 10:35:55 2009 -0600 ole32: Use the storage vtable to read streams. --- dlls/ole32/stg_stream.c | 58 ++++++---------------------------------- dlls/ole32/storage32.c | 67 +++++++++++++++++++++++++++++++++++++++++++++- dlls/ole32/storage32.h | 8 +++++ 3 files changed, 82 insertions(+), 51 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 6200126..0888180 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -264,7 +264,6 @@ static HRESULT WINAPI StgStreamImpl_Read( StgStreamImpl* const This=(StgStreamImpl*)iface; ULONG bytesReadBuffer; - ULONG bytesToReadFromBuffer; HRESULT res; TRACE("(%p, %p, %d, %p)\n", @@ -283,60 +282,21 @@ static HRESULT WINAPI StgStreamImpl_Read( if (pcbRead==0) pcbRead = &bytesReadBuffer; - /* - * Using the known size of the stream, calculate the number of bytes - * to read from the block chain - */ - bytesToReadFromBuffer = min( This->streamSize.u.LowPart - This->currentPosition.u.LowPart, cb); - - /* - * Depending on the type of chain that was opened when the stream was constructed, - * we delegate the work to the method that reads the block chains. - */ - if (This->smallBlockChain!=0) - { - res = SmallBlockChainStream_ReadAt(This->smallBlockChain, - This->currentPosition, - bytesToReadFromBuffer, - pv, - pcbRead); + res = StorageBaseImpl_StreamReadAt(This->parentStorage, + This->dirEntry, + This->currentPosition, + cb, + pv, + pcbRead); - } - else if (This->bigBlockChain!=0) - { - res = BlockChainStream_ReadAt(This->bigBlockChain, - This->currentPosition, - bytesToReadFromBuffer, - pv, - pcbRead); - } - else + if (SUCCEEDED(res)) { /* - * Small and big block chains are both NULL. This case will happen - * when a stream starts with BLOCK_END_OF_CHAIN and has size zero. + * Advance the pointer for the number of positions read. */ - - *pcbRead = 0; - res = S_OK; - goto end; - } - - if (SUCCEEDED(res)) - { - /* - * We should always be able to read the proper amount of data from the - * chain. - */ - assert(bytesToReadFromBuffer == *pcbRead); - - /* - * Advance the pointer for the number of positions read. - */ - This->currentPosition.u.LowPart += *pcbRead; + This->currentPosition.u.LowPart += *pcbRead; } -end: TRACE("<-- %08x\n", res); return res; } diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 53c2c87..0e5861d 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2192,6 +2192,60 @@ static HRESULT StorageImpl_BaseReadDirEntry(StorageBaseImpl *base, return StorageImpl_ReadDirEntry(This, index, data); } +static HRESULT StorageImpl_StreamReadAt(StorageBaseImpl *base, DirRef index, + ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead) +{ + StorageImpl *This = (StorageImpl*)base; + DirEntry data; + HRESULT hr; + ULONG bytesToRead; + + hr = StorageImpl_ReadDirEntry(This, index, &data); + if (FAILED(hr)) return hr; + + if (data.size.QuadPart == 0) + { + *bytesRead = 0; + return S_OK; + } + + if (offset.QuadPart + size > data.size.QuadPart) + { + bytesToRead = data.size.QuadPart - offset.QuadPart; + } + else + { + bytesToRead = size; + } + + if (data.size.QuadPart < LIMIT_TO_USE_SMALL_BLOCK) + { + SmallBlockChainStream *stream; + + stream = SmallBlockChainStream_Construct(This, NULL, index); + if (!stream) return E_OUTOFMEMORY; + + hr = SmallBlockChainStream_ReadAt(stream, offset, bytesToRead, buffer, bytesRead); + + SmallBlockChainStream_Destroy(stream); + + return hr; + } + else + { + BlockChainStream *stream; + + stream = BlockChainStream_Construct(This, NULL, index); + if (!stream) return E_OUTOFMEMORY; + + hr = BlockChainStream_ReadAt(stream, offset, bytesToRead, buffer, bytesRead); + + BlockChainStream_Destroy(stream); + + return hr; + } +} + /* * Virtual function table for the IStorage32Impl class. */ @@ -2223,7 +2277,8 @@ static const StorageBaseImplVtbl StorageImpl_BaseVtbl = StorageImpl_CreateDirEntry, StorageImpl_BaseWriteDirEntry, StorageImpl_BaseReadDirEntry, - StorageImpl_DestroyDirEntry + StorageImpl_DestroyDirEntry, + StorageImpl_StreamReadAt }; static HRESULT StorageImpl_Construct( @@ -3671,6 +3726,13 @@ static HRESULT StorageInternalImpl_DestroyDirEntry(StorageBaseImpl *base, index); } +static HRESULT StorageInternalImpl_StreamReadAt(StorageBaseImpl *base, + DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead) +{ + return StorageBaseImpl_StreamReadAt(&base->ancestorStorage->base, + index, offset, size, buffer, bytesRead); +} + /****************************************************************************** ** ** Storage32InternalImpl_Commit @@ -4117,7 +4179,8 @@ static const StorageBaseImplVtbl StorageInternalImpl_BaseVtbl = StorageInternalImpl_CreateDirEntry, StorageInternalImpl_WriteDirEntry, StorageInternalImpl_ReadDirEntry, - StorageInternalImpl_DestroyDirEntry + StorageInternalImpl_DestroyDirEntry, + StorageInternalImpl_StreamReadAt }; /****************************************************************************** diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 12cff71..24070d1 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -252,6 +252,7 @@ struct StorageBaseImplVtbl { HRESULT (*WriteDirEntry)(StorageBaseImpl*,DirRef,const DirEntry*); HRESULT (*ReadDirEntry)(StorageBaseImpl*,DirRef,DirEntry*); HRESULT (*DestroyDirEntry)(StorageBaseImpl*,DirRef); + HRESULT (*StreamReadAt)(StorageBaseImpl*,DirRef,ULARGE_INTEGER,ULONG,void*,ULONG*); }; static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This) @@ -283,6 +284,13 @@ static inline HRESULT StorageBaseImpl_DestroyDirEntry(StorageBaseImpl *This, return This->baseVtbl->DestroyDirEntry(This, index); } +/* Read up to size bytes from this directory entry's stream at the given offset. */ +static inline HRESULT StorageBaseImpl_StreamReadAt(StorageBaseImpl *This, + DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead) +{ + return This->baseVtbl->StreamReadAt(This, index, offset, size, buffer, bytesRead); +} + /**************************************************************************** * StorageBaseImpl stream list handlers */
1
0
0
0
Vincent Povirk : ole32: Add DestroyDirEntry to the storage vtable.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: ee39a21d2b3f5e1a8d0f5519c316804ce16d9f45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee39a21d2b3f5e1a8d0f5519c…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 09:50:15 2009 -0600 ole32: Add DestroyDirEntry to the storage vtable. --- dlls/ole32/storage32.c | 23 ++++++++++++++--------- dlls/ole32/storage32.h | 7 +++++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 309c2dd..53c2c87 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -184,10 +184,6 @@ static HRESULT removeFromTree( * Declaration of the functions used to manipulate DirEntry */ -static HRESULT destroyDirEntry( - StorageImpl *storage, - DirRef index); - static HRESULT insertIntoTree( StorageBaseImpl *This, DirRef parentStorageIndex, @@ -1244,12 +1240,13 @@ static HRESULT StorageImpl_CreateDirEntry( * * Mark a directory entry in the file as free. */ -static HRESULT destroyDirEntry( - StorageImpl *storage, +static HRESULT StorageImpl_DestroyDirEntry( + StorageBaseImpl *base, DirRef index) { HRESULT hr; BYTE emptyData[RAW_DIRENTRY_SIZE]; + StorageImpl *storage = (StorageImpl*)base; memset(&emptyData, 0, RAW_DIRENTRY_SIZE); @@ -1820,8 +1817,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement( * Invalidate the entry */ if (SUCCEEDED(hr)) - destroyDirEntry(This->ancestorStorage, - entryToDeleteRef); + StorageBaseImpl_DestroyDirEntry(This, entryToDeleteRef); return hr; } @@ -2227,6 +2223,7 @@ static const StorageBaseImplVtbl StorageImpl_BaseVtbl = StorageImpl_CreateDirEntry, StorageImpl_BaseWriteDirEntry, StorageImpl_BaseReadDirEntry, + StorageImpl_DestroyDirEntry }; static HRESULT StorageImpl_Construct( @@ -3667,6 +3664,13 @@ static HRESULT StorageInternalImpl_ReadDirEntry(StorageBaseImpl *base, index, data); } +static HRESULT StorageInternalImpl_DestroyDirEntry(StorageBaseImpl *base, + DirRef index) +{ + return StorageBaseImpl_DestroyDirEntry(&base->ancestorStorage->base, + index); +} + /****************************************************************************** ** ** Storage32InternalImpl_Commit @@ -4112,7 +4116,8 @@ static const StorageBaseImplVtbl StorageInternalImpl_BaseVtbl = StorageInternalImpl_Destroy, StorageInternalImpl_CreateDirEntry, StorageInternalImpl_WriteDirEntry, - StorageInternalImpl_ReadDirEntry + StorageInternalImpl_ReadDirEntry, + StorageInternalImpl_DestroyDirEntry }; /****************************************************************************** diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index fdac6a5..12cff71 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -251,6 +251,7 @@ struct StorageBaseImplVtbl { HRESULT (*CreateDirEntry)(StorageBaseImpl*,const DirEntry*,DirRef*); HRESULT (*WriteDirEntry)(StorageBaseImpl*,DirRef,const DirEntry*); HRESULT (*ReadDirEntry)(StorageBaseImpl*,DirRef,DirEntry*); + HRESULT (*DestroyDirEntry)(StorageBaseImpl*,DirRef); }; static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This) @@ -276,6 +277,12 @@ static inline HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This, return This->baseVtbl->ReadDirEntry(This, index, data); } +static inline HRESULT StorageBaseImpl_DestroyDirEntry(StorageBaseImpl *This, + DirRef index) +{ + return This->baseVtbl->DestroyDirEntry(This, index); +} + /**************************************************************************** * StorageBaseImpl stream list handlers */
1
0
0
0
Vincent Povirk : ole32: Take a StorageBaseImpl in removeFromTree.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: f43e013f734459c55459e78e9868aa9137c81f2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f43e013f734459c55459e78e9…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 09:43:17 2009 -0600 ole32: Take a StorageBaseImpl in removeFromTree. --- dlls/ole32/storage32.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 5a7f6d9..309c2dd 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -176,7 +176,7 @@ static HRESULT deleteStreamContents( DirEntry entryDataToDelete); static HRESULT removeFromTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef deletedIndex); @@ -204,7 +204,7 @@ static DirRef findElement( DirEntry *data); static HRESULT findTreeParent( - StorageImpl *storage, + StorageBaseImpl *storage, DirRef storageEntry, const OLECHAR *childName, DirEntry *parentData, @@ -769,7 +769,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( } /* Remove the element from its current position in the tree */ - removeFromTree(This->ancestorStorage, This->storageDirEntry, + removeFromTree(This, This->storageDirEntry, currentEntryRef); /* Change the name of the element */ @@ -1454,7 +1454,7 @@ static DirRef findElement(StorageImpl *storage, DirRef storageEntry, * If there is no such element, find a place where it could be inserted and * return STG_E_FILENOTFOUND. */ -static HRESULT findTreeParent(StorageImpl *storage, DirRef storageEntry, +static HRESULT findTreeParent(StorageBaseImpl *storage, DirRef storageEntry, const OLECHAR *childName, DirEntry *parentData, DirRef *parentEntry, ULONG *relation) { @@ -1462,7 +1462,7 @@ static HRESULT findTreeParent(StorageImpl *storage, DirRef storageEntry, DirEntry childData; /* Read the storage entry to find the root of the tree. */ - StorageImpl_ReadDirEntry(storage, storageEntry, parentData); + StorageBaseImpl_ReadDirEntry(storage, storageEntry, parentData); *parentEntry = storageEntry; *relation = DIRENTRY_RELATION_DIR; @@ -1473,7 +1473,7 @@ static HRESULT findTreeParent(StorageImpl *storage, DirRef storageEntry, { LONG cmp; - StorageImpl_ReadDirEntry(storage, childEntry, &childData); + StorageBaseImpl_ReadDirEntry(storage, childEntry, &childData); cmp = entryNameCmp(childName, childData.name); @@ -1812,7 +1812,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement( * Remove the entry from its parent storage */ hr = removeFromTree( - This->ancestorStorage, + This, This->storageDirEntry, entryToDeleteRef); @@ -2053,7 +2053,7 @@ static void setEntryLink(DirEntry *entry, ULONG relation, DirRef new_target) * freeing any resources attached to it. */ static HRESULT removeFromTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef deletedIndex) { @@ -2063,7 +2063,7 @@ static HRESULT removeFromTree( DirRef parentEntryRef; ULONG typeOfRelation; - hr = StorageImpl_ReadDirEntry(This, deletedIndex, &entryToDelete); + hr = StorageBaseImpl_ReadDirEntry(This, deletedIndex, &entryToDelete); if (hr != S_OK) return hr; @@ -2084,7 +2084,7 @@ static HRESULT removeFromTree( */ setEntryLink(&parentEntry, typeOfRelation, entryToDelete.leftChild); - hr = StorageImpl_WriteDirEntry( + hr = StorageBaseImpl_WriteDirEntry( This, parentEntryRef, &parentEntry); @@ -2105,7 +2105,7 @@ static HRESULT removeFromTree( do { - hr = StorageImpl_ReadDirEntry( + hr = StorageBaseImpl_ReadDirEntry( This, newRightChildParent, &newRightChildParentEntry); @@ -2120,7 +2120,7 @@ static HRESULT removeFromTree( newRightChildParentEntry.rightChild = entryToDelete.rightChild; - hr = StorageImpl_WriteDirEntry( + hr = StorageBaseImpl_WriteDirEntry( This, newRightChildParent, &newRightChildParentEntry); @@ -2137,7 +2137,7 @@ static HRESULT removeFromTree( */ setEntryLink(&parentEntry, typeOfRelation, entryToDelete.rightChild); - hr = StorageImpl_WriteDirEntry( + hr = StorageBaseImpl_WriteDirEntry( This, parentEntryRef, &parentEntry);
1
0
0
0
Vincent Povirk : ole32: Take a StorageBaseImpl in insertIntoTree.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 0425ed1d38dc999cfa02dc2e9990f5329d57c4fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0425ed1d38dc999cfa02dc2e9…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 09:40:17 2009 -0600 ole32: Take a StorageBaseImpl in insertIntoTree. --- dlls/ole32/storage32.c | 58 ++++++++++++++++++++++++------------------------ 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 2015eaf..5a7f6d9 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -189,7 +189,7 @@ static HRESULT destroyDirEntry( DirRef index); static HRESULT insertIntoTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef newEntryIndex); @@ -779,7 +779,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( ¤tEntry); /* Insert the element in a new position in the tree */ - insertIntoTree(This->ancestorStorage, This->storageDirEntry, + insertIntoTree(This, This->storageDirEntry, currentEntryRef); } else @@ -920,7 +920,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( * Insert the new entry in the parent storage's tree. */ insertIntoTree( - This->ancestorStorage, + This, This->storageDirEntry, newStreamEntryRef); @@ -1108,7 +1108,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage( * Insert the new directory entry into the parent storage's tree */ insertIntoTree( - This->ancestorStorage, + This, This->storageDirEntry, newEntryRef); @@ -1294,7 +1294,7 @@ static LONG entryNameCmp( * Add a directory entry to a storage */ static HRESULT insertIntoTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef newEntryIndex) { @@ -1304,16 +1304,16 @@ static HRESULT insertIntoTree( /* * Read the inserted entry */ - StorageImpl_ReadDirEntry(This, - newEntryIndex, - &newEntry); + StorageBaseImpl_ReadDirEntry(This, + newEntryIndex, + &newEntry); /* * Read the storage entry */ - StorageImpl_ReadDirEntry(This, - parentStorageIndex, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + parentStorageIndex, + ¤tEntry); if (currentEntry.dirRootEntry != DIRENTRY_NULL) { @@ -1332,9 +1332,9 @@ static HRESULT insertIntoTree( /* * Read */ - StorageImpl_ReadDirEntry(This, - currentEntry.dirRootEntry, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + currentEntry.dirRootEntry, + ¤tEntry); previous = currentEntry.leftChild; next = currentEntry.rightChild; @@ -1348,17 +1348,17 @@ static HRESULT insertIntoTree( { if (previous != DIRENTRY_NULL) { - StorageImpl_ReadDirEntry(This, - previous, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + previous, + ¤tEntry); current = previous; } else { currentEntry.leftChild = newEntryIndex; - StorageImpl_WriteDirEntry(This, - current, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + current, + ¤tEntry); found = 1; } } @@ -1366,17 +1366,17 @@ static HRESULT insertIntoTree( { if (next != DIRENTRY_NULL) { - StorageImpl_ReadDirEntry(This, - next, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + next, + ¤tEntry); current = next; } else { currentEntry.rightChild = newEntryIndex; - StorageImpl_WriteDirEntry(This, - current, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + current, + ¤tEntry); found = 1; } } @@ -1399,9 +1399,9 @@ static HRESULT insertIntoTree( * The storage is empty, make the new entry the root of its element tree */ currentEntry.dirRootEntry = newEntryIndex; - StorageImpl_WriteDirEntry(This, - parentStorageIndex, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + parentStorageIndex, + ¤tEntry); } return S_OK;
1
0
0
0
Vincent Povirk : ole32: Change the base IStorage filename to a pointer type .
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: 9300a92ccccf794208882bf12c5b1e0a3f9a0cae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9300a92ccccf794208882bf12…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Dec 7 14:53:36 2009 -0600 ole32: Change the base IStorage filename to a pointer type. The maximum size of the name returned by Stat() on a top-level storage has nothing to do with DIRENTRY_NAME_BUFFER_LEN. Windows can return longer names and probably has a limit of MAX_PATH. Also, Stat always returns an absolute pathname, so we don't need a special case in StgOpenStorage. --- dlls/ole32/storage32.c | 17 +++++----- dlls/ole32/storage32.h | 2 +- dlls/ole32/tests/storage32.c | 71 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 3263221..2015eaf 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2242,6 +2242,7 @@ static HRESULT StorageImpl_Construct( HRESULT hr = S_OK; DirEntry currentEntry; DirRef currentEntryRef; + WCHAR fullpath[MAX_PATH]; if ( FAILED( validateSTGM(openFlags) )) return STG_E_INVALIDFLAG; @@ -2272,15 +2273,19 @@ static HRESULT StorageImpl_Construct( This->hFile = hFile; if(pwcsName) { + if (!GetFullPathNameW(pwcsName, MAX_PATH, fullpath, NULL)) + { + lstrcpynW(fullpath, pwcsName, MAX_PATH); + } This->pwcsName = HeapAlloc(GetProcessHeap(), 0, - (lstrlenW(pwcsName)+1)*sizeof(WCHAR)); + (lstrlenW(fullpath)+1)*sizeof(WCHAR)); if (!This->pwcsName) { hr = STG_E_INSUFFICIENTMEMORY; goto end; } - strcpyW(This->pwcsName, pwcsName); - lstrcpynW(This->base.filename, pwcsName, DIRENTRY_NAME_BUFFER_LEN); + strcpyW(This->pwcsName, fullpath); + This->base.filename = This->pwcsName; } /* @@ -5857,7 +5862,6 @@ HRESULT WINAPI StgOpenStorage( HANDLE hFile = 0; DWORD shareMode; DWORD accessMode; - WCHAR fullname[MAX_PATH]; TRACE("(%s, %p, %x, %p, %d, %p)\n", debugstr_w(pwcsName), pstgPriority, grfMode, @@ -6011,11 +6015,6 @@ HRESULT WINAPI StgOpenStorage( goto end; } - /* prepare the file name string given in lieu of the root property name */ - GetFullPathNameW(pwcsName, MAX_PATH, fullname, NULL); - memcpy(newStorage->base.filename, fullname, DIRENTRY_NAME_BUFFER_LEN); - newStorage->base.filename[DIRENTRY_NAME_BUFFER_LEN-1] = '\0'; - /* * Get an "out" pointer for the caller. */ diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index a087e0d..fdac6a5 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -239,7 +239,7 @@ struct StorageBaseImpl DWORD stateBits; /* If set, this overrides the root storage name returned by IStorage_Stat */ - WCHAR filename[DIRENTRY_NAME_BUFFER_LEN]; + LPCWSTR filename; BOOL create; /* Was the storage created or opened. The behaviour of STGM_SIMPLE depends on this */ diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 6e222c7..b5ecf22 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -2466,6 +2466,76 @@ static void test_rename(void) ok( r == TRUE, "deleted file\n"); } +static void test_toplevel_stat(void) +{ + IStorage *stg = NULL; + HRESULT r; + STATSTG stat; + WCHAR prev_dir[MAX_PATH]; + WCHAR temp[MAX_PATH]; + WCHAR full_path[MAX_PATH]; + LPWSTR rel_path; + + DeleteFileA(filenameA); + + r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | + STGM_READWRITE |STGM_TRANSACTED, 0, &stg); + ok(r==S_OK, "StgCreateDocfile failed\n"); + + r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); + ok(!lstrcmpW(stat.pwcsName, filename), "expected %s, got %s\n", + wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); + CoTaskMemFree(stat.pwcsName); + + IStorage_Release( stg ); + + r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + + r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); + ok(!lstrcmpW(stat.pwcsName, filename), "expected %s, got %s\n", + wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); + CoTaskMemFree(stat.pwcsName); + + IStorage_Release( stg ); + + DeleteFileA(filenameA); + + /* Stat always returns the full path, even for files opened with a relative path. */ + GetCurrentDirectoryW(MAX_PATH, prev_dir); + + GetTempPathW(MAX_PATH, temp); + + SetCurrentDirectoryW(temp); + + GetFullPathNameW(filename, MAX_PATH, full_path, &rel_path); + + r = StgCreateDocfile( rel_path, STGM_CREATE | STGM_SHARE_EXCLUSIVE | + STGM_READWRITE |STGM_TRANSACTED, 0, &stg); + ok(r==S_OK, "StgCreateDocfile failed\n"); + + r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); + ok(!lstrcmpW(stat.pwcsName, filename), "expected %s, got %s\n", + wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); + CoTaskMemFree(stat.pwcsName); + + IStorage_Release( stg ); + + r = StgOpenStorage( rel_path, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + + r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); + ok(!lstrcmpW(stat.pwcsName, filename), "expected %s, got %s\n", + wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); + CoTaskMemFree(stat.pwcsName); + + IStorage_Release( stg ); + + SetCurrentDirectoryW(prev_dir); + + DeleteFileA(filenameA); +} + START_TEST(storage32) { CHAR temp[MAX_PATH]; @@ -2503,4 +2573,5 @@ START_TEST(storage32) test_copyto_iidexclusions_storage(); test_copyto_iidexclusions_stream(); test_rename(); + test_toplevel_stat(); }
1
0
0
0
Henri Verbeet : dxgi: The "unknown0" parameter to DXGID3D10CreateDevice() is a pointer.
by Alexandre Julliard
08 Dec '09
08 Dec '09
Module: wine Branch: master Commit: efbd38ae84085142b7f7f8f93fa091897d3b674f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efbd38ae84085142b7f7f8f93…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 7 20:20:03 2009 +0100 dxgi: The "unknown0" parameter to DXGID3D10CreateDevice() is a pointer. Fixes stack corruption in the 64-bit tests. Thanks to Paul Vriens for debugging this. --- dlls/d3d10/d3d10_main.c | 2 +- dlls/d3d10/d3d10_private.h | 2 +- dlls/d3d10core/d3d10core.spec | 2 +- dlls/d3d10core/d3d10core_main.c | 4 ++-- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/tests/device.c | 6 +++--- dlls/dxgi/dxgi.spec | 2 +- dlls/dxgi/dxgi_main.c | 4 ++-- dlls/dxgi/tests/device.c | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/d3d10/d3d10_main.c b/dlls/d3d10/d3d10_main.c index 10bf533..65ce1e0 100644 --- a/dlls/d3d10/d3d10_main.c +++ b/dlls/d3d10/d3d10_main.c @@ -124,7 +124,7 @@ HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver } } - hr = D3D10CoreCreateDevice(factory, adapter, flags, 0, device); + hr = D3D10CoreCreateDevice(factory, adapter, flags, NULL, device); IDXGIAdapter_Release(adapter); IDXGIFactory_Release(factory); if (FAILED(hr)) diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index f077115..5bf59b1 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -179,6 +179,6 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T d /* D3D10Core */ HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, - UINT flags, DWORD unknown0, ID3D10Device **device); + UINT flags, void *unknown0, ID3D10Device **device); #endif /* __WINE_D3D10_PRIVATE_H */ diff --git a/dlls/d3d10core/d3d10core.spec b/dlls/d3d10core/d3d10core.spec index 9bf25b5..6569888 100644 --- a/dlls/d3d10core/d3d10core.spec +++ b/dlls/d3d10core/d3d10core.spec @@ -1,2 +1,2 @@ -@ stdcall D3D10CoreCreateDevice(ptr ptr long long ptr) +@ stdcall D3D10CoreCreateDevice(ptr ptr long ptr ptr) @ stdcall D3D10CoreRegisterLayers() diff --git a/dlls/d3d10core/d3d10core_main.c b/dlls/d3d10core/d3d10core_main.c index 4151dd0..9d0c5d7 100644 --- a/dlls/d3d10core/d3d10core_main.c +++ b/dlls/d3d10core/d3d10core_main.c @@ -102,13 +102,13 @@ HRESULT WINAPI D3D10CoreRegisterLayers(void) } HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, - UINT flags, DWORD unknown0, ID3D10Device **device) + UINT flags, void *unknown0, ID3D10Device **device) { IUnknown *dxgi_device; HMODULE d3d10core; HRESULT hr; - TRACE("factory %p, adapter %p, flags %#x, unknown0 %#x, device %p\n", + TRACE("factory %p, adapter %p, flags %#x, unknown0 %p, device %p.\n", factory, adapter, flags, unknown0, device); d3d10core = GetModuleHandleA("d3d10core.dll"); diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 35d5ed3..cc3029f 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -257,7 +257,7 @@ struct dxgi_device_layer }; HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter, - UINT flags, DWORD unknown0, void **device); + UINT flags, void *unknown0, void **device); HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count); #endif /* __WINE_D3D10CORE_PRIVATE_H */ diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index fb166ec..122a154 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -22,7 +22,7 @@ #include "wine/test.h" HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, - UINT flags, DWORD unknown0, ID3D10Device **device); + UINT flags, void *unknown0, ID3D10Device **device); static ID3D10Device *create_device(void) { @@ -38,7 +38,7 @@ static ID3D10Device *create_device(void) ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; - hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); + hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device); if (FAILED(hr)) { HMODULE d3d10ref; @@ -59,7 +59,7 @@ static ID3D10Device *create_device(void) ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; - hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); + hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device); ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; } diff --git a/dlls/dxgi/dxgi.spec b/dlls/dxgi/dxgi.spec index d7f8aba..853d8e2 100644 --- a/dlls/dxgi/dxgi.spec +++ b/dlls/dxgi/dxgi.spec @@ -1,3 +1,3 @@ @ stdcall CreateDXGIFactory(ptr ptr) -@ stdcall DXGID3D10CreateDevice(ptr ptr ptr long long ptr) +@ stdcall DXGID3D10CreateDevice(ptr ptr ptr long ptr ptr) @ stdcall DXGID3D10RegisterLayers(ptr long) diff --git a/dlls/dxgi/dxgi_main.c b/dlls/dxgi/dxgi_main.c index 489f986..312b3b7 100644 --- a/dlls/dxgi/dxgi_main.c +++ b/dlls/dxgi/dxgi_main.c @@ -224,7 +224,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core) } HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter, - UINT flags, DWORD unknown0, void **device) + UINT flags, void *unknown0, void **device) { struct layer_get_size_args get_size_args; struct dxgi_device *dxgi_device; @@ -233,7 +233,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I DWORD count; HRESULT hr; - TRACE("d3d10core %p, factory %p, adapter %p, flags %#x, unknown0 %#x, device %p\n", + TRACE("d3d10core %p, factory %p, adapter %p, flags %#x, unknown0 %p, device %p.\n", d3d10core, factory, adapter, flags, unknown0, device); hr = register_d3d10core_layers(d3d10core); diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index 2391c1b..d4ca50b 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -22,7 +22,7 @@ #include "wine/test.h" HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, - IDXGIAdapter *adapter, UINT flags, DWORD arg5, void **device); + IDXGIAdapter *adapter, UINT flags, void *unknown0, void **device); static IDXGIDevice *create_device(HMODULE d3d10core) { @@ -39,7 +39,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core) ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; - hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); + hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device); if (FAILED(hr)) { HMODULE d3d10ref; @@ -60,7 +60,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core) ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; - hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); + hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device); ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; }
1
0
0
0
← Newer
1
...
87
88
89
90
91
92
93
...
124
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200