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
February 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
696 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Added wrapper of nsIURI interface.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 1b31475fdb2b9a46b557225d319a93671d895458 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1b31475fdb2b9a46b557225…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 9 12:18:18 2006 +0100 mshtml: Added wrapper of nsIURI interface. --- dlls/mshtml/mshtml_private.h | 1 dlls/mshtml/nsiface.idl | 17 ++ dlls/mshtml/nsio.c | 365 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 380 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=1b31475fdb2b9a46b55…
1
0
0
0
Jacek Caban : mshtml: Better ns*String handling.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 7080c8d98ebc46fef3bedcb457e0be4643616a3d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7080c8d98ebc46fef3bedcb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 9 12:17:38 2006 +0100 mshtml: Better ns*String handling. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsembed.c | 11 +++++++++-- dlls/mshtml/nsiface.idl | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6640f90..019111e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -151,6 +151,7 @@ void init_nsio(nsIComponentManager*,nsIC nsIURI *get_nsIURI(LPCWSTR); nsACString *nsACString_Create(void); +PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*); void nsACString_SetData(nsACString*,const char*); void nsACString_Destroy(nsACString*); diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 004901e..93533af 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -50,6 +50,13 @@ struct nsStringContainer { void *d3; }; +struct nsCStringContainer { + void *v; + void *d1; + PRUint32 d2; + void *d3; +}; + static nsresult (*NS_InitXPCOM2)(nsIServiceManager**,void*,void*); static nsresult (*NS_ShutdownXPCOM)(nsIServiceManager*); static nsresult (*NS_GetComponentRegistrar)(nsIComponentRegistrar**); @@ -60,7 +67,7 @@ static nsresult (*NS_CStringContainerFin static nsresult (*NS_StringSetData)(nsAString*,const PRUnichar*,PRUint32); static nsresult (*NS_CStringSetData)(nsACString*,const char*,PRUint32); static nsresult (*NS_NewLocalFile)(const nsAString*,PRBool,nsIFile**); -static PRUint32 (*NS_CStringGetData)(nsACString*,const char**,PRBool*); +static PRUint32 (*NS_CStringGetData)(const nsACString*,const char**,PRBool*); static HINSTANCE hXPCOM = NULL; @@ -370,7 +377,7 @@ void nsACString_SetData(nsACString *str, NS_CStringSetData(str, data, PR_UINT32_MAX); } -static PRUint32 nsACString_GetData(nsACString *str, const char **data, PRBool *termited) +PRUint32 nsACString_GetData(const nsACString *str, const char **data, PRBool *termited) { return NS_CStringGetData(str, data, termited); } diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index d97c3bd..cc2c7d0 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -46,9 +46,9 @@ typedef LARGE_INTEGER PRInt64; typedef ULARGE_INTEGER PRUint64; typedef PRUint64 DOMTimeStamp; +typedef struct nsCStringContainer nsCStringContainer; typedef struct nsStringContainer nsStringContainer; -typedef nsStringContainer nsCStringContainer; -typedef nsStringContainer nsACString; +typedef nsCStringContainer nsACString; typedef nsStringContainer nsAString; interface nsIWebBrowserChrome;
1
0
0
0
Jacek Caban : mshtml: Added wrapper of nsIOService.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 8aeb04934122dd0d4878a537ea0bf3da481515a1 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8aeb04934122dd0d4878a53…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 9 12:17:08 2006 +0100 mshtml: Added wrapper of nsIOService. --- dlls/mshtml/Makefile.in | 1 dlls/mshtml/mshtml_private.h | 1 dlls/mshtml/nsembed.c | 39 ------ dlls/mshtml/nsiface.idl | 7 + dlls/mshtml/nsio.c | 271 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 281 insertions(+), 38 deletions(-) create mode 100644 dlls/mshtml/nsio.c Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=8aeb04934122dd0d487…
1
0
0
0
Alexandre Julliard : ntdll: Better handling of errors when loading a builtin dll from an
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 69089152d136cbac78ababc007d9a4bcf64e0830 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=69089152d136cbac78ababc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 9 12:15:57 2006 +0100 ntdll: Better handling of errors when loading a builtin dll from an existing file. --- dlls/ntdll/loader.c | 47 +++++++++++++++++++++++++++-------------------- 1 files changed, 27 insertions(+), 20 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index d4e946a..00817ff 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1427,7 +1427,6 @@ static NTSTATUS load_builtin_dll( LPCWST DWORD flags, WINE_MODREF** pwm ) { char error[256], dllname[MAX_PATH]; - int file_exists; const WCHAR *name, *p; DWORD len, i; void *handle = NULL; @@ -1456,20 +1455,28 @@ static NTSTATUS load_builtin_dll( LPCWST if (!RtlDosPathNameToNtPathName_U( path, &nt_name, NULL, NULL )) return STATUS_DLL_NOT_FOUND; - if (!wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE )) + if (wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE )) { - file_exists = 1; - prev_info = builtin_load_info; - info.filename = nt_name.Buffer + 4; /* skip \??\ */ - builtin_load_info = &info; - handle = wine_dlopen( unix_name.Buffer, RTLD_NOW, error, sizeof(error) ); - builtin_load_info = prev_info; - RtlFreeHeap( GetProcessHeap(), 0, unix_name.Buffer ); + RtlFreeUnicodeString( &nt_name ); + return STATUS_DLL_NOT_FOUND; } + prev_info = builtin_load_info; + info.filename = nt_name.Buffer + 4; /* skip \??\ */ + builtin_load_info = &info; + handle = wine_dlopen( unix_name.Buffer, RTLD_NOW, error, sizeof(error) ); + builtin_load_info = prev_info; RtlFreeUnicodeString( &nt_name ); + RtlFreeHeap( GetProcessHeap(), 0, unix_name.Buffer ); + if (!handle) + { + WARN( "failed to load .so lib for builtin %s: %s\n", debugstr_w(path), error ); + return STATUS_INVALID_IMAGE_FORMAT; + } } else { + int file_exists; + /* we don't want to depend on the current codepage here */ len = strlenW( name ) + 1; if (len >= sizeof(dllname)) return STATUS_NAME_TOO_LONG; @@ -1484,20 +1491,20 @@ static NTSTATUS load_builtin_dll( LPCWST builtin_load_info = &info; handle = wine_dll_load( dllname, error, sizeof(error), &file_exists ); builtin_load_info = prev_info; - } - - if (!handle) - { - if (!file_exists) + if (!handle) { - /* The file does not exist -> WARN() */ - WARN("cannot open .so lib for builtin %s: %s\n", debugstr_w(name), error); - return STATUS_DLL_NOT_FOUND; + if (!file_exists) + { + /* The file does not exist -> WARN() */ + WARN("cannot open .so lib for builtin %s: %s\n", debugstr_w(name), error); + return STATUS_DLL_NOT_FOUND; + } + /* ERR() for all other errors (missing functions, ...) */ + ERR("failed to load .so lib for builtin %s: %s\n", debugstr_w(name), error ); + return STATUS_PROCEDURE_NOT_FOUND; } - /* ERR() for all other errors (missing functions, ...) */ - ERR("failed to load .so lib for builtin %s: %s\n", debugstr_w(name), error ); - return STATUS_PROCEDURE_NOT_FOUND; } + if (info.status != STATUS_SUCCESS) return info.status; if (!info.wm)
1
0
0
0
James Hawkins : setupapi: Error out if ReturnBuffer is NULL but ReturnBufferSize is not 0.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: f201c9e9844991417a9bab1e2df608c0cf466923 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f201c9e9844991417a9bab1…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Feb 9 12:12:36 2006 +0100 setupapi: Error out if ReturnBuffer is NULL but ReturnBufferSize is not 0. --- dlls/setupapi/query.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index b70ce80..79d068c 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -168,7 +168,15 @@ BOOL WINAPI SetupQueryInfFileInformation *RequiredSize = size; if (!ReturnBuffer) + { + if (ReturnBufferSize) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + return TRUE; + } if (size > ReturnBufferSize) {
1
0
0
0
James Hawkins : setupapi: Convert InfSpec to unicode if SearchControl is not
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: a1141ee7647fe4107f3b9a6ef9ec776837fcbc02 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a1141ee7647fe4107f3b9a6…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Feb 9 12:12:11 2006 +0100 setupapi: Convert InfSpec to unicode if SearchControl is not INFINFO_INF_SPEC_IS_HINF. --- dlls/setupapi/query.c | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index 6edf856..b70ce80 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -63,16 +63,29 @@ static BOOL fill_inf_info(HINF inf, PSP_ /*********************************************************************** * SetupGetInfInformationA (SETUPAPI.@) * - * BUGS - * If SearchControl is anything other than INFINFO_INF_SPEC_IS_HINF, - * then InfSpec needs to be converted to unicode. */ BOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec, DWORD SearchControl, PSP_INF_INFORMATION ReturnBuffer, DWORD ReturnBufferSize, PDWORD RequiredSize) { - return SetupGetInfInformationW(InfSpec, SearchControl, ReturnBuffer, - ReturnBufferSize, RequiredSize); + LPWSTR inf = (LPWSTR)InfSpec; + DWORD len; + BOOL ret; + + if (InfSpec && SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE) + { + len = lstrlenA(InfSpec) + 1; + inf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, InfSpec, -1, inf, len); + } + + ret = SetupGetInfInformationW(inf, SearchControl, ReturnBuffer, + ReturnBufferSize, RequiredSize); + + if (SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE) + HeapFree(GetProcessHeap(), 0, inf); + + return ret; } /***********************************************************************
1
0
0
0
Robert Shearman : oleaut: Make TLB_ReadTypeLib not rely on the signature of executables or dlls.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: a633e22bdd598993ea4d21964c8b8bd453fa58dc URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a633e22bdd598993ea4d219…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Feb 9 12:11:54 2006 +0100 oleaut: Make TLB_ReadTypeLib not rely on the signature of executables or dlls. Try loading the dll first and then fall back to the regular file case. Only call SearchPath for the regular file case since LoadLibraryEx will do this for us and it previously excluded builtin dlls and executables from having their type libraries opened. --- dlls/oleaut32/typelib.c | 146 ++++++++++++++++++++++------------------------- 1 files changed, 69 insertions(+), 77 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 77f1f5f..a516fa5 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2168,37 +2168,48 @@ static int TLB_ReadTypeLib(LPCWSTR pszFi { ITypeLibImpl *entry; int ret = TYPE_E_CANTLOADLIBRARY; - DWORD dwSignature = 0; - HANDLE hFile; INT index = 1; + HINSTANCE hinstDLL; *ppTypeLib = NULL; - if (!SearchPathW(NULL, pszFileName, NULL, cchPath, pszPath, NULL)) - { - WCHAR szFileCopy[MAX_PATH+1]; - /* Look for a trailing '\\' followed by an index */ - WCHAR *pIndexStr = strrchrW(pszFileName, '\\'); + /* first try loading as a dll and access the typelib as a resource */ + hinstDLL = LoadLibraryExW(pszFileName, 0, DONT_RESOLVE_DLL_REFERENCES | + LOAD_LIBRARY_AS_DATAFILE | LOAD_WITH_ALTERED_SEARCH_PATH); + if (!hinstDLL) + { + /* it may have been specified with resource index appended to the + * path, so remove it and try again */ + const WCHAR *pIndexStr = strrchrW(pszFileName, '\\'); if(pIndexStr && pIndexStr != pszFileName && *++pIndexStr != '\0') { index = atoiW(pIndexStr); - memcpy(szFileCopy, pszFileName, + memcpy(pszPath, pszFileName, (pIndexStr - pszFileName - 1) * sizeof(WCHAR)); - szFileCopy[pIndexStr - pszFileName - 1] = '\0'; - if (!SearchPathW(NULL, szFileCopy, NULL, cchPath, pszPath, NULL)) - return TYPE_E_CANTLOADLIBRARY; - if (GetFileAttributesW(szFileCopy) & FILE_ATTRIBUTE_DIRECTORY) - return TYPE_E_CANTLOADLIBRARY; + pszPath[pIndexStr - pszFileName - 1] = '\0'; + + hinstDLL = LoadLibraryExW(pszPath, 0, DONT_RESOLVE_DLL_REFERENCES | + LOAD_LIBRARY_AS_DATAFILE | LOAD_WITH_ALTERED_SEARCH_PATH); } } + /* get the path to the specified typelib file */ + if (hinstDLL) + GetModuleFileNameW(hinstDLL, pszPath, cchPath); + else + { + /* otherwise, try loading as a regular file */ + if (!SearchPathW(NULL, pszFileName, NULL, cchPath, pszPath, NULL)) + return TYPE_E_CANTLOADLIBRARY; + } + TRACE_(typelib)("File %s index %d\n", debugstr_w(pszPath), index); /* We look the path up in the typelib cache. If found, we just addref it, and return the pointer. */ EnterCriticalSection(&cache_section); for (entry = tlb_cache_first; entry != NULL; entry = entry->next) { - if (!strcmpiW(entry->path, pszFileName) && entry->index == index) + if (!strcmpiW(entry->path, pszPath) && entry->index == index) { TRACE("cache hit\n"); *ppTypeLib = (ITypeLib2*)entry; @@ -2209,80 +2220,61 @@ static int TLB_ReadTypeLib(LPCWSTR pszFi } LeaveCriticalSection(&cache_section); - /* check the signature of the file */ - hFile = CreateFileW( pszPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - if (INVALID_HANDLE_VALUE != hFile) + /* now actually load and parse the typelib */ + if (hinstDLL) { - HANDLE hMapping = CreateFileMappingW( hFile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL ); - if (hMapping) - { - LPVOID pBase = MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0); - if(pBase) + static const WCHAR TYPELIBW[] = {'T','Y','P','E','L','I','B',0}; + HRSRC hrsrc = FindResourceW(hinstDLL, MAKEINTRESOURCEW(index), TYPELIBW); + if (hrsrc) { - /* retrieve file size */ - DWORD dwTLBLength = GetFileSize(hFile, NULL); + HGLOBAL hGlobal = LoadResource(hinstDLL, hrsrc); + if (hGlobal) + { + LPVOID pBase = LockResource(hGlobal); + DWORD dwTLBLength = SizeofResource(hinstDLL, hrsrc); - /* first try to load as *.tlb */ - dwSignature = FromLEDWord(*((DWORD*) pBase)); - if ( dwSignature == MSFT_SIGNATURE) - { - *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); - } - else if ( dwSignature == SLTG_SIGNATURE) - { - *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); - } - UnmapViewOfFile(pBase); + if (pBase) + { + /* try to load as incore resource */ + DWORD dwSignature = FromLEDWord(*((DWORD*) pBase)); + if (dwSignature == MSFT_SIGNATURE) + *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); + else if (dwSignature == SLTG_SIGNATURE) + *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); + else + FIXME("Header type magic 0x%08lx not supported.\n",dwSignature); + } + FreeResource( hGlobal ); + } } - CloseHandle(hMapping); - } - CloseHandle(hFile); + FreeLibrary(hinstDLL); } else { - TRACE("not found, trying to load %s as library\n", debugstr_w(pszFileName)); - } - - /* if the file is a DLL or not found, try loading it with LoadLibrary */ - if (((WORD)dwSignature == IMAGE_DOS_SIGNATURE) || (dwSignature == 0)) - { - /* find the typelibrary resource*/ - HINSTANCE hinstDLL = LoadLibraryExW(pszPath, 0, DONT_RESOLVE_DLL_REFERENCES| - LOAD_LIBRARY_AS_DATAFILE|LOAD_WITH_ALTERED_SEARCH_PATH); - if (hinstDLL) - { - static const WCHAR TYPELIBW[] = {'T','Y','P','E','L','I','B',0}; - HRSRC hrsrc = FindResourceW(hinstDLL, MAKEINTRESOURCEW(index), TYPELIBW); - if (hrsrc) + HANDLE hFile = CreateFileW( pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); + if (INVALID_HANDLE_VALUE != hFile) { - HGLOBAL hGlobal = LoadResource(hinstDLL, hrsrc); - if (hGlobal) - { - LPVOID pBase = LockResource(hGlobal); - DWORD dwTLBLength = SizeofResource(hinstDLL, hrsrc); - - if (pBase) + HANDLE hMapping = CreateFileMappingW( hFile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL ); + if (hMapping) { - /* try to load as incore resource */ - dwSignature = FromLEDWord(*((DWORD*) pBase)); - if ( dwSignature == MSFT_SIGNATURE) - { - *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); - } - else if ( dwSignature == SLTG_SIGNATURE) - { - *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); - } - else - { - FIXME("Header type magic 0x%08lx not supported.\n",dwSignature); - } + LPVOID pBase = MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0); + if(pBase) + { + /* retrieve file size */ + DWORD dwTLBLength = GetFileSize(hFile, NULL); + DWORD dwSignature = FromLEDWord(*((DWORD*) pBase)); + + if (dwSignature == MSFT_SIGNATURE) + *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); + else if (dwSignature == SLTG_SIGNATURE) + *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); + + UnmapViewOfFile(pBase); + } + CloseHandle(hMapping); } - FreeResource( hGlobal ); - } + CloseHandle(hFile); } - FreeLibrary(hinstDLL); - } } if(*ppTypeLib) {
1
0
0
0
Robert Shearman : oleaut: Move the call to SearchPath inside of TLB_ReadTypeLib.
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 19b6046e2186fc11d709a64ff39053599d72e0c9 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=19b6046e2186fc11d709a64…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Feb 9 12:11:01 2006 +0100 oleaut: Move the call to SearchPath inside of TLB_ReadTypeLib. --- dlls/oleaut32/typelib.c | 59 ++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 32 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 8cface4..77f1f5f 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -196,7 +196,7 @@ static WCHAR *get_lcid_subkey( LCID lcid return buffer; } -int TLB_ReadTypeLib(LPCWSTR file, INT index, ITypeLib2 **ppTypelib); +static int TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib); /**************************************************************************** @@ -333,38 +333,14 @@ HRESULT WINAPI LoadTypeLibEx( REGKIND regkind, /* [in] Specify kind of registration */ ITypeLib **pptLib) /* [out] Pointer to pointer to loaded type library */ { - WCHAR szPath[MAX_PATH+1], szFileCopy[MAX_PATH+1]; - WCHAR *pIndexStr; + WCHAR szPath[MAX_PATH+1]; HRESULT res; - INT index = 1; TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib); - /* by default try and load using LoadLibrary (for builtin stdole32.tlb) */ - memcpy(szPath, szFile, (strlenW(szFile)+1)*sizeof(WCHAR)); - *pptLib = NULL; - if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath, - NULL)) { - - /* Look for a trailing '\\' followed by an index */ - pIndexStr = strrchrW(szFile, '\\'); - if(pIndexStr && pIndexStr != szFile && *++pIndexStr != '\0') { - index = atoiW(pIndexStr); - memcpy(szFileCopy, szFile, - (pIndexStr - szFile - 1) * sizeof(WCHAR)); - szFileCopy[pIndexStr - szFile - 1] = '\0'; - if(!SearchPathW(NULL,szFileCopy,NULL,sizeof(szPath)/sizeof(WCHAR), - szPath,NULL)) - return TYPE_E_CANTLOADLIBRARY; - if (GetFileAttributesW(szFileCopy) & FILE_ATTRIBUTE_DIRECTORY) - return TYPE_E_CANTLOADLIBRARY; - } - } - TRACE("File %s index %d\n", debugstr_w(szPath), index); - - res = TLB_ReadTypeLib(szPath, index, (ITypeLib2**)pptLib); + res = TLB_ReadTypeLib(szFile, szPath, MAX_PATH + 1, (ITypeLib2**)pptLib); if (SUCCEEDED(res)) switch(regkind) @@ -2188,17 +2164,36 @@ static CRITICAL_SECTION cache_section = */ #define MSFT_SIGNATURE 0x5446534D /* "MSFT" */ #define SLTG_SIGNATURE 0x47544c53 /* "SLTG" */ -int TLB_ReadTypeLib(LPCWSTR pszFileName, INT index, ITypeLib2 **ppTypeLib) +static int TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib) { ITypeLibImpl *entry; int ret = TYPE_E_CANTLOADLIBRARY; DWORD dwSignature = 0; HANDLE hFile; - - TRACE_(typelib)("%s:%d\n", debugstr_w(pszFileName), index); + INT index = 1; *ppTypeLib = NULL; + if (!SearchPathW(NULL, pszFileName, NULL, cchPath, pszPath, NULL)) + { + WCHAR szFileCopy[MAX_PATH+1]; + /* Look for a trailing '\\' followed by an index */ + WCHAR *pIndexStr = strrchrW(pszFileName, '\\'); + if(pIndexStr && pIndexStr != pszFileName && *++pIndexStr != '\0') + { + index = atoiW(pIndexStr); + memcpy(szFileCopy, pszFileName, + (pIndexStr - pszFileName - 1) * sizeof(WCHAR)); + szFileCopy[pIndexStr - pszFileName - 1] = '\0'; + if (!SearchPathW(NULL, szFileCopy, NULL, cchPath, pszPath, NULL)) + return TYPE_E_CANTLOADLIBRARY; + if (GetFileAttributesW(szFileCopy) & FILE_ATTRIBUTE_DIRECTORY) + return TYPE_E_CANTLOADLIBRARY; + } + } + + TRACE_(typelib)("File %s index %d\n", debugstr_w(pszPath), index); + /* We look the path up in the typelib cache. If found, we just addref it, and return the pointer. */ EnterCriticalSection(&cache_section); for (entry = tlb_cache_first; entry != NULL; entry = entry->next) @@ -2215,7 +2210,7 @@ int TLB_ReadTypeLib(LPCWSTR pszFileName, LeaveCriticalSection(&cache_section); /* check the signature of the file */ - hFile = CreateFileW( pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); + hFile = CreateFileW( pszPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); if (INVALID_HANDLE_VALUE != hFile) { HANDLE hMapping = CreateFileMappingW( hFile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL ); @@ -2252,7 +2247,7 @@ int TLB_ReadTypeLib(LPCWSTR pszFileName, if (((WORD)dwSignature == IMAGE_DOS_SIGNATURE) || (dwSignature == 0)) { /* find the typelibrary resource*/ - HINSTANCE hinstDLL = LoadLibraryExW(pszFileName, 0, DONT_RESOLVE_DLL_REFERENCES| + HINSTANCE hinstDLL = LoadLibraryExW(pszPath, 0, DONT_RESOLVE_DLL_REFERENCES| LOAD_LIBRARY_AS_DATAFILE|LOAD_WITH_ALTERED_SEARCH_PATH); if (hinstDLL) {
1
0
0
0
Robert Shearman : oleaut: Revert incorrect patch changing the order of parameters passed
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 00ecbd05e8945e9f9e6fda078e13b0491e5dd73b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=00ecbd05e8945e9f9e6fda0…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Feb 9 12:10:26 2006 +0100 oleaut: Revert incorrect patch changing the order of parameters passed into DispCallFunc. A test with native indeed shows that the parameter index increases from the leftmost parameter to the rightmost. --- dlls/oleaut32/typelib.c | 67 ++++++++++++++++++----------------------------- 1 files changed, 26 insertions(+), 41 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 8791736..8cface4 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5112,9 +5112,6 @@ static HRESULT typedescvt_to_variantvt(I *|CC_MPWCDECL *|CC_MPWPASCAL * - * The rgpvarg array contains the parameters, but in the opposite order to - * what is usually assumed. The first parameter in rgpvarg is the last - * parameter in the function call and vice-versa. */ HRESULT WINAPI DispCallFunc( @@ -5148,11 +5145,10 @@ DispCallFunc( argspos++; } - for (i = cActuals - 1; i >= 0; i--) + for (i=0;i<cActuals;i++) { VARIANT *arg = prgpvarg[i]; - TRACE("Storing arg %d from left (%d as %d)\n", cActuals - 1 - i, - V_VT(arg), prgvt[i]); + TRACE("Storing arg %d (%d as %d)\n",i,V_VT(arg),prgvt[i]); memcpy(&args[argspos], &V_NONE(arg), _argsize(prgvt[i]) * sizeof(DWORD)); argspos += _argsize(prgvt[i]); } @@ -5239,9 +5235,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke hres = S_OK; for (i = 0; i < func_desc->cParams; i++) { - UINT varindex = func_desc->cParams - 1 - i; TYPEDESC *tdesc = &func_desc->lprgelemdescParam[i].tdesc; - hres = typedescvt_to_variantvt((ITypeInfo *)iface, tdesc, &rgvt[varindex]); + hres = typedescvt_to_variantvt((ITypeInfo *)iface, tdesc, &rgvt[i]); if (FAILED(hres)) goto func_fail; } @@ -5250,7 +5245,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke for (i = 0; i < func_desc->cParams; i++) { USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; - UINT varindex = func_desc->cParams - 1 - i; if (wParamFlags & PARAMFLAG_FRETVAL) { @@ -5260,9 +5254,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke if (i == func_desc->cParams - 1) { VARIANTARG *arg; - arg = prgpvarg[varindex] = &rgvarg[varindex]; + arg = prgpvarg[i] = &rgvarg[i]; memset(arg, 0, sizeof(*arg)); - V_VT(arg) = rgvt[varindex]; + V_VT(arg) = rgvt[i]; memset(&retval, 0, sizeof(retval)); V_BYREF(arg) = &retval; } @@ -5276,38 +5270,35 @@ static HRESULT WINAPI ITypeInfo_fnInvoke else if (i < pDispParams->cArgs) { VARIANTARG *src_arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - i]; - V_VT(&rgvarg[varindex]) = V_VT(src_arg); + V_VT(&rgvarg[i]) = V_VT(src_arg); dump_Variant(src_arg); /* FIXME: this doesn't work for VT_BYREF arguments if * they are not the same type as in the paramdesc */ - if ((rgvt[varindex] & VT_BYREF) && !V_ISBYREF(src_arg)) + if ((rgvt[i] & VT_BYREF) && !V_ISBYREF(src_arg)) { VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams); - V_VT(&missing_arg[varindex]) = V_VT(src_arg); - hres = VariantChangeType(&missing_arg[varindex], - src_arg, 0, - rgvt[varindex] & ~VT_BYREF); - V_BYREF(&rgvarg[varindex]) = &V_NONE(&missing_arg[varindex]); + V_VT(&missing_arg[i]) = V_VT(src_arg); + hres = VariantChangeType(&missing_arg[i], src_arg, 0, rgvt[i] & ~VT_BYREF); + V_BYREF(&rgvarg[i]) = &V_NONE(&missing_arg[i]); } else - hres = VariantChangeType(&rgvarg[varindex], src_arg, - 0, rgvt[varindex]); + hres = VariantChangeType(&rgvarg[i], src_arg, 0, rgvt[i]); if (FAILED(hres)) { ERR("failed to convert param %d to %s%s from %s%s\n", i, - debugstr_vt(rgvt[varindex]), debugstr_vf(rgvt[varindex]), + debugstr_vt(rgvt[i]), debugstr_vf(rgvt[i]), debugstr_VT(src_arg), debugstr_VF(src_arg)); break; } - V_VT(&rgvarg[varindex]) = rgvt[varindex]; - prgpvarg[varindex] = &rgvarg[varindex]; + V_VT(&rgvarg[i]) = rgvt[i]; + prgpvarg[i] = &rgvarg[i]; } else if (wParamFlags & PARAMFLAG_FOPT) { VARIANTARG *arg; - arg = prgpvarg[varindex] = &rgvarg[varindex]; + arg = prgpvarg[i] = &rgvarg[i]; if (wParamFlags & PARAMFLAG_FHASDEFAULT) { hres = VariantCopy(arg, &func_desc->lprgelemdescParam[i].u.paramdesc.pparamdescex->varDefaultValue); @@ -5318,7 +5309,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke { VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams); V_VT(arg) = VT_VARIANT | VT_BYREF; - V_VARIANTREF(arg) = &missing_arg[varindex]; + V_VARIANTREF(arg) = &missing_arg[i]; V_VT(V_VARIANTREF(arg)) = VT_ERROR; V_ERROR(V_VARIANTREF(arg)) = DISP_E_PARAMNOTFOUND; } @@ -5347,44 +5338,38 @@ static HRESULT WINAPI ITypeInfo_fnInvoke for (i = 0; i < func_desc->cParams; i++) { - UINT varindex = func_desc->cParams - 1 - i; USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; if (wParamFlags & PARAMFLAG_FRETVAL) { if (TRACE_ON(ole)) { TRACE("[retval] value: "); - dump_Variant(prgpvarg[varindex]); + dump_Variant(prgpvarg[i]); } if (pVarResult) - { /* deref return value */ - hres = VariantCopyInd(pVarResult, prgpvarg[varindex]); - TRACE("derefed [retval] value: "); - dump_Variant(pVarResult); - } + hres = VariantCopyInd(pVarResult, prgpvarg[i]); /* free data stored in varresult. Note that * VariantClear doesn't do what we want because we are * working with byref types. */ /* FIXME: clear safearrays, bstrs, records and * variants here too */ - if ((V_VT(prgpvarg[varindex]) == (VT_UNKNOWN | VT_BYREF)) || - (V_VT(prgpvarg[varindex]) == (VT_DISPATCH | VT_BYREF))) + if ((V_VT(prgpvarg[i]) == (VT_UNKNOWN | VT_BYREF)) || + (V_VT(prgpvarg[i]) == (VT_DISPATCH | VT_BYREF))) { - if(*V_UNKNOWNREF(prgpvarg[varindex])) - IUnknown_Release(*V_UNKNOWNREF(prgpvarg[varindex])); + if(*V_UNKNOWNREF(prgpvarg[i])) + IUnknown_Release(*V_UNKNOWNREF(prgpvarg[i])); } break; } - - if (i < pDispParams->cArgs) + else if (i < pDispParams->cArgs) { if (wParamFlags & PARAMFLAG_FOUT) { hres = VariantChangeType(&pDispParams->rgvarg[pDispParams->cArgs - 1 - i], - &rgvarg[varindex], 0, + &rgvarg[i], 0, V_VT(&pDispParams->rgvarg[pDispParams->cArgs - 1 - i])); if (FAILED(hres)) { @@ -5393,12 +5378,12 @@ static HRESULT WINAPI ITypeInfo_fnInvoke break; } } - VariantClear(&rgvarg[varindex]); + VariantClear(&rgvarg[i]); } else if (wParamFlags & PARAMFLAG_FOPT) { if (wParamFlags & PARAMFLAG_FHASDEFAULT) - VariantClear(&rgvarg[varindex]); + VariantClear(&rgvarg[i]); } }
1
0
0
0
Robert Shearman : widl: Write out more TYPEFLAGs and add more type library-specific
by Alexandre Julliard
09 Feb '06
09 Feb '06
Module: wine Branch: refs/heads/master Commit: 91c35be7cc38289e622ccfa7863ed7ac024e1610 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=91c35be7cc38289e622ccfa…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Feb 9 12:10:08 2006 +0100 widl: Write out more TYPEFLAGs and add more type library-specific attributes to the parser. --- tools/widl/parser.l | 19 +++++++------------ tools/widl/parser.y | 25 +++++++++++++++++++------ tools/widl/widltypes.h | 8 ++++++++ tools/widl/write_msft.c | 22 +++++++++++++++++++++- 4 files changed, 55 insertions(+), 19 deletions(-) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index c053c12..6087197 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -179,7 +179,6 @@ static struct keyword { {"aggregatable", tAGGREGATABLE}, {"allocate", tALLOCATE}, {"appobject", tAPPOBJECT}, - {"arrays", tARRAYS}, {"async", tASYNC}, {"async_uuid", tASYNCUUID}, {"auto_handle", tAUTOHANDLE}, @@ -203,51 +202,45 @@ static struct keyword { {"cpp_quote", tCPPQUOTE}, /* ... */ {"default", tDEFAULT}, + {"defaultcollelem", tDEFAULTCOLLELEM}, {"defaultvalue", tDEFAULTVALUE}, -/* ... */ + {"defaultvtable", tDEFAULTVTABLE}, {"dispinterface", tDISPINTERFACE}, -/* ... */ {"displaybind", tDISPLAYBIND}, {"dllname", tDLLNAME}, {"double", tDOUBLE}, {"dual", tDUAL}, -/* ... */ {"endpoint", tENDPOINT}, {"entry", tENTRY}, {"enum", tENUM}, {"error_status_t", tERRORSTATUST}, {"explicit_handle", tEXPLICITHANDLE}, {"extern", tEXTERN}, -/* ... */ {"float", tFLOAT}, -/* ... */ {"handle", tHANDLE}, {"handle_t", tHANDLET}, -/* ... */ {"helpcontext", tHELPCONTEXT}, {"helpfile", tHELPFILE}, {"helpstring", tHELPSTRING}, {"helpstringcontext", tHELPSTRINGCONTEXT}, {"helpstringdll", tHELPSTRINGDLL}, -/* ... */ {"hidden", tHIDDEN}, {"hyper", tHYPER}, {"id", tID}, {"idempotent", tIDEMPOTENT}, /* ... */ {"iid_is", tIIDIS}, -/* ... */ + {"immediatebind", tIMMEDIATEBIND}, {"implicit_handle", tIMPLICITHANDLE}, {"import", tIMPORT}, {"importlib", tIMPORTLIB}, {"in", tIN}, - {"include", tINCLUDE}, {"in_line", tINLINE}, {"input_sync", tINPUTSYNC}, {"int", tINT}, /* ... */ {"interface", tINTERFACE}, -/* ... */ + {"lcid", tLCID}, {"length_is", tLENGTHIS}, {"library", tLIBRARY}, /* ... */ @@ -258,7 +251,9 @@ static struct keyword { /* ... */ {"module", tMODULE}, /* ... */ + {"nonbrowsable", tNONBROWSABLE}, {"noncreatable", tNONCREATABLE}, + {"nonextensible", tNONEXTENSIBLE}, {"object", tOBJECT}, {"odl", tODL}, {"oleautomation", tOLEAUTOMATION}, @@ -279,7 +274,7 @@ static struct keyword { /* ... */ {"readonly", tREADONLY}, {"ref", tREF}, -/* ... */ + {"requestedit", tREQUESTEDIT}, {"restricted", tRESTRICTED}, {"retval", tRETVAL}, /* ... */ diff --git a/tools/widl/parser.y b/tools/widl/parser.y index d6f0f6b..77219d8 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -126,13 +126,15 @@ static type_t std_uhyper = { "MIDL_uhype %token <uuid> aUUID %token aEOF %token SHL SHR -%token tAGGREGATABLE tALLOCATE tAPPOBJECT tARRAYS tASYNC tASYNCUUID +%token tAGGREGATABLE tALLOCATE tAPPOBJECT tASYNC tASYNCUUID %token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT %token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS %token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE %token tCONTEXTHANDLESERIALIZE tCONTROL tCPPQUOTE %token tDEFAULT +%token tDEFAULTCOLLELEM %token tDEFAULTVALUE +%token tDEFAULTVTABLE %token tDISPLAYBIND %token tDISPINTERFACE %token tDLLNAME tDOUBLE tDUAL @@ -147,18 +149,22 @@ static type_t std_uhyper = { "MIDL_uhype %token tHIDDEN %token tHYPER tID tIDEMPOTENT %token tIIDIS +%token tIMMEDIATEBIND %token tIMPLICITHANDLE %token tIMPORT tIMPORTLIB -%token tIN tINCLUDE tINLINE +%token tIN tINLINE %token tINPUTSYNC %token tINT tINT64 %token tINTERFACE +%token tLCID %token tLENGTHIS tLIBRARY %token tLOCAL %token tLONG %token tMETHODS %token tMODULE +%token tNONBROWSABLE %token tNONCREATABLE +%token tNONEXTENSIBLE %token tOBJECT tODL tOLEAUTOMATION %token tOPTIONAL %token tOUT @@ -169,6 +175,7 @@ static type_t std_uhyper = { "MIDL_uhype %token tPUBLIC %token tRANGE %token tREADONLY tREF +%token tREQUESTEDIT %token tRESTRICTED %token tRETVAL %token tSHORT @@ -192,9 +199,6 @@ static type_t std_uhyper = { "MIDL_uhype %token tVOID %token tWCHAR tWIREMARSHAL -/* used in attr_t */ -%token tPOINTERTYPE - %type <attr> m_attributes attributes attrib_list attribute %type <expr> m_exprs /* exprs expr_list */ m_expr expr expr_list_const expr_const %type <expr> array array_list @@ -338,7 +342,9 @@ attrib_list: attribute ; attribute: - tASYNC { $$ = make_attr(ATTR_ASYNC); } + tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); } + | tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); } + | tASYNC { $$ = make_attr(ATTR_ASYNC); } | tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); } | tBINDABLE { $$ = make_attr(ATTR_BINDABLE); } | tCALLAS '(' ident ')' { $$ = make_attrp(ATTR_CALLAS, $3); } @@ -348,8 +354,10 @@ attribute: | tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ } | tCONTROL { $$ = make_attr(ATTR_CONTROL); } | tDEFAULT { $$ = make_attr(ATTR_DEFAULT); } + | tDEFAULTCOLLELEM { $$ = make_attr(ATTR_DEFAULTCOLLELEM); } | tDEFAULTVALUE '(' expr_const ')' { $$ = make_attrp(ATTR_DEFAULTVALUE_EXPR, $3); } | tDEFAULTVALUE '(' aSTRING ')' { $$ = make_attrp(ATTR_DEFAULTVALUE_STRING, $3); } + | tDEFAULTVTABLE { $$ = make_attr(ATTR_DEFAULTVTABLE); } | tDISPLAYBIND { $$ = make_attr(ATTR_DISPLAYBIND); } | tDLLNAME '(' aSTRING ')' { $$ = make_attrp(ATTR_DLLNAME, $3); } | tDUAL { $$ = make_attr(ATTR_DUAL); } @@ -367,12 +375,15 @@ attribute: | tID '(' expr_const ')' { $$ = make_attrp(ATTR_ID, $3); } | tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); } | tIIDIS '(' ident ')' { $$ = make_attrp(ATTR_IIDIS, $3); } + | tIMMEDIATEBIND { $$ = make_attr(ATTR_IMMEDIATEBIND); } | tIMPLICITHANDLE '(' tHANDLET aIDENTIFIER ')' { $$ = make_attrp(ATTR_IMPLICIT_HANDLE, $4); } | tIN { $$ = make_attr(ATTR_IN); } | tINPUTSYNC { $$ = make_attr(ATTR_INPUTSYNC); } | tLENGTHIS '(' m_exprs ')' { $$ = make_attrp(ATTR_LENGTHIS, $3); } | tLOCAL { $$ = make_attr(ATTR_LOCAL); } + | tNONBROWSABLE { $$ = make_attr(ATTR_NONBROWSABLE); } | tNONCREATABLE { $$ = make_attr(ATTR_NONCREATABLE); } + | tNONEXTENSIBLE { $$ = make_attr(ATTR_NONEXTENSIBLE); } | tOBJECT { $$ = make_attr(ATTR_OBJECT); } | tODL { $$ = make_attr(ATTR_ODL); } | tOLEAUTOMATION { $$ = make_attr(ATTR_OLEAUTOMATION); } @@ -385,6 +396,7 @@ attribute: | tPUBLIC { $$ = make_attr(ATTR_PUBLIC); } | tRANGE '(' expr_const ',' expr_const ')' { LINK($5, $3); $$ = make_attrp(ATTR_RANGE, $5); } | tREADONLY { $$ = make_attr(ATTR_READONLY); } + | tREQUESTEDIT { $$ = make_attr(ATTR_REQUESTEDIT); } | tRESTRICTED { $$ = make_attr(ATTR_RESTRICTED); } | tRETVAL { $$ = make_attr(ATTR_RETVAL); } | tSIZEIS '(' m_exprs ')' { $$ = make_attrp(ATTR_SIZEIS, $3); } @@ -552,6 +564,7 @@ ident: aIDENTIFIER { $$ = make_var( | aKNOWNTYPE { $$ = make_var($<str>1); } | tASYNC { $$ = make_var($<str>1); } | tID { $$ = make_var($<str>1); } + | tLCID { $$ = make_var($<str>1); } | tRANGE { $$ = make_var($<str>1); } | tRETVAL { $$ = make_var($<str>1); } | tVERSION { $$ = make_var($<str>1); } diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 6af89ad..30620d0 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -56,6 +56,8 @@ typedef struct _typelib_t typelib_t; enum attr_type { + ATTR_AGGREGATABLE, + ATTR_APPOBJECT, ATTR_ASYNC, ATTR_AUTO_HANDLE, ATTR_BINDABLE, @@ -64,8 +66,10 @@ enum attr_type ATTR_CONTEXTHANDLE, ATTR_CONTROL, ATTR_DEFAULT, + ATTR_DEFAULTCOLLELEM, ATTR_DEFAULTVALUE_EXPR, ATTR_DEFAULTVALUE_STRING, + ATTR_DEFAULTVTABLE, ATTR_DISPINTERFACE, ATTR_DISPLAYBIND, ATTR_DLLNAME, @@ -84,12 +88,15 @@ enum attr_type ATTR_ID, ATTR_IDEMPOTENT, ATTR_IIDIS, + ATTR_IMMEDIATEBIND, ATTR_IMPLICIT_HANDLE, ATTR_IN, ATTR_INPUTSYNC, ATTR_LENGTHIS, ATTR_LOCAL, + ATTR_NONBROWSABLE, ATTR_NONCREATABLE, + ATTR_NONEXTENSIBLE, ATTR_OBJECT, ATTR_ODL, ATTR_OLEAUTOMATION, @@ -103,6 +110,7 @@ enum attr_type ATTR_PUBLIC, ATTR_RANGE, ATTR_READONLY, + ATTR_REQUESTEDIT, ATTR_RESTRICTED, ATTR_RETVAL, ATTR_SIZEIS, diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index f749542..725b361 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1667,6 +1667,21 @@ static msft_typeinfo_t *create_msft_type for( ; attr; attr = NEXT_LINK(attr)) { switch(attr->type) { + case ATTR_AGGREGATABLE: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x400; /* TYPEFLAG_FAGGREGATABLE */ + break; + + case ATTR_APPOBJECT: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x1; /* TYPEFLAG_FAPPOBJECT */ + break; + + case ATTR_CONTROL: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x20; /* TYPEFLAG_FCONTROL */ + break; + case ATTR_DISPINTERFACE: break; @@ -1678,7 +1693,8 @@ static msft_typeinfo_t *create_msft_type } case ATTR_DUAL: - typeinfo->flags |= 0x40; /* TYPEFLAG_FDUAL */ + /* FIXME: check interface is compatible */ + typeinfo->flags |= 0x140; /* TYPEFLAG_FDUAL | TYPEFLAG_FOLEAUTOMATION */ break; case ATTR_HELPCONTEXT: @@ -1708,6 +1724,10 @@ static msft_typeinfo_t *create_msft_type typeinfo->flags &= ~0x2; /* TYPEFLAG_FCANCREATE */ break; + case ATTR_NONEXTENSIBLE: + typeinfo->flags |= 0x80; /* TYPEFLAG_FNONEXTENSIBLE */ + break; + case ATTR_ODL: break;
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
70
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
Results per page:
10
25
50
100
200