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
March 2015
----- 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
775 discussions
Start a n
N
ew thread
Qian Hong : ntdll: Implemented FileNetworkOpenInformation class support in NtQueryInformationFile.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 2a098ab8a8b500362237943770f81c3f063d2dcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a098ab8a8b50036223794377…
Author: Qian Hong <qhong(a)codeweavers.com> Date: Tue Mar 10 05:17:08 2015 +0800 ntdll: Implemented FileNetworkOpenInformation class support in NtQueryInformationFile. --- dlls/ntdll/file.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index b07e5f9..3bd2c31 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -2190,7 +2190,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, 0, /* FileMoveClusterInformation */ 0, /* FileQuotaInformation */ 0, /* FileReparsePointInformation */ - 0, /* FileNetworkOpenInformation */ + sizeof(FILE_NETWORK_OPEN_INFORMATION), /* FileNetworkOpenInformation */ 0, /* FileAttributeTagInformation */ 0, /* FileTrackingInformation */ 0, /* FileIdBothDirectoryInformation */ @@ -2414,6 +2414,40 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, } } break; + case FileNetworkOpenInformation: + { + FILE_NETWORK_OPEN_INFORMATION *info = ptr; + ANSI_STRING unix_name; + + if (!(io->u.Status = server_get_unix_name( hFile, &unix_name ))) + { + ULONG attributes; + struct stat st; + + if (get_file_info( unix_name.Buffer, &st, &attributes ) == -1) + io->u.Status = FILE_GetNtStatus(); + else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) + io->u.Status = STATUS_INVALID_INFO_CLASS; + else + { + FILE_BASIC_INFORMATION basic; + FILE_STANDARD_INFORMATION std; + + fill_file_info( &st, attributes, &basic, FileBasicInformation ); + fill_file_info( &st, attributes, &std, FileStandardInformation ); + + info->CreationTime = basic.CreationTime; + info->LastAccessTime = basic.LastAccessTime; + info->LastWriteTime = basic.LastWriteTime; + info->ChangeTime = basic.ChangeTime; + info->AllocationSize = std.AllocationSize; + info->EndOfFile = std.EndOfFile; + info->FileAttributes = basic.FileAttributes; + } + RtlFreeAnsiString( &unix_name ); + } + } + break; default: FIXME("Unsupported class (%d)\n", class); io->u.Status = STATUS_NOT_IMPLEMENTED;
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement ProcessID() property.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 2a925eba2006e815218d5ec3790f7f61aff14542 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a925eba2006e815218d5ec37…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 9 20:10:47 2015 +0300 wshom.ocx: Implement ProcessID() property. --- dlls/wshom.ocx/shell.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 6d1b80b..dcf1462 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -236,9 +236,13 @@ static HRESULT WINAPI WshExec_get_ProcessID(IWshExec *iface, DWORD *pid) { WshExec *This = impl_from_IWshExec(iface); - FIXME("(%p)->(%p): stub\n", This, pid); + TRACE("(%p)->(%p)\n", This, pid); - return E_NOTIMPL; + if (!pid) + return E_INVALIDARG; + + *pid = This->info.dwProcessId; + return S_OK; } static HRESULT WINAPI WshExec_get_ExitCode(IWshExec *iface, DWORD *code)
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement Status property of IWshExec.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 1d0fbb21602b62152edad807c4c3a317381a162a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d0fbb21602b62152edad807c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 9 20:09:55 2015 +0300 wshom.ocx: Implement Status property of IWshExec. --- dlls/wshom.ocx/shell.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 38a07fe..6d1b80b 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -180,10 +180,29 @@ static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFII static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status) { WshExec *This = impl_from_IWshExec(iface); + DWORD code; - FIXME("(%p)->(%p): stub\n", This, status); + TRACE("(%p)->(%p)\n", This, status); - return E_NOTIMPL; + if (!status) + return E_INVALIDARG; + + if (!GetExitCodeProcess(This->info.hProcess, &code)) + return HRESULT_FROM_WIN32(GetLastError()); + + switch (code) + { + case 0: + *status = WshFinished; + break; + case STILL_ACTIVE: + *status = WshRunning; + break; + default: + *status = WshFailed; + } + + return S_OK; } static HRESULT WINAPI WshExec_get_StdIn(IWshExec *iface, ITextStream **stream)
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement Exec() method.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: d9db9d8b83a29b8a75842e949937e56614384940 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9db9d8b83a29b8a75842e949…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 9 20:09:00 2015 +0300 wshom.ocx: Implement Exec() method. --- dlls/wshom.ocx/shell.c | 225 ++++++++++++++++++++++++++++++++++++++++- dlls/wshom.ocx/tests/wshom.c | 13 +++ dlls/wshom.ocx/tests/wshom.idl | 4 +- dlls/wshom.ocx/wshom.idl | 4 +- dlls/wshom.ocx/wshom_main.c | 1 + dlls/wshom.ocx/wshom_private.h | 1 + 6 files changed, 242 insertions(+), 6 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index c164b70..38a07fe 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -51,6 +51,13 @@ typedef struct LONG ref; } WshEnvironment; +typedef struct +{ + IWshExec IWshExec_iface; + LONG ref; + PROCESS_INFORMATION info; +} WshExec; + static inline WshCollection *impl_from_IWshCollection( IWshCollection *iface ) { return CONTAINING_RECORD(iface, WshCollection, IWshCollection_iface); @@ -66,6 +73,213 @@ static inline WshEnvironment *impl_from_IWshEnvironment( IWshEnvironment *iface return CONTAINING_RECORD(iface, WshEnvironment, IWshEnvironment_iface); } +static inline WshExec *impl_from_IWshExec( IWshExec *iface ) +{ + return CONTAINING_RECORD(iface, WshExec, IWshExec_iface); +} + +static HRESULT WINAPI WshExec_QueryInterface(IWshExec *iface, REFIID riid, void **obj) +{ + WshExec *This = impl_from_IWshExec(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj); + + if (IsEqualGUID(riid, &IID_IDispatch) || + IsEqualGUID(riid, &IID_IWshExec) || + IsEqualGUID(riid, &IID_IUnknown)) + { + *obj = iface; + }else { + FIXME("Unknown iface %s\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; + } + + IWshExec_AddRef(iface); + return S_OK; +} + +static ULONG WINAPI WshExec_AddRef(IWshExec *iface) +{ + WshExec *This = impl_from_IWshExec(iface); + LONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p) ref = %d\n", This, ref); + return ref; +} + +static ULONG WINAPI WshExec_Release(IWshExec *iface) +{ + WshExec *This = impl_from_IWshExec(iface); + LONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p) ref = %d\n", This, ref); + + if (!ref) { + CloseHandle(This->info.hThread); + CloseHandle(This->info.hProcess); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI WshExec_GetTypeInfoCount(IWshExec *iface, UINT *pctinfo) +{ + WshExec *This = impl_from_IWshExec(iface); + TRACE("(%p)->(%p)\n", This, pctinfo); + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI WshExec_GetTypeInfo(IWshExec *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) +{ + WshExec *This = impl_from_IWshExec(iface); + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return get_typeinfo(IWshExec_tid, ppTInfo); +} + +static HRESULT WINAPI WshExec_GetIDsOfNames(IWshExec *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) +{ + WshExec *This = impl_from_IWshExec(iface); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + + hr = get_typeinfo(IWshExec_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); + ITypeInfo_Release(typeinfo); + } + + return hr; +} + +static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + WshExec *This = impl_from_IWshExec(iface); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + hr = get_typeinfo(IWshExec_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, &This->IWshExec_iface, dispIdMember, wFlags, + pDispParams, pVarResult, pExcepInfo, puArgErr); + ITypeInfo_Release(typeinfo); + } + + return hr; +} + +static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, status); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_get_StdIn(IWshExec *iface, ITextStream **stream) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_get_StdOut(IWshExec *iface, ITextStream **stream) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_get_StdErr(IWshExec *iface, ITextStream **stream) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_get_ProcessID(IWshExec *iface, DWORD *pid) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, pid); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_get_ExitCode(IWshExec *iface, DWORD *code) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p)->(%p): stub\n", This, code); + + return E_NOTIMPL; +} + +static HRESULT WINAPI WshExec_Terminate(IWshExec *iface) +{ + WshExec *This = impl_from_IWshExec(iface); + + FIXME("(%p): stub\n", This); + + return E_NOTIMPL; +} + +static const IWshExecVtbl WshExecVtbl = { + WshExec_QueryInterface, + WshExec_AddRef, + WshExec_Release, + WshExec_GetTypeInfoCount, + WshExec_GetTypeInfo, + WshExec_GetIDsOfNames, + WshExec_Invoke, + WshExec_get_Status, + WshExec_get_StdIn, + WshExec_get_StdOut, + WshExec_get_StdErr, + WshExec_get_ProcessID, + WshExec_get_ExitCode, + WshExec_Terminate +}; + +static HRESULT WshExec_create(BSTR command, IWshExec **ret) +{ + STARTUPINFOW si = {0}; + WshExec *This; + + *ret = NULL; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IWshExec_iface.lpVtbl = &WshExecVtbl; + This->ref = 1; + + if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &This->info)) { + HeapFree(GetProcessHeap(), 0, This); + return HRESULT_FROM_WIN32(GetLastError()); + } + + *ret = &This->IWshExec_iface; + return S_OK; +} + static HRESULT WINAPI WshEnvironment_QueryInterface(IWshEnvironment *iface, REFIID riid, void **obj) { WshEnvironment *This = impl_from_IWshEnvironment(iface); @@ -1323,8 +1537,15 @@ static HRESULT WINAPI WshShell3_SendKeys(IWshShell3 *iface, BSTR Keys, VARIANT * static HRESULT WINAPI WshShell3_Exec(IWshShell3 *iface, BSTR command, IWshExec **ret) { - FIXME("(%s %p): stub\n", debugstr_w(command), ret); - return E_NOTIMPL; + TRACE("(%s %p)\n", debugstr_w(command), ret); + + if (!ret) + return E_POINTER; + + if (!command) + return DISP_E_EXCEPTION; + + return WshExec_create(command, ret); } static HRESULT WINAPI WshShell3_get_CurrentDirectory(IWshShell3 *iface, BSTR *dir) diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c index 0a69af3..ad0e0be 100644 --- a/dlls/wshom.ocx/tests/wshom.c +++ b/dlls/wshom.ocx/tests/wshom.c @@ -42,6 +42,7 @@ static void test_wshshell(void) static const WCHAR dummydirW[] = {'d','e','a','d','p','a','r','r','o','t',0}; static const WCHAR emptyW[] = {'e','m','p','t','y',0}; IWshEnvironment *env; + IWshExec *shexec; IWshShell3 *sh3; IDispatchEx *dispex; IWshCollection *coll; @@ -234,6 +235,18 @@ if (0) /* crashes on native */ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); SysFreeString(str); + /* Exec */ + hr = IWshShell3_Exec(sh3, NULL, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IWshShell3_Exec(sh3, NULL, &shexec); + ok(hr == DISP_E_EXCEPTION, "got 0x%08x\n", hr); + + str = SysAllocString(emptyW); + hr = IWshShell3_Exec(sh3, str, &shexec); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + SysFreeString(str); + IWshCollection_Release(coll); IDispatch_Release(disp); IWshShell3_Release(sh3); diff --git a/dlls/wshom.ocx/tests/wshom.idl b/dlls/wshom.ocx/tests/wshom.idl index 6647b2b..77d64ce 100644 --- a/dlls/wshom.ocx/tests/wshom.idl +++ b/dlls/wshom.ocx/tests/wshom.idl @@ -434,10 +434,10 @@ library IWshRuntimeLibrary HRESULT StdErr([out, retval] ITextStream** stream); [id(0x0006), propget] - HRESULT ProcessID([out, retval] long* pid); + HRESULT ProcessID([out, retval] DWORD *pid); [id(0x0007), propget] - HRESULT ExitCode([out, retval] long* ExitCode); + HRESULT ExitCode([out, retval] DWORD *code); [id(0x0008)] HRESULT Terminate(); diff --git a/dlls/wshom.ocx/wshom.idl b/dlls/wshom.ocx/wshom.idl index aade499..83f3c7e 100644 --- a/dlls/wshom.ocx/wshom.idl +++ b/dlls/wshom.ocx/wshom.idl @@ -436,10 +436,10 @@ library IWshRuntimeLibrary HRESULT StdErr([out, retval] ITextStream** stream); [id(0x0006), propget] - HRESULT ProcessID([out, retval] long* pid); + HRESULT ProcessID([out, retval] DWORD *pid); [id(0x0007), propget] - HRESULT ExitCode([out, retval] long* ExitCode); + HRESULT ExitCode([out, retval] DWORD *code); [id(0x0008)] HRESULT Terminate(); diff --git a/dlls/wshom.ocx/wshom_main.c b/dlls/wshom.ocx/wshom_main.c index 118b6c9..e2a30ed 100644 --- a/dlls/wshom.ocx/wshom_main.c +++ b/dlls/wshom.ocx/wshom_main.c @@ -35,6 +35,7 @@ static REFIID tid_ids[] = { &IID_NULL, &IID_IWshCollection, &IID_IWshEnvironment, + &IID_IWshExec, &IID_IWshShell3, &IID_IWshShortcut }; diff --git a/dlls/wshom.ocx/wshom_private.h b/dlls/wshom.ocx/wshom_private.h index 07a77b4..7cc8d0c 100644 --- a/dlls/wshom.ocx/wshom_private.h +++ b/dlls/wshom.ocx/wshom_private.h @@ -29,6 +29,7 @@ typedef enum tid_t { NULL_tid, IWshCollection_tid, IWshEnvironment_tid, + IWshExec_tid, IWshShell3_tid, IWshShortcut_tid, LAST_tid
1
0
0
0
Nikolay Sivov : rpcrt4: Use a helper to skip conformance.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: e1d1057232b91d10dea9ba4224c7b01e3a3a9476 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1d1057232b91d10dea9ba422…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 9 12:42:45 2015 +0300 rpcrt4: Use a helper to skip conformance. --- dlls/rpcrt4/ndr_marshall.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 89c2c7b..8a84ed7 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -440,6 +440,11 @@ static inline BOOL IsConformanceOrVariancePresent(PFORMAT_STRING pFormat) return (*(const ULONG *)pFormat != -1); } +static inline PFORMAT_STRING SkipConformance(const PMIDL_STUB_MESSAGE pStubMsg, const PFORMAT_STRING pFormat) +{ + return pStubMsg->fHasNewCorrDesc ? pFormat + 6 : pFormat + 4; +} + static PFORMAT_STRING ReadConformance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat) { align_pointer(&pStubMsg->Buffer, 4); @@ -448,10 +453,7 @@ static PFORMAT_STRING ReadConformance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRIN pStubMsg->MaxCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer); pStubMsg->Buffer += 4; TRACE("unmarshalled conformance is %ld\n", pStubMsg->MaxCount); - if (pStubMsg->fHasNewCorrDesc) - return pFormat+6; - else - return pFormat+4; + return SkipConformance(pStubMsg, pFormat); } static inline PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat, ULONG MaxValue) @@ -483,10 +485,7 @@ static inline PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_S } done: - if (pStubMsg->fHasNewCorrDesc) - return pFormat+6; - else - return pFormat+4; + return SkipConformance(pStubMsg, pFormat); } /* writes the conformance value to the buffer */ @@ -664,20 +663,8 @@ done_conf_grab: finish_conf: TRACE("resulting conformance is %ld\n", *pCount); - if (pStubMsg->fHasNewCorrDesc) - return pFormat+6; - else - return pFormat+4; -} -static inline PFORMAT_STRING SkipConformance(PMIDL_STUB_MESSAGE pStubMsg, - PFORMAT_STRING pFormat) -{ - if (pStubMsg->fHasNewCorrDesc) - pFormat += 6; - else - pFormat += 4; - return pFormat; + return SkipConformance(pStubMsg, pFormat); } static inline PFORMAT_STRING SkipVariance(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) @@ -2785,11 +2772,7 @@ static ULONG EmbeddedComplexSize(MIDL_STUB_MESSAGE *pStubMsg, } case RPC_FC_NON_ENCAPSULATED_UNION: pFormat += 2; - if (pStubMsg->fHasNewCorrDesc) - pFormat += 6; - else - pFormat += 4; - + pFormat = SkipConformance(pStubMsg, pFormat); pFormat += *(const SHORT*)pFormat; return *(const SHORT*)pFormat; case RPC_FC_IP: @@ -6186,10 +6169,7 @@ static LONG unmarshall_discriminant(PMIDL_STUB_MESSAGE pStubMsg, } (*ppFormat)++; - if (pStubMsg->fHasNewCorrDesc) - *ppFormat += 6; - else - *ppFormat += 4; + *ppFormat = SkipConformance(pStubMsg, *ppFormat); return discriminant; }
1
0
0
0
Nikolay Sivov : rpcrt4: Export I_UuidCreate().
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 66c05a4597e364aaeb3a6d45557346360bcac30b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66c05a4597e364aaeb3a6d455…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 9 01:20:48 2015 +0300 rpcrt4: Export I_UuidCreate(). --- dlls/rpcrt4/rpcrt4.spec | 2 +- dlls/rpcrt4/rpcrt4_main.c | 9 +++++++++ dlls/rpcrt4/tests/rpc.c | 14 +++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index c42fd8b..244bc2a 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -93,7 +93,7 @@ @ stub I_RpcTransServerNewConnection @ stub I_RpcTurnOnEEInfoPropagation # wxp @ stdcall I_RpcWindowProc(ptr long long long) # win9x -@ stub I_UuidCreate +@ stdcall I_UuidCreate(ptr) @ stub MIDL_wchar_strcpy @ stub MIDL_wchar_strlen @ stdcall MesBufferHandleReset(ptr long long ptr long ptr) diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index ef78b03..d5d349d 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -456,6 +456,15 @@ RPC_STATUS WINAPI UuidCreateSequential(UUID *Uuid) return status; } +/************************************************************************* + * I_UuidCreate [RPCRT4.@] + * + * See UuidCreateSequential() + */ +RPC_STATUS WINAPI I_UuidCreate(UUID *Uuid) +{ + return UuidCreateSequential(Uuid); +} /************************************************************************* * UuidHash [RPCRT4.@] diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 07ca7eb..34f7fac 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -791,13 +791,17 @@ static void test_UuidCreateSequential(void) UUID guid1; BYTE version; RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "UuidCreateSequential"); + RPC_STATUS (WINAPI *pI_UuidCreate)(UUID *) = (void*)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "I_UuidCreate"); RPC_STATUS ret; if (!pUuidCreateSequential) { - skip("UuidCreateSequential not exported\n"); + win_skip("UuidCreateSequential not exported\n"); return; } + + ok(pI_UuidCreate != pUuidCreateSequential, "got %p, %p\n", pI_UuidCreate, pUuidCreateSequential); + ret = pUuidCreateSequential(&guid1); ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); @@ -836,6 +840,14 @@ static void test_UuidCreateSequential(void) ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), "unexpected value in MAC address: %s\n", wine_dbgstr_guid(&guid2)); + + /* I_UuidCreate does exactly the same */ + pI_UuidCreate(&guid2); + version = (guid2.Data3 & 0xf000) >> 12; + ok(version == 1, "unexpected version %d\n", version); + ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), + "unexpected value in MAC address: %s\n", + wine_dbgstr_guid(&guid2)); } }
1
0
0
0
Nikolay Sivov : oleaut32/tests: Some tests for IsMatchingType().
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 613a65982f53897c8b927fce83ac3f5c65a57411 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=613a65982f53897c8b927fce8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 8 18:15:47 2015 +0300 oleaut32/tests: Some tests for IsMatchingType(). --- dlls/oleaut32/recinfo.c | 7 +----- dlls/oleaut32/tests/test_reg.idl | 8 +++++++ dlls/oleaut32/tests/test_tlb.idl | 10 ++++++++ dlls/oleaut32/tests/typelib.c | 12 +++++++--- dlls/oleaut32/tests/vartype.c | 50 ++++++++++++++++++++++++++++++++++++---- 5 files changed, 73 insertions(+), 14 deletions(-) diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c index d6da64a..be61fd5 100644 --- a/dlls/oleaut32/recinfo.c +++ b/dlls/oleaut32/recinfo.c @@ -517,12 +517,7 @@ static BOOL WINAPI IRecordInfoImpl_IsMatchingType(IRecordInfo *iface, IRecordInf TRACE( "(%p)->(%p)\n", This, info2 ); IRecordInfo_GetGuid( info2, &guid2 ); - if (IsEqualGUID( &This->guid, &guid2 )) return TRUE; - - FIXME( "records have different guids (%s %s) but could still match\n", - debugstr_guid( &This->guid ), debugstr_guid( &guid2 ) ); - - return FALSE; + return IsEqualGUID( &This->guid, &guid2 ); } static PVOID WINAPI IRecordInfoImpl_RecordCreate(IRecordInfo *iface) diff --git a/dlls/oleaut32/tests/test_reg.idl b/dlls/oleaut32/tests/test_reg.idl index ff32a1c..efc7c89 100644 --- a/dlls/oleaut32/tests/test_reg.idl +++ b/dlls/oleaut32/tests/test_reg.idl @@ -142,4 +142,12 @@ library register_test [propputref, id(2)] LONG testprop2([in] IUnknown *i); } + + /* uuid is same as for test_struct2 in test_tlb.idl, fields are different */ + [uuid(4029f190-ca4a-4611-aeb9-673983cb96de)] + struct test_struct3 + { + UINT32 field; + HRESULT hr; + }; } diff --git a/dlls/oleaut32/tests/test_tlb.idl b/dlls/oleaut32/tests/test_tlb.idl index 59425be..fa084ec 100644 --- a/dlls/oleaut32/tests/test_tlb.idl +++ b/dlls/oleaut32/tests/test_tlb.idl @@ -48,4 +48,14 @@ library Test IDispatch *disp; BSTR bstr; }; + + /* identical to 'test_struct', only guid is different */ + [uuid(4029f190-ca4a-4611-aeb9-673983cb96de)] + struct test_struct2 + { + HRESULT hr; + VARIANT_BOOL b; + IDispatch *disp; + BSTR bstr; + }; } diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 45a56ea..5bde6f2 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -4002,6 +4002,11 @@ static const type_info info[] = { "test_struct", "{4029f190-ca4a-4611-aeb9-673983cb96dd}", /* kind */ TKIND_RECORD, /*flags*/ 0, /*align*/ 4, /*size*/ sizeof(struct test_struct) +}, +{ + "test_struct2", + "{4029f190-ca4a-4611-aeb9-673983cb96de}", + /* kind */ TKIND_RECORD, /*flags*/ 0, /*align*/ 4, /*size*/ sizeof(struct test_struct) } }; @@ -4210,7 +4215,7 @@ static void test_register_typelib(BOOL system_registration) { TYPEKIND kind; WORD flags; - } attrs[12] = + } attrs[13] = { { TKIND_INTERFACE, 0 }, { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE }, @@ -4223,7 +4228,8 @@ static void test_register_typelib(BOOL system_registration) { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE }, { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE }, { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE }, - { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE } + { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE }, + { TKIND_RECORD, 0 } }; trace("Starting %s typelib registration tests\n", @@ -4258,7 +4264,7 @@ static void test_register_typelib(BOOL system_registration) ok(hr == S_OK, "got %08x\n", hr); count = ITypeLib_GetTypeInfoCount(typelib); - ok(count == 12, "got %d\n", count); + ok(count == 13, "got %d\n", count); for(i = 0; i < count; i++) { diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 7894560..774aee2 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -6382,24 +6382,32 @@ static void test_recinfo(void) { static const WCHAR testW[] = {'t','e','s','t',0}; static WCHAR teststructW[] = {'t','e','s','t','_','s','t','r','u','c','t',0}; + static WCHAR teststruct2W[] = {'t','e','s','t','_','s','t','r','u','c','t','2',0}; + static WCHAR teststruct3W[] = {'t','e','s','t','_','s','t','r','u','c','t','3',0}; + WCHAR filenameW[MAX_PATH], filename2W[MAX_PATH]; + ITypeInfo *typeinfo, *typeinfo2, *typeinfo3; + IRecordInfo *recinfo, *recinfo2, *recinfo3; struct test_struct teststruct, testcopy; - WCHAR filenameW[MAX_PATH]; + ITypeLib *typelib, *typelib2; const char *filename; - IRecordInfo *recinfo; - ITypeInfo *typeinfo; DummyDispatch dispatch; - ITypeLib *typelib; TYPEATTR *attr; MEMBERID memid; UINT16 found; HRESULT hr; ULONG size; + BOOL ret; filename = create_test_typelib(2); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH); hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &typelib); ok(hr == S_OK, "got 0x%08x\n", hr); + filename = create_test_typelib(3); + MultiByteToWideChar(CP_ACP, 0, filename, -1, filename2W, MAX_PATH); + hr = LoadTypeLibEx(filename2W, REGKIND_NONE, &typelib2); + ok(hr == S_OK, "got 0x%08x\n", hr); + typeinfo = NULL; found = 1; hr = ITypeLib_FindName(typelib, teststructW, 0, &typeinfo, &memid, &found); @@ -6410,9 +6418,40 @@ static void test_recinfo(void) ok(IsEqualGUID(&attr->guid, &UUID_test_struct), "got %s\n", wine_dbgstr_guid(&attr->guid)); ok(attr->typekind == TKIND_RECORD, "got %d\n", attr->typekind); + typeinfo2 = NULL; + found = 1; + hr = ITypeLib_FindName(typelib, teststruct2W, 0, &typeinfo2, &memid, &found); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(typeinfo2 != NULL, "got %p\n", typeinfo2); + + typeinfo3 = NULL; + found = 1; + hr = ITypeLib_FindName(typelib2, teststruct3W, 0, &typeinfo3, &memid, &found); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(typeinfo3 != NULL, "got %p\n", typeinfo3); + hr = GetRecordInfoFromTypeInfo(typeinfo, &recinfo); ok(hr == S_OK, "got 0x%08x\n", hr); + hr = GetRecordInfoFromTypeInfo(typeinfo2, &recinfo2); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetRecordInfoFromTypeInfo(typeinfo3, &recinfo3); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* IsMatchingType, these two records only differ in GUIDs */ + ret = IRecordInfo_IsMatchingType(recinfo, recinfo2); + ok(!ret, "got %d\n", ret); + + /* these two have same GUIDs, but different set of fields */ + ret = IRecordInfo_IsMatchingType(recinfo2, recinfo3); + ok(ret, "got %d\n", ret); + + IRecordInfo_Release(recinfo3); + ITypeInfo_Release(typeinfo3); + IRecordInfo_Release(recinfo2); + ITypeInfo_Release(typeinfo2); + size = 0; hr = IRecordInfo_GetSize(recinfo, &size); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -6471,7 +6510,8 @@ static void test_recinfo(void) ITypeInfo_Release(typeinfo); ITypeLib_Release(typelib); - DeleteFileA(filename); + DeleteFileW(filenameW); + DeleteFileW(filename2W); } START_TEST(vartype)
1
0
0
0
Jacek Caban : wmsdkidl.idl: Added IWMWriter interface declaration.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 8c826a3c63551dc8f669bf614ac3b9655eb68ebc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c826a3c63551dc8f669bf614…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 9 16:46:53 2015 +0100 wmsdkidl.idl: Added IWMWriter interface declaration. --- include/wmsdkidl.idl | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/include/wmsdkidl.idl b/include/wmsdkidl.idl index 984e283..4e2dba7 100644 --- a/include/wmsdkidl.idl +++ b/include/wmsdkidl.idl @@ -516,6 +516,77 @@ interface IWMSyncReader : IUnknown [in] IStream *pStream); }; +[ + object, + uuid(96406bd5-2b2b-11d3-b36b-00c04f6108ff), + pointer_default(unique), + local +] +interface IWMInputMediaProps : IWMMediaProps +{ + HRESULT GetConnectionName( + [out, size_is(*pcchName)] WCHAR *pwszName, + [in, out] WORD *pcchName); + + HRESULT GetGroupName( + [out, size_is(*pcchName)] WCHAR *pwszName, + [in, out] WORD *pcchName); +} + +[ + object, + uuid(96406bd4-2b2b-11d3-b36b-00c04f6108ff), + pointer_default(unique), + local +] +interface IWMWriter : IUnknown +{ + HRESULT SetProfileByID( + [in] REFGUID guidProfile); + + HRESULT SetProfile( + [in] IWMProfile *pProfile); + + HRESULT SetOutputFilename( + [in] const WCHAR *pwszFilename); + + HRESULT GetInputCount( + [out] DWORD *pcInputs); + + HRESULT GetInputProps( + [in] DWORD dwInputNum, + [out] IWMInputMediaProps **ppInput); + + HRESULT SetInputProps( + [in] DWORD dwInputNum, + [in] IWMInputMediaProps *pInput); + + HRESULT GetInputFormatCount( + [in] DWORD dwInputNumber, + [out] DWORD *pcFormats); + + HRESULT GetInputFormat( + [in] DWORD dwInputNumber, + [in] DWORD dwFormatNumber, + [out] IWMInputMediaProps **pProps); + + HRESULT BeginWriting(); + + HRESULT EndWriting(); + + HRESULT AllocateSample( + [in] DWORD dwSampleSize, + [out] INSSBuffer **ppSample); + + HRESULT WriteSample( + [in] DWORD dwInputNum, + [in] QWORD cnsSampleTime, + [in] DWORD dwFlags, + [in] INSSBuffer *pSample); + + HRESULT Flush(); +} + cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_Base, 0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);") cpp_quote("EXTERN_GUID(WMMEDIATYPE_Video, 0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);") cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB1, 0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDOMAttribute2:: get_expando implementation.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 7bce21c0874459be3ca8feeea300aa12d1fa95e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7bce21c0874459be3ca8feeea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 9 15:36:13 2015 +0100 mshtml: Added IHTMLDOMAttribute2::get_expando implementation. --- dlls/mshtml/htmlattr.c | 7 +++++-- dlls/mshtml/tests/dom.c | 52 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index b52f9f9..8359847 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -314,8 +314,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_value(IHTMLDOMAttribute2 *iface, BST static HRESULT WINAPI HTMLDOMAttribute2_get_expando(IHTMLDOMAttribute2 *iface, VARIANT_BOOL *p) { HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + *p = get_dispid_type(This->dispid) == DISPEXPROP_BUILTIN ? VARIANT_FALSE : VARIANT_TRUE; + return S_OK; } static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType(IHTMLDOMAttribute2 *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 7ddfb77..f083bae 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -974,6 +974,17 @@ static IHTMLLabelElement *_get_label_iface(unsigned line, IUnknown *unk) return ret; } +#define get_attr2_iface(u) _get_attr2_iface(__LINE__,u) +static IHTMLDOMAttribute2 *_get_attr2_iface(unsigned line, IUnknown *unk) +{ + IHTMLDOMAttribute2 *ret; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMAttribute2, (void**)&ret); + ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMAttribute2: %08x\n", hres); + return ret; +} + #define test_node_name(u,n) _test_node_name(__LINE__,u,n) static void _test_node_name(unsigned line, IUnknown *unk, const char *exname) { @@ -1729,6 +1740,31 @@ static void _test_comment_text(unsigned line, IUnknown *unk, const char *extext) SysFreeString(text); } +#define test_attr_specified(a,b) _test_attr_specified(__LINE__,a,b) +static void _test_attr_specified(unsigned line, IHTMLDOMAttribute *attr, VARIANT_BOOL expected) +{ + VARIANT_BOOL specified; + HRESULT hres; + + hres = IHTMLDOMAttribute_get_specified(attr, &specified); + ok_(__FILE__,line)(hres == S_OK, "get_specified failed: %08x\n", hres); + ok_(__FILE__,line)(specified == expected, "specified = %x, expected %x\n", specified, expected); +} + +#define test_attr_expando(a,b) _test_attr_expando(__LINE__,a,b) +static void _test_attr_expando(unsigned line, IHTMLDOMAttribute *attr, VARIANT_BOOL expected) +{ + IHTMLDOMAttribute2 *attr2 = _get_attr2_iface(line, (IUnknown*)attr); + VARIANT_BOOL expando; + HRESULT hres; + + hres = IHTMLDOMAttribute2_get_expando(attr2, &expando); + ok_(__FILE__,line)(hres == S_OK, "get_expando failed: %08x\n", hres); + ok_(__FILE__,line)(expando == expected, "expando = %x, expected %x\n", expando, expected); + + IHTMLDOMAttribute2_Release(attr2); +} + #define test_comment_attrs(c) _test_comment_attrs(__LINE__,c) static void _test_comment_attrs(unsigned line, IUnknown *unk) { @@ -1753,6 +1789,8 @@ static void _test_comment_attrs(unsigned line, IUnknown *unk) ok(hres == S_OK, "getAttributeNode failed: %08x\n", hres); ok(attr != NULL, "attr == NULL\n"); + test_attr_expando(attr, VARIANT_TRUE); + IHTMLDOMAttribute_Release(attr); IHTMLCommentElement_Release(comment); IHTMLElement_Release(elem); @@ -3171,12 +3209,14 @@ static void test_attr_collection(IHTMLElement *elem) ok(hres == S_OK, "%d) get_nodeValue failed: %08x\n", i, hres); ok(V_VT(&val) == VT_BSTR, "id: V_VT(&val) = %d\n", V_VT(&val)); ok(!strcmp_wa(V_BSTR(&val), "attr"), "id: V_BSTR(&val) = %s\n", wine_dbgstr_w(V_BSTR(&val))); + test_attr_expando(dom_attr, VARIANT_FALSE); } else if(!strcmp_wa(name, "attr1")) { checked++; hres = IHTMLDOMAttribute_get_nodeValue(dom_attr, &val); ok(hres == S_OK, "%d) get_nodeValue failed: %08x\n", i, hres); ok(V_VT(&val) == VT_BSTR, "attr1: V_VT(&val) = %d\n", V_VT(&val)); ok(!strcmp_wa(V_BSTR(&val), "attr1"), "attr1: V_BSTR(&val) = %s\n", wine_dbgstr_w(V_BSTR(&val))); + test_attr_expando(dom_attr, VARIANT_TRUE); } else if(!strcmp_wa(name, "attr2")) { checked++; hres = IHTMLDOMAttribute_get_nodeValue(dom_attr, &val); @@ -3219,17 +3259,6 @@ static void test_attr_collection(IHTMLElement *elem) IHTMLAttributeCollection_Release(attr_col); } -#define test_attr_specified(a,b) _test_attr_specified(__LINE__,a,b) -static void _test_attr_specified(unsigned line, IHTMLDOMAttribute *attr, VARIANT_BOOL expected) -{ - VARIANT_BOOL specified; - HRESULT hres; - - hres = IHTMLDOMAttribute_get_specified(attr, &specified); - ok_(__FILE__,line)(hres == S_OK, "get_specified failed: %08x\n", hres); - ok_(__FILE__,line)(specified == expected, "specified = %x, expected %x\n", specified, expected); -} - #define test_elem_id(e,i) _test_elem_id(__LINE__,e,i) static void _test_elem_id(unsigned line, IUnknown *unk, const char *exid) { @@ -8019,6 +8048,7 @@ static void test_attr(IHTMLElement *elem) attr = get_elem_attr_node((IUnknown*)elem, "tabIndex", TRUE); test_attr_specified(attr, VARIANT_FALSE); + test_attr_expando(attr, VARIANT_FALSE); IHTMLDOMAttribute_Release(attr); }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDOMAttribute2 stub implementation.
by Alexandre Julliard
10 Mar '15
10 Mar '15
Module: wine Branch: master Commit: 25845c706582052b70b9f06f62f691e0d60839c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25845c706582052b70b9f06f6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 9 15:35:55 2015 +0100 mshtml: Added IHTMLDOMAttribute2 stub implementation. --- dlls/mshtml/htmlattr.c | 224 +++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/tests/dom.c | 1 + 3 files changed, 227 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=25845c706582052b70b9f…
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
78
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
Results per page:
10
25
50
100
200