ReactOS.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
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
List overview
Download
Ros-diffs
August 2005
----- 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
ros-diffs@reactos.org
23 participants
669 discussions
Start a n
N
ew thread
[gvg] 17338: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Michael Jung <mjung(a)iss.tu-darmstadt.de> - Initial support for the IPersistFolder3 interface. - Use CP_UNIXCP instead of CP_ACP when converting paths (Pointed out by Troy Rollo). - Add file type column in detailed shell view. - Make the order of shell view columns 'prefix-compatible' with shfldr_fs. - Don't remove filename extensions for path pidls in GetDisplayNameOf. - Do filename postprocessing in GetDisplayNameOf (Hide filename extensions if appropriate). - Don't cache child pidls in UnixFolder, but create them on the fly. - Don't use unix filesystem specific attributes in UnixFolder's pidls. - Partially implemented UnixFolder's ISFHelper::CopyItems method. - Return correct HRESULT code in UnixFolder's IEnumIDList::Next. - Corresponding test. - Release shell folders only if they were successfully acquired. - Implemented UnixFolder's ISFHelper::DeleteItems interface. - Fail in SHGetDataFromIDList when called on special folder. - Return correct attributes in ParseDisplayName. - Register unixfs at desktop level in DllRegisterServer. - Fix two more corner cases in UNIXFS_get_unix_path and UNIXFS_path_to_pidl. - If the unixfs is rooted at the Desktop folder, forward ParseDisplayName calls to it instead of to MyComputer. - Only initialize shell folders via the IPersistFolder3 interface in SHELL32_CoCreateInitSF if the pidl which specifies the child is of type 'Folder'. Otherwise fall back to IPersistFolder. - Append filename extension if necessary in IShellFolder::SetNameOf. - Release parent shell folder in GetAttributesOf. Francois Gouget <fgouget(a)free.fr> - Assorted spelling fixes. Robert Shearman <rob(a)codeweavers.com> - Implement ShellDDEInit. Michael Lin <mlin(a)corvu.com.au> Michael Jung <mjung(a)iss.tu-darmstadt.de> - Implemented UnixFolder's ISFHelper::AddFolder. - ISFHelper interface support for UnixFolder (currently only stubs). - Implemented UnixFolder's IShellFolder::SetNameOf. Vincent Béron <vberon(a)mecano.gme.usherb.ca> - Remove multiple declarations of the same function, keeping the public one as reference. Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes (Reg* functions). - -Wpointer-sign fixes. Troy Rollo <wine(a)troy.rollo.name> - Return attributes for the correct file in the unixfs ParseDisplayName. - When using PATHMODE_UNIX, all files are in the file system. Marcelo Duarte <marcelotduarte(a)gmail.com> - Update shell32 resources for Portuguese. Detlef Riekenberg <wine.dev(a)web.de> - Printers_RegisterWindowW / Printers_UnregisterWindow implemented as stub. - Show the FIXME in Printer_LoadIconsW only when needed. - Printer_LoadIconsW: implemented minimal version. Modified: trunk/reactos/lib/shell32/Makefile.in Modified: trunk/reactos/lib/shell32/autocomplete.c Modified: trunk/reactos/lib/shell32/classes.c Modified: trunk/reactos/lib/shell32/cpanelfolder.c Modified: trunk/reactos/lib/shell32/dataobject.c Added: trunk/reactos/lib/shell32/dde.c Modified: trunk/reactos/lib/shell32/dialogs.c Modified: trunk/reactos/lib/shell32/dragdrophelper.c Modified: trunk/reactos/lib/shell32/enumidlist.c Modified: trunk/reactos/lib/shell32/folders.c Modified: trunk/reactos/lib/shell32/pidl.c Modified: trunk/reactos/lib/shell32/pidl.h Modified: trunk/reactos/lib/shell32/regsvr.c Modified: trunk/reactos/lib/shell32/shell32.spec Modified: trunk/reactos/lib/shell32/shell32.xml Modified: trunk/reactos/lib/shell32/shell32_Pt.rc Modified: trunk/reactos/lib/shell32/shell32_main.c Modified: trunk/reactos/lib/shell32/shell32_main.h Modified: trunk/reactos/lib/shell32/shelllink.c Modified: trunk/reactos/lib/shell32/shellole.c Modified: trunk/reactos/lib/shell32/shfldr.h Modified: trunk/reactos/lib/shell32/shfldr_desktop.c Modified: trunk/reactos/lib/shell32/shfldr_fs.c Modified: trunk/reactos/lib/shell32/shfldr_mycomp.c Modified: trunk/reactos/lib/shell32/shlexec.c Modified: trunk/reactos/lib/shell32/shlfolder.c Modified: trunk/reactos/lib/shell32/shlfsbind.c Modified: trunk/reactos/lib/shell32/shlview.c Modified: trunk/reactos/lib/shell32/shv_bg_cmenu.c Modified: trunk/reactos/lib/shell32/shv_item_cmenu.c Modified: trunk/reactos/lib/shell32/undocshell.h _____ Modified: trunk/reactos/lib/shell32/Makefile.in --- trunk/reactos/lib/shell32/Makefile.in 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/Makefile.in 2005-08-12 18:04:51 UTC (rev 17338) @@ -18,6 +18,7 @@ clipboard.c \ control.c \ cpanelfolder.c \ + dde.c \ dataobject.c \ debughlp.c \ dialogs.c \ _____ Modified: trunk/reactos/lib/shell32/autocomplete.c --- trunk/reactos/lib/shell32/autocomplete.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/autocomplete.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -64,7 +64,7 @@ { const IAutoCompleteVtbl *lpVtbl; const IAutoComplete2Vtbl *lpvtblAutoComplete2; - DWORD ref; + LONG ref; BOOL enabled; HWND hwndEdit; HWND hwndListBox; _____ Modified: trunk/reactos/lib/shell32/classes.c --- trunk/reactos/lib/shell32/classes.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/classes.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -49,7 +49,7 @@ #define MAX_EXTENSION_LENGTH 20 -BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot) +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot) { HKEY hkey; WCHAR szTemp[MAX_EXTENSION_LENGTH + 2]; @@ -83,7 +83,7 @@ return TRUE; } -BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot) +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot) { HKEY hkey; char szTemp[MAX_EXTENSION_LENGTH + 2]; @@ -194,7 +194,7 @@ char sTemp[MAX_PATH]; char sNum[5]; - if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len)) + if (!RegQueryValueExA(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len)) { if (dwType == REG_EXPAND_SZ) { @@ -319,7 +319,7 @@ szDest[0] = 0; if (HCR_RegOpenClassIDKey(riid, &hkey)) { - if (!RegQueryValueExA(hkey,"",0,NULL,szDest,&len)) + if (!RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len)) { ret = TRUE; } @@ -404,10 +404,10 @@ (LPVOID*)&psfFolder); if (SUCCEEDED(hr)) { hr = IShellFolder_GetAttributesOf(psfFolder, 0, NULL, pdwAttributes); + IShellFolder_Release(psfFolder); } + IShellFolder_Release(psfDesktop); } - IShellFolder_Release(psfFolder); - IShellFolder_Release(psfDesktop); if (FAILED(hr)) return FALSE; } else { lResult = RegQueryValueExW(hSFKey, wszAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen); _____ Modified: trunk/reactos/lib/shell32/cpanelfolder.c --- trunk/reactos/lib/shell32/cpanelfolder.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/cpanelfolder.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -59,7 +59,7 @@ typedef struct { const IShellFolder2Vtbl *lpVtbl; - DWORD ref; + LONG ref; const IPersistFolder2Vtbl *lpVtblPersistFolder2; const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; _____ Modified: trunk/reactos/lib/shell32/dataobject.c --- trunk/reactos/lib/shell32/dataobject.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/dataobject.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -43,7 +43,7 @@ { /* IUnknown fields */ const IEnumFORMATETCVtbl *lpVtbl; - DWORD ref; + LONG ref; /* IEnumFORMATETC fields */ UINT posFmt; UINT countFmt; @@ -205,7 +205,7 @@ { /* IUnknown fields */ const IDataObjectVtbl *lpVtbl; - DWORD ref; + LONG ref; /* IDataObject fields */ LPITEMIDLIST pidl; _____ Copied: trunk/reactos/lib/shell32/dde.c (from rev 17337, vendor/wine/dlls/shell32/current/dde.c) Property changes on: trunk/reactos/lib/shell32/dde.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/shell32/dialogs.c --- trunk/reactos/lib/shell32/dialogs.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/dialogs.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -255,7 +255,7 @@ if (icList > 0) { pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; - if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, pszList, &icList)) + if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, (LPBYTE)pszList, &icList)) MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ; } else @@ -278,7 +278,7 @@ pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; else pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ; - if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, pszCmd, &icCmd)) + if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, (LPBYTE)pszCmd, &icCmd)) MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ; if (NULL != pszLatest) @@ -328,7 +328,7 @@ memmove (&pszList[1], pszList, Nix) ; pszList[0] = cMatch ; szIndex[0] = cMatch ; - RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ; } } @@ -350,10 +350,10 @@ memmove (&pszList[1], pszList, icList - 1) ; pszList[0] = cMatch ; szIndex[0] = cMatch ; - RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ; } - RegSetValueExA (hkey, "MRUList", 0, REG_SZ, pszList, strlen (pszList) + 1) ; + RegSetValueExA (hkey, "MRUList", 0, REG_SZ, (LPBYTE)pszList, strlen (pszList) + 1) ; HeapFree( GetProcessHeap(), 0, pszCmd) ; HeapFree( GetProcessHeap(), 0, pszList) ; _____ Modified: trunk/reactos/lib/shell32/dragdrophelper.c --- trunk/reactos/lib/shell32/dragdrophelper.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/dragdrophelper.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -49,7 +49,7 @@ typedef struct { const IDropTargetHelperVtbl *lpVtbl; - DWORD ref; + LONG ref; } IDropTargetHelperImpl; static const IDropTargetHelperVtbl vt_IDropTargetHelper; _____ Modified: trunk/reactos/lib/shell32/enumidlist.c --- trunk/reactos/lib/shell32/enumidlist.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/enumidlist.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -46,7 +46,7 @@ typedef struct { const IEnumIDListVtbl *lpVtbl; - DWORD ref; + LONG ref; LPENUMLIST mpFirst; LPENUMLIST mpLast; LPENUMLIST mpCurrent; _____ Modified: trunk/reactos/lib/shell32/folders.c --- trunk/reactos/lib/shell32/folders.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/folders.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -50,7 +50,7 @@ typedef struct { const IExtractIconWVtbl *lpVtbl; - DWORD ref; + LONG ref; const IPersistFileVtbl *lpvtblPersistFile; const IExtractIconAVtbl *lpvtblExtractIconA; LPITEMIDLIST pidl; _____ Modified: trunk/reactos/lib/shell32/pidl.c --- trunk/reactos/lib/shell32/pidl.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/pidl.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -1113,7 +1113,7 @@ case SHGDFIL_FINDDATA: pfd = dest; - if (_ILIsDrive(pidl)) + if (_ILIsDrive(pidl) || _ILIsSpecialFolder(pidl)) return E_INVALIDARG; if (len < sizeof(WIN32_FIND_DATAA)) @@ -1488,7 +1488,7 @@ * ************************************************************************ * */ -LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size) +LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size) { LPITEMIDLIST pidlOut = NULL; _____ Modified: trunk/reactos/lib/shell32/pidl.h --- trunk/reactos/lib/shell32/pidl.h 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/pidl.h 2005-08-12 18:04:51 UTC (rev 17338) @@ -206,7 +206,7 @@ * - two bytes are the NULL PIDL terminator * Sets type of the returned PIDL to type. */ -LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size); +LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size); /* Creates a PIDL with guid format and type type, which must be one of PT_GUID, * PT_SHELLEXT, or PT_YAGUID. _____ Modified: trunk/reactos/lib/shell32/regsvr.c --- trunk/reactos/lib/shell32/regsvr.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/regsvr.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -20,6 +20,7 @@ #include <stdarg.h> #include <string.h> +#include <stdio.h> #include "windef.h" #include "winbase.h" @@ -30,6 +31,7 @@ #include "ole2.h" #include "shlguid.h" #include "shell32_main.h" +#include "shfldr.h" #include "wine/debug.h" @@ -79,6 +81,16 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list); static HRESULT unregister_coclasses(struct regsvr_coclass const *list); +struct regsvr_namespace +{ + CLSID const *clsid; /* CLSID of the namespace extension. NULL for end of list */ + LPCWSTR parent; /* Mount point (MyComputer, Desktop, ..). */ + LPCWSTR value; /* Display name of the extension. */ +}; + +static HRESULT register_namespace_extensions(struct regsvr_namespace const *list); +static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list); + /*********************************************************************** * static string constants */ @@ -377,6 +389,66 @@ return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; } +/********************************************************************** + * register_namespace_extensions + */ +static WCHAR *get_namespace_key(struct regsvr_namespace const *list) { + static const WCHAR wszExplorerKey[] = { + 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t' ,'\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r' ,'s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\',0 }; + static const WCHAR wszNamespace[] = { '\\','N','a','m','e','s','p','a','c','e','\\',0 }; + WCHAR *pwszKey, *pwszCLSID; + + pwszKey = HeapAlloc(GetProcessHeap(), 0, sizeof(wszExplorerKey)+sizeof(wszNamespace)+ + sizeof(WCHAR)*(lstrlenW(list->parent)+CHARS_IN_GUID)); + if (!pwszKey) + return NULL; + + lstrcpyW(pwszKey, wszExplorerKey); + lstrcatW(pwszKey, list->parent); + lstrcatW(pwszKey, wszNamespace); + if (FAILED(StringFromCLSID(list->clsid, &pwszCLSID))) { + HeapFree(GetProcessHeap(), 0, pwszKey); + return NULL; + } + lstrcatW(pwszKey, pwszCLSID); + CoTaskMemFree(pwszCLSID); + + return pwszKey; +} + +static HRESULT register_namespace_extensions(struct regsvr_namespace const *list) { + WCHAR *pwszKey; + HKEY hKey; + + for (; list->clsid; list++) { + pwszKey = get_namespace_key(list); + + /* Create the key and set the value. */ + if (pwszKey && ERROR_SUCCESS == + RegCreateKeyExW(HKEY_LOCAL_MACHINE, pwszKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL)) + { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)list->value, sizeof(WCHAR)*(lstrlenW(list->value)+1)); + RegCloseKey(hKey); + } + + HeapFree(GetProcessHeap(), 0, pwszKey); + } + return S_OK; +} + +static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list) { + WCHAR *pwszKey; + + for (; list->clsid; list++) { + pwszKey = get_namespace_key(list); + RegDeleteKeyW(HKEY_LOCAL_MACHINE, pwszKey); + HeapFree(GetProcessHeap(), 0, pwszKey); + } + return S_OK; +} + /*********************************************************************** * regsvr_key_guid */ @@ -545,6 +617,16 @@ }; /*********************************************************************** + * namespace extensions list + */ +static const WCHAR wszDesktop[] = { 'D','e','s','k','t','o','p',0 }; +static const WCHAR wszSlash[] = { '/', 0 }; + +static struct regsvr_namespace const namespace_extensions_list[] = { + { NULL } +}; + +/********************************************************************** * * DllRegisterServer (SHELL32.@) */ HRESULT WINAPI SHELL32_DllRegisterServer() @@ -558,6 +640,8 @@ hr = register_interfaces(interface_list); if (SUCCEEDED(hr)) hr = SHELL_RegisterShellFolders(); + if (SUCCEEDED(hr)) + hr = register_namespace_extensions(namespace_extensions_list); return hr; } @@ -573,5 +657,7 @@ hr = unregister_coclasses(coclass_list); if (SUCCEEDED(hr)) hr = unregister_interfaces(interface_list); + if (SUCCEEDED(hr)) + hr = unregister_namespace_extensions(namespace_extensions_list); return hr; } _____ Modified: trunk/reactos/lib/shell32/shell32.spec --- trunk/reactos/lib/shell32/shell32.spec 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shell32.spec 2005-08-12 18:04:51 UTC (rev 17338) @@ -189,7 +189,7 @@ 202 stub SHLocalReAlloc 203 stub AddCommasW 204 stub ShortSizeFormatW - 205 stub Printer_LoadIconsW + 205 stdcall Printer_LoadIconsW(wstr ptr ptr) 206 stub Link_AddExtraDataSection 207 stub Link_ReadExtraDataSection 208 stub Link_RemoveExtraDataSection @@ -197,8 +197,8 @@ 210 stub LargeIntegerToString 211 stub Printers_GetPidl 212 stub Printers_AddPrinterPropPages - 213 stub Printers_RegisterWindowW - 214 stub Printers_UnregisterWindow + 213 stdcall Printers_RegisterWindowW(wstr long ptr ptr) + 214 stdcall Printers_UnregisterWindow(long long) 215 stdcall -noname SHStartNetConnectionDialog(long str long) 243 stdcall @(long long) shell32_243 244 stdcall -noname SHInitRestricted(ptr ptr) _____ Modified: trunk/reactos/lib/shell32/shell32.xml --- trunk/reactos/lib/shell32/shell32.xml 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shell32.xml 2005-08-12 18:04:51 UTC (rev 17338) @@ -28,6 +28,7 @@ <file>control.c</file> <file>cpanelfolder.c</file> <file>dataobject.c</file> + <file>dde.c</file> <file>debughlp.c</file> <file>dialogs.c</file> <file>dragdrophelper.c</file> _____ Modified: trunk/reactos/lib/shell32/shell32_Pt.rc --- trunk/reactos/lib/shell32/shell32_Pt.rc 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shell32_Pt.rc 2005-08-12 18:04:51 UTC (rev 17338) @@ -132,30 +132,33 @@ PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP } -/* - special folders -*/ STRINGTABLE DISCARDABLE { + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Arquivo" + IDS_SHV_COLUMN2 "Tamanho" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "Atributos" + IDS_SHV_COLUMN6 "Tamanho" + IDS_SHV_COLUMN7 "DisponÝvel" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Comentßrios" + IDS_SHV_COLUMN10 "Dono" + IDS_SHV_COLUMN11 "Grupo" + + /* special folders */ IDS_DESKTOP "?rea de trabalho" IDS_MYCOMPUTER "Meu computador" -} -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ + /* context menus */ IDS_VIEW_LARGE "?cones &grandes" IDS_VIEW_SMALL "?cones &pequenos" IDS_VIEW_LIST "&Lista" IDS_VIEW_DETAILS "&Detalhes" IDS_SELECT "Selecionar" IDS_OPEN "Abrir" -} -STRINGTABLE DISCARDABLE -{ IDS_CREATEFOLDER_DENIED "NÒo pode criar nova pasta: PermissÒo negada." IDS_CREATEFOLDER_CAPTION "Erro durante a criaþÒo da nova pasta" IDS_DELETEITEM_CAPTION "Confirmar exclusÒo de arquivo" @@ -164,34 +167,14 @@ IDS_DELETEMULTIPLE_TEXT "VocÛ tem certeza que deseja excluir estes %1 itens?" IDS_OVERWRITEFILE_TEXT "Sobreescrever arquivo %1?" IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo" -} -/* colunas no shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Arquivo" - IDS_SHV_COLUMN2 "Tamanho" - IDS_SHV_COLUMN3 "Tipo" - IDS_SHV_COLUMN4 "Modificado" - IDS_SHV_COLUMN5 "Atributos" - IDS_SHV_COLUMN6 "Tamanho" - IDS_SHV_COLUMN7 "DisponÝvel" - IDS_SHV_COLUMN8 "Nome" - IDS_SHV_COLUMN9 "Comentßrios" -END + /* message box strings */ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "VocÛ quer simular a reinicializaþÒo do Windows?" + IDS_SHUTDOWN_TITLE "Desligar" + IDS_SHUTDOWN_PROMPT "VocÛ quer finalizar a sessÒo no ReactOS?" -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Reiniciar" - IDS_RESTART_PROMPT "VocÛ quer simular a reinicializaþÒo do Windows?" - IDS_SHUTDOWN_TITLE "Desligar" - IDS_SHUTDOWN_PROMPT "VocÛ quer finalizar a sessÒo no ReactOS?" -} - -/* shell folder path default values - */ -STRINGTABLE DISCARDABLE -{ + /* shell folder path default values */ IDS_PROGRAMS "Menu Iniciar\\Programas" IDS_PERSONAL "Meus Documentos" IDS_FAVORITES "Favoritos" _____ Modified: trunk/reactos/lib/shell32/shell32_main.c --- trunk/reactos/lib/shell32/shell32_main.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shell32_main.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -718,6 +718,63 @@ return NULL; } +/********************************************************************** *** + * Printer_LoadIconsW [SHELL32.205] + */ +VOID WINAPI Printer_LoadIconsW(LPCWSTR wsPrinterName, HICON * pLargeIcon, HICON * pSmallIcon) +{ + INT iconindex=IDI_SHELL_PRINTER; + + TRACE("(%s, %p, %p)\n", debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon); + + /* We should check if wsPrinterName is + 1. the Default Printer or not + 2. connected or not + 3. a Local Printer or a Network-Printer + and use different Icons + */ + if((wsPrinterName != NULL) && (wsPrinterName[0] != 0)) + { + FIXME("(select Icon by PrinterName %s not implemented)\n", debugstr_w(wsPrinterName)); + } + + if(pLargeIcon != NULL) + *pLargeIcon = LoadImageW(shell32_hInstance, + (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON, + 0, 0, LR_DEFAULTCOLOR|LR_DEFAULTSIZE); + + if(pSmallIcon != NULL) + *pSmallIcon = LoadImageW(shell32_hInstance, + (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON, + 16, 16, LR_DEFAULTCOLOR); +} + +/********************************************************************** *** + * Printers_RegisterWindowW [SHELL32.213] + * used by "printui.dll": + * find the Window of the given Type for the specific Printer and + * return the already existent hwnd or open a new window + */ +BOOL WINAPI Printers_RegisterWindowW(LPCWSTR wsPrinter, DWORD dwType, + HANDLE * phClassPidl, HWND * phwnd) +{ + FIXME("(%s, %lx, %p (%p), %p (%p)) stub!\n", debugstr_w(wsPrinter), dwType, + phClassPidl, (phClassPidl != NULL) ? *(phClassPidl) : NULL, + phwnd, (phwnd != NULL) ? *(phwnd) : NULL); + + return FALSE; +} + +/********************************************************************** *** + * Printers_UnregisterWindow [SHELL32.214] + */ +VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd) +{ + FIXME("(%p, %p) stub!\n", hClassPidl, hwnd); +} + +/********************************************************************** ***/ + typedef struct { LPCWSTR szApp; @@ -985,14 +1042,6 @@ } -/********************************************************************** *** - * ShellDDEInit (SHELL32.@) - */ -void WINAPI ShellDDEInit(BOOL start) -{ - FIXME("stub: %d\n", start); -} - /*********************************************************************** * DllGetVersion [SHELL32.@] * _____ Modified: trunk/reactos/lib/shell32/shell32_main.h --- trunk/reactos/lib/shell32/shell32_main.h 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shell32_main.h 2005-08-12 18:04:51 UTC (rev 17338) @@ -56,14 +56,14 @@ INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags ); /* Classes Root */ -BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot); +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot); BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ); BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr); BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr); BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len); /* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */ -BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot); +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot); BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr); BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len); @@ -223,6 +223,7 @@ extern WCHAR swShell32Name[MAX_PATH]; +BOOL UNIXFS_is_rooted_at_desktop(void); extern const GUID CLSID_UnixFolder; extern const GUID CLSID_UnixDosFolder; _____ Modified: trunk/reactos/lib/shell32/shelllink.c --- trunk/reactos/lib/shell32/shelllink.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shelllink.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -133,7 +133,7 @@ const IShellExtInitVtbl *lpvtblShellExtInit; const IContextMenuVtbl *lpvtblContextMenu; - DWORD ref; + LONG ref; /* data structures according to the informations in the link */ LPITEMIDLIST pPidl; @@ -660,7 +660,7 @@ static HRESULT Stream_LoadLocation( IStream *stm, volume_info *volume, LPWSTR *path ) { - unsigned char *p = NULL; + char *p = NULL; LOCATION_INFO *loc; HRESULT r; int n; _____ Modified: trunk/reactos/lib/shell32/shellole.c --- trunk/reactos/lib/shell32/shellole.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shellole.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -500,11 +500,11 @@ typedef struct { const IClassFactoryVtbl *lpVtbl; - DWORD ref; + LONG ref; CLSID *rclsid; LPFNCREATEINSTANCE lpfnCI; const IID * riidInst; - ULONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ + LONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ } IDefClFImpl; static const IClassFactoryVtbl dclfvt; _____ Modified: trunk/reactos/lib/shell32/shfldr.h --- trunk/reactos/lib/shell32/shfldr.h 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shfldr.h 2005-08-12 18:04:51 UTC (rev 17338) @@ -70,3 +70,4 @@ } void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags); +BOOL SHELL_FS_HideExtension(LPWSTR pwszPath); _____ Modified: trunk/reactos/lib/shell32/shfldr_desktop.c --- trunk/reactos/lib/shell32/shfldr_desktop.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shfldr_desktop.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -61,7 +61,7 @@ typedef struct { const IShellFolder2Vtbl *lpVtbl; - DWORD ref; + LONG ref; CLSID *pclsid; _____ Modified: trunk/reactos/lib/shell32/shfldr_fs.c --- trunk/reactos/lib/shell32/shfldr_fs.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shfldr_fs.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -61,7 +61,7 @@ typedef struct { const IUnknownVtbl *lpVtbl; - DWORD ref; + LONG ref; const IShellFolder2Vtbl *lpvtblShellFolder; const IPersistFolder3Vtbl *lpvtblPersistFolder3; const IDropTargetVtbl *lpvtblDropTarget; @@ -590,8 +590,10 @@ LPCITEMIDLIST rpidl = NULL; hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) + if(SUCCEEDED(hr)) { SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); + IShellFolder_Release(psfParent); + } } else { while (cidl > 0 && *apidl) { @@ -698,7 +700,20 @@ static const WCHAR NeverShowExtW[] = { 'N','e','v','e','r','S','h','o','w','E', 'x','t',0 }; -static BOOL hide_extension(LPWSTR szPath) +/********************************************************************** ******** + * SHELL_FS_HideExtension [Internal] + * + * Query the registry if the filename extension of a given path should be + * hidden. + * + * PARAMS + * szPath [I] Relative or absolute path of a file + * + * RETURNS + * TRUE, if the filename's extension should be hidden + * FALSE, otherwise. + */ +BOOL SHELL_FS_HideExtension(LPWSTR szPath) { HKEY hKey; DWORD dwData; @@ -737,7 +752,7 @@ if (!(dwFlags & SHGDN_FORPARSING) && ((dwFlags & SHGDN_INFOLDER) || (dwFlags == SHGDN_NORMAL))) { MultiByteToWideChar(CP_ACP, 0, szPath, -1, pathW, MAX_PATH); - if (hide_extension(pathW) && szPath[0] != '.') + if (SHELL_FS_HideExtension(pathW) && szPath[0] != '.') PathRemoveExtensionA (szPath); } } @@ -842,7 +857,7 @@ } else lstrcpynW(szDest, lpName, MAX_PATH); - if(!(dwFlags & SHGDN_FORPARSING) && hide_extension(szSrc)) { + if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { WCHAR *ext = PathFindExtensionW(szSrc); if(*ext != '\0') { INT len = strlenW(szDest); _____ Modified: trunk/reactos/lib/shell32/shfldr_mycomp.c --- trunk/reactos/lib/shell32/shfldr_mycomp.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shfldr_mycomp.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -56,7 +56,7 @@ typedef struct { const IShellFolder2Vtbl *lpVtbl; - DWORD ref; + LONG ref; const IPersistFolder2Vtbl *lpVtblPersistFolder2; /* both paths are parsible from the desktop */ @@ -443,8 +443,10 @@ LPCITEMIDLIST rpidl = NULL; hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) + if(SUCCEEDED(hr)) { SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); + IShellFolder_Release(psfParent); + } } else { while (cidl > 0 && *apidl) { pdump (*apidl); _____ Modified: trunk/reactos/lib/shell32/shlexec.c --- trunk/reactos/lib/shell32/shlexec.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shlexec.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -743,7 +743,7 @@ /****************************************************************** * dde_cb * - * callback for the DDE connection. not really usefull + * callback for the DDE connection. not really useful */ static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, _____ Modified: trunk/reactos/lib/shell32/shlfolder.c --- trunk/reactos/lib/shell32/shlfolder.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shlfolder.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -204,7 +204,9 @@ IPersistFolder *pPF; IPersistFolder3 *ppf; - if (SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) { + if (_ILIsFolder(pidlChild) && + SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) + { PERSIST_FOLDER_TARGET_INFO ppfti; char szDestPath[MAX_PATH]; _____ Modified: trunk/reactos/lib/shell32/shlfsbind.c --- trunk/reactos/lib/shell32/shlfsbind.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shlfsbind.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -43,7 +43,7 @@ typedef struct { const IFileSystemBindDataVtbl *lpVtbl; - DWORD ref; + LONG ref; WIN32_FIND_DATAW findFile; } IFileSystemBindDataImpl; _____ Modified: trunk/reactos/lib/shell32/shlview.c --- trunk/reactos/lib/shell32/shlview.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shlview.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -77,7 +77,7 @@ typedef struct { const IShellViewVtbl* lpVtbl; - DWORD ref; + LONG ref; const IOleCommandTargetVtbl* lpvtblOleCommandTarget; const IDropTargetVtbl* lpvtblDropTarget; const IDropSourceVtbl* lpvtblDropSource; _____ Modified: trunk/reactos/lib/shell32/shv_bg_cmenu.c --- trunk/reactos/lib/shell32/shv_bg_cmenu.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shv_bg_cmenu.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -45,7 +45,7 @@ { const IContextMenu2Vtbl *lpVtbl; IShellFolder* pSFParent; - DWORD ref; + LONG ref; BOOL bDesktop; } BgCmImpl; _____ Modified: trunk/reactos/lib/shell32/shv_item_cmenu.c --- trunk/reactos/lib/shell32/shv_item_cmenu.c 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/shv_item_cmenu.c 2005-08-12 18:04:51 UTC (rev 17338) @@ -44,7 +44,7 @@ */ typedef struct { const IContextMenu2Vtbl *lpVtbl; - DWORD ref; + LONG ref; IShellFolder* pSFParent; LPITEMIDLIST pidl; /* root pidl */ LPITEMIDLIST *apidl; /* array of child pidls */ _____ Modified: trunk/reactos/lib/shell32/undocshell.h --- trunk/reactos/lib/shell32/undocshell.h 2005-08-12 17:50:33 UTC (rev 17337) +++ trunk/reactos/lib/shell32/undocshell.h 2005-08-12 18:04:51 UTC (rev 17338) @@ -65,9 +65,6 @@ LPITEMIDLIST * ppidl, DWORD *attributes); -LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path); -LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path); - /* string functions */ @@ -124,15 +121,6 @@ void WINAPI ExitWindowsDialog(HWND hwndOwner); -BOOL WINAPI GetFileNameFromBrowse( - HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPCSTR lpstrInitialDir, - LPCSTR lpstrDefExt, - LPCSTR lpstrFilter, - LPCSTR lpstrTitle); - BOOL WINAPI SHFindComputer( LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch);
19 years, 4 months
1
0
0
0
[gvg] 17337: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Francois Gouget <fgouget(a)free.fr> - Fix the NdrVaryingArrayUnmarshall prototype (reported by winapi_check). - Assorted spelling fixes. Robert Shearman <rob(a)codeweavers.com> - Add stubs for most of the NDR marshaling functions. - IRpcStubBuffer_Disconnect can be called more than once. Mike McCormack <mike(a)codeweavers.com> - Interlocked LONG* gcc warning fixes. Stefan Huehner <stefan(a)huehner.org> - Fix -Wmissing-declarations warnings. - Fix some missing-declarations warnings. Modified: trunk/reactos/lib/rpcrt4/cstub.c Modified: trunk/reactos/lib/rpcrt4/ndr_marshall.c Modified: trunk/reactos/lib/rpcrt4/ndr_ole.c Modified: trunk/reactos/lib/rpcrt4/rpc_binding.c Modified: trunk/reactos/lib/rpcrt4/rpc_binding.h Modified: trunk/reactos/lib/rpcrt4/rpc_message.c Modified: trunk/reactos/lib/rpcrt4/rpc_message.h Modified: trunk/reactos/lib/rpcrt4/rpc_server.c Modified: trunk/reactos/lib/rpcrt4/rpcrt4.spec Modified: trunk/reactos/lib/rpcrt4/rpcrt4_main.c _____ Modified: trunk/reactos/lib/rpcrt4/cstub.c --- trunk/reactos/lib/rpcrt4/cstub.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/cstub.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -100,8 +100,7 @@ TRACE("(%p)->Release()\n",This); if (!--(This->RefCount)) { - if(This->pvServerObject) - IUnknown_Release(This->pvServerObject); + IRpcStubBuffer_Disconnect(iface); if(This->pPSFactory) IPSFactoryBuffer_Release(This->pPSFactory); HeapFree(GetProcessHeap(),0,This); @@ -123,7 +122,11 @@ { CStdStubBuffer *This = (CStdStubBuffer *)iface; TRACE("(%p)->Disconnect()\n",This); - This->pvServerObject = NULL; + if (This->pvServerObject) + { + IUnknown_Release(This->pvServerObject); + This->pvServerObject = NULL; + } } HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface, _____ Modified: trunk/reactos/lib/rpcrt4/ndr_marshall.c --- trunk/reactos/lib/rpcrt4/ndr_marshall.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/ndr_marshall.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -114,16 +114,23 @@ NdrPointerMarshall, NdrPointerMarshall, /* 0x15 */ NdrSimpleStructMarshall, NdrSimpleStructMarshall, - 0, 0, 0, + NdrConformantStructMarshall, NdrConformantStructMarshall, + NdrConformantVaryingStructMarshall, NdrComplexStructMarshall, /* 0x1b */ - NdrConformantArrayMarshall, 0, 0, 0, 0, 0, + NdrConformantArrayMarshall, + NdrConformantVaryingArrayMarshall, + NdrFixedArrayMarshall, NdrFixedArrayMarshall, + NdrVaryingArrayMarshall, NdrVaryingArrayMarshall, NdrComplexArrayMarshall, /* 0x22 */ NdrConformantStringMarshall, 0, 0, NdrConformantStringMarshall, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionMarshall, + NdrNonEncapsulatedUnionMarshall, + 0, + NdrXmitOrRepAsMarshall, NdrXmitOrRepAsMarshall, /* 0x2f */ NdrInterfacePointerMarshall, /* 0xb0 */ @@ -140,16 +147,23 @@ NdrPointerUnmarshall, NdrPointerUnmarshall, /* 0x15 */ NdrSimpleStructUnmarshall, NdrSimpleStructUnmarshall, - 0, 0, 0, + NdrConformantStructUnmarshall, NdrConformantStructUnmarshall, + NdrConformantVaryingStructUnmarshall, NdrComplexStructUnmarshall, /* 0x1b */ - NdrConformantArrayUnmarshall, 0, 0, 0, 0, 0, + NdrConformantArrayUnmarshall, + NdrConformantVaryingArrayUnmarshall, + NdrFixedArrayUnmarshall, NdrFixedArrayUnmarshall, + NdrVaryingArrayUnmarshall, NdrVaryingArrayUnmarshall, NdrComplexArrayUnmarshall, /* 0x22 */ NdrConformantStringUnmarshall, 0, 0, NdrConformantStringUnmarshall, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionUnmarshall, + NdrNonEncapsulatedUnionUnmarshall, + 0, + NdrXmitOrRepAsUnmarshall, NdrXmitOrRepAsUnmarshall, /* 0x2f */ NdrInterfacePointerUnmarshall, /* 0xb0 */ @@ -166,16 +180,23 @@ NdrPointerBufferSize, NdrPointerBufferSize, /* 0x15 */ NdrSimpleStructBufferSize, NdrSimpleStructBufferSize, - 0, 0, 0, + NdrConformantStructBufferSize, NdrConformantStructBufferSize, + NdrConformantVaryingStructBufferSize, NdrComplexStructBufferSize, /* 0x1b */ - NdrConformantArrayBufferSize, 0, 0, 0, 0, 0, + NdrConformantArrayBufferSize, + NdrConformantVaryingArrayBufferSize, + NdrFixedArrayBufferSize, NdrFixedArrayBufferSize, + NdrVaryingArrayBufferSize, NdrVaryingArrayBufferSize, NdrComplexArrayBufferSize, /* 0x22 */ NdrConformantStringBufferSize, 0, 0, NdrConformantStringBufferSize, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionBufferSize, + NdrNonEncapsulatedUnionBufferSize, + 0, + NdrXmitOrRepAsBufferSize, NdrXmitOrRepAsBufferSize, /* 0x2f */ NdrInterfacePointerBufferSize, /* 0xb0 */ @@ -218,15 +239,23 @@ NdrPointerFree, NdrPointerFree, /* 0x15 */ NdrSimpleStructFree, NdrSimpleStructFree, - 0, 0, 0, + NdrConformantStructFree, NdrConformantStructFree, + NdrConformantVaryingStructFree, NdrComplexStructFree, /* 0x1b */ - NdrConformantArrayFree, 0, 0, 0, 0, 0, + NdrConformantArrayFree, + NdrConformantVaryingArrayFree, + NdrFixedArrayFree, NdrFixedArrayFree, + NdrVaryingArrayFree, NdrVaryingArrayFree, NdrComplexArrayFree, /* 0x22 */ - 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, + 0, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionFree, + NdrNonEncapsulatedUnionFree, + 0, + NdrXmitOrRepAsFree, NdrXmitOrRepAsFree, /* 0x2f */ NdrInterfacePointerFree, /* 0xb0 */ @@ -2191,3 +2220,447 @@ /* FIXME: since this stub doesn't do any converting, the proper behavior is to raise an exception */ } + +/********************************************************************** * + * NdrConformantStructMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrConformantStructUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrConformantStructBufferSize [RPCRT4.@] + */ +void WINAPI NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrConformantStructMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrConformantStructFree [RPCRT4.@] + */ +void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrConformantVaryingStructMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrConformantVaryingStructUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrConformantVaryingStructBufferSize [RPCRT4.@] + */ +void WINAPI NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrConformantVaryingStructMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrConformantVaryingStructFree [RPCRT4.@] + */ +void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrFixedArrayMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrFixedArrayUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrFixedArrayBufferSize [RPCRT4.@] + */ +void WINAPI NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrFixedArrayMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrFixedArrayFree [RPCRT4.@] + */ +void WINAPI NdrFixedArrayFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrVaryingArrayMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrVaryingArrayUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrVaryingArrayBufferSize [RPCRT4.@] + */ +void WINAPI NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrVaryingArrayMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrVaryingArrayFree [RPCRT4.@] + */ +void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrEncapsulatedUnionMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrEncapsulatedUnionUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrEncapsulatedUnionBufferSize [RPCRT4.@] + */ +void WINAPI NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrEncapsulatedUnionMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrEncapsulatedUnionFree [RPCRT4.@] + */ +void WINAPI NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrNonEncapsulatedUnionMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrNonEncapsulatedUnionUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrNonEncapsulatedUnionBufferSize [RPCRT4.@] + */ +void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrNonEncapsulatedUnionMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrNonEncapsulatedUnionFree [RPCRT4.@] + */ +void WINAPI NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrByteCountPointerMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrByteCountPointerUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrByteCountPointerBufferSize [RPCRT4.@] + */ +void WINAPI NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrByteCountPointerMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrByteCountPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrByteCountPointerFree [RPCRT4.@] + */ +void WINAPI NdrByteCountPointerFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrXmitOrRepAsMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrXmitOrRepAsUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/********************************************************************** * + * NdrXmitOrRepAsBufferSize [RPCRT4.@] + */ +void WINAPI NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrXmitOrRepAsMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/********************************************************************** * + * NdrXmitOrRepAsFree [RPCRT4.@] + */ +void WINAPI NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/********************************************************************** * + * NdrClientContextMarshall + */ +void WINAPI NdrClientContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, + NDR_CCONTEXT ContextHandle, + int fCheck) +{ + FIXME("(%p, %p, %d): stub\n", pStubMsg, ContextHandle, fCheck); +} + +/********************************************************************** * + * NdrClientContextUnmarshall + */ +void WINAPI NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + NDR_CCONTEXT * pContextHandle, + RPC_BINDING_HANDLE BindHandle) +{ + FIXME("(%p, %p, %p): stub\n", pStubMsg, pContextHandle, BindHandle); +} _____ Modified: trunk/reactos/lib/rpcrt4/ndr_ole.c --- trunk/reactos/lib/rpcrt4/ndr_ole.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/ndr_ole.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -223,7 +223,7 @@ return (LPSTREAM)This; } -const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) +static const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) { const IID *riid; if (!pFormat) return &IID_IUnknown; _____ Modified: trunk/reactos/lib/rpcrt4/rpc_binding.c --- trunk/reactos/lib/rpcrt4/rpc_binding.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpc_binding.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -312,7 +312,7 @@ return err; } -RPC_STATUS RPCRT4_AllocBinding(RpcBinding** Binding, BOOL server) +static RPC_STATUS RPCRT4_AllocBinding(RpcBinding** Binding, BOOL server) { RpcBinding* NewBinding; _____ Modified: trunk/reactos/lib/rpcrt4/rpc_binding.h --- trunk/reactos/lib/rpcrt4/rpc_binding.h 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpc_binding.h 2005-08-12 17:50:33 UTC (rev 17337) @@ -41,7 +41,7 @@ /* don't know what MS's structure looks like */ typedef struct _RpcBinding { - DWORD refs; + LONG refs; struct _RpcBinding* Next; BOOL server; UUID ObjectUuid; _____ Modified: trunk/reactos/lib/rpcrt4/rpc_message.c --- trunk/reactos/lib/rpcrt4/rpc_message.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpc_message.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -41,10 +41,11 @@ #include "rpc_binding.h" #include "rpc_misc.h" #include "rpc_defs.h" +#include "rpc_message.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); -DWORD RPCRT4_GetHeaderSize(RpcPktHdr *Header) +static DWORD RPCRT4_GetHeaderSize(RpcPktHdr *Header) { static const DWORD header_sizes[] = { sizeof(Header->request), 0, sizeof(Header->response), @@ -67,7 +68,7 @@ return ret; } -VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, +static VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, unsigned long DataRepresentation) { Header->common.rpc_ver = RPC_VER_MAJOR; @@ -83,7 +84,7 @@ /* Flags and fragment length are computed in RPCRT4_Send. */ } -RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, +static RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, unsigned long BufferLength, unsigned short ProcNum, UUID *ObjectUuid) @@ -113,7 +114,7 @@ return header; } -RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, +static RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength) { RpcPktHdr *header; _____ Modified: trunk/reactos/lib/rpcrt4/rpc_message.h --- trunk/reactos/lib/rpcrt4/rpc_message.h 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpc_message.h 2005-08-12 17:50:33 UTC (rev 17337) @@ -24,9 +24,6 @@ #include "wine/rpcss_shared.h" #include "rpc_defs.h" -VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, unsigned long DataRepresentation); -RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, unsigned long BufferLength, unsigned short ProcNum, UUID *ObjectUuid); -RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength); RpcPktHdr *RPCRT4_BuildFaultHeader(unsigned long DataRepresentation, RPC_STATUS Status); RpcPktHdr *RPCRT4_BuildBindHeader(unsigned long DataRepresentation, unsigned short MaxTransmissionSize, unsigned short MaxReceiveSize, RPC_SYNTAX_IDENTIFIER *AbstractId, RPC_SYNTAX_IDENTIFIER *TransferId); RpcPktHdr *RPCRT4_BuildBindNackHeader(unsigned long DataRepresentation, unsigned char RpcVersion, unsigned char RpcVersionMinor); _____ Modified: trunk/reactos/lib/rpcrt4/rpc_server.c --- trunk/reactos/lib/rpcrt4/rpc_server.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpc_server.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -117,7 +117,7 @@ static RpcPacket* spacket_tail; static HANDLE server_sem; -static DWORD worker_count, worker_free, worker_tls; +static LONG worker_count, worker_free, worker_tls; static UUID uuid_nil; _____ Modified: trunk/reactos/lib/rpcrt4/rpcrt4.spec --- trunk/reactos/lib/rpcrt4/rpcrt4.spec 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpcrt4.spec 2005-08-12 17:50:33 UTC (rev 17337) @@ -150,17 +150,17 @@ @ stdcall NdrAllocate(ptr long) @ stub NdrAsyncClientCall @ stub NdrAsyncServerCall -@ stub NdrByteCountPointerBufferSize -@ stub NdrByteCountPointerFree -@ stub NdrByteCountPointerMarshall -@ stub NdrByteCountPointerUnmarshall +@ stdcall NdrByteCountPointerBufferSize(ptr ptr ptr) +@ stdcall NdrByteCountPointerFree(ptr ptr ptr) +@ stdcall NdrByteCountPointerMarshall(ptr ptr ptr) +@ stdcall NdrByteCountPointerUnmarshall(ptr ptr ptr long) @ stub NdrCStdStubBuffer2_Release @ stdcall NdrCStdStubBuffer_Release(ptr ptr) @ stdcall NdrClearOutParameters(ptr ptr ptr) @ varargs NdrClientCall2(ptr ptr) @ stub NdrClientCall -@ stub NdrClientContextMarshall -@ stub NdrClientContextUnmarshall +@ stdcall NdrClientContextMarshall(ptr ptr long) +@ stdcall NdrClientContextUnmarshall(ptr ptr ptr) @ stub NdrClientInitialize @ stdcall NdrClientInitializeNew(ptr ptr ptr long) @ stdcall NdrComplexArrayBufferSize(ptr ptr ptr) @@ -182,21 +182,21 @@ @ stdcall NdrConformantStringMarshall(ptr ptr ptr) @ stdcall NdrConformantStringMemorySize(ptr ptr) @ stdcall NdrConformantStringUnmarshall(ptr ptr ptr long) -@ stub NdrConformantStructBufferSize -@ stub NdrConformantStructFree -@ stub NdrConformantStructMarshall -@ stub NdrConformantStructMemorySize -@ stub NdrConformantStructUnmarshall +@ stdcall NdrConformantStructBufferSize(ptr ptr ptr) +@ stdcall NdrConformantStructFree(ptr ptr ptr) +@ stdcall NdrConformantStructMarshall(ptr ptr ptr) +@ stdcall NdrConformantStructMemorySize(ptr ptr) +@ stdcall NdrConformantStructUnmarshall(ptr ptr ptr long) @ stdcall NdrConformantVaryingArrayBufferSize(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayFree(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayMarshall(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayMemorySize(ptr ptr) @ stdcall NdrConformantVaryingArrayUnmarshall(ptr ptr ptr long) -@ stub NdrConformantVaryingStructBufferSize -@ stub NdrConformantVaryingStructFree -@ stub NdrConformantVaryingStructMarshall -@ stub NdrConformantVaryingStructMemorySize -@ stub NdrConformantVaryingStructUnmarshall +@ stdcall NdrConformantVaryingStructBufferSize(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructFree(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructMarshall(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructMemorySize(ptr ptr) +@ stdcall NdrConformantVaryingStructUnmarshall(ptr ptr ptr long) @ stub NdrContextHandleInitialize @ stub NdrContextHandleSize @ stdcall NdrConvert2(ptr ptr long) @@ -210,16 +210,16 @@ @ stdcall NdrDllGetClassObject(ptr ptr ptr ptr ptr ptr) @ stdcall NdrDllRegisterProxy(long ptr ptr) @ stdcall NdrDllUnregisterProxy(long ptr ptr) -@ stub NdrEncapsulatedUnionBufferSize -@ stub NdrEncapsulatedUnionFree -@ stub NdrEncapsulatedUnionMarshall -@ stub NdrEncapsulatedUnionMemorySize -@ stub NdrEncapsulatedUnionUnmarshall -@ stub NdrFixedArrayBufferSize -@ stub NdrFixedArrayFree -@ stub NdrFixedArrayMarshall -@ stub NdrFixedArrayMemorySize -@ stub NdrFixedArrayUnmarshall +@ stdcall NdrEncapsulatedUnionBufferSize(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionFree(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionMarshall(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionMemorySize(ptr ptr) +@ stdcall NdrEncapsulatedUnionUnmarshall(ptr ptr ptr long) +@ stdcall NdrFixedArrayBufferSize(ptr ptr ptr) +@ stdcall NdrFixedArrayFree(ptr ptr ptr) +@ stdcall NdrFixedArrayMarshall(ptr ptr ptr) +@ stdcall NdrFixedArrayMemorySize(ptr ptr) +@ stdcall NdrFixedArrayUnmarshall(ptr ptr ptr long) @ stdcall NdrFreeBuffer(ptr) @ stub NdrFullPointerFree @ stub NdrFullPointerInsertRefId @@ -236,11 +236,11 @@ @ stub NdrGetSimpleTypeMemorySize # wxp @ stub NdrGetTypeFlags # wxp @ stub NdrGetUserMarshallInfo -@ stub NdrHardStructBufferSize -@ stub NdrHardStructFree -@ stub NdrHardStructMarshall -@ stub NdrHardStructMemorySize -@ stub NdrHardStructUnmarshall +@ stub NdrHardStructBufferSize #(ptr ptr ptr) +@ stub NdrHardStructFree #(ptr ptr ptr) +@ stub NdrHardStructMarshall #(ptr ptr ptr) +@ stub NdrHardStructMemorySize #(ptr ptr) +@ stub NdrHardStructUnmarshall #(ptr ptr ptr long) @ stdcall NdrInterfacePointerBufferSize(ptr ptr ptr) @ stdcall NdrInterfacePointerFree(ptr ptr ptr) @ stdcall NdrInterfacePointerMarshall(ptr ptr ptr) @@ -261,15 +261,15 @@ @ stub NdrMesTypeEncode2 @ stub NdrMesTypeEncode @ stub NdrMesTypeFree2 -@ stub NdrNonConformantStringBufferSize -@ stub NdrNonConformantStringMarshall -@ stub NdrNonConformantStringMemorySize -@ stub NdrNonConformantStringUnmarshall -@ stub NdrNonEncapsulatedUnionBufferSize -@ stub NdrNonEncapsulatedUnionFree -@ stub NdrNonEncapsulatedUnionMarshall -@ stub NdrNonEncapsulatedUnionMemorySize -@ stub NdrNonEncapsulatedUnionUnmarshall +@ stub NdrNonConformantStringBufferSize #(ptr ptr ptr) +@ stub NdrNonConformantStringMarshall #(ptr ptr ptr) +@ stub NdrNonConformantStringMemorySize #(ptr ptr) +@ stub NdrNonConformantStringUnmarshall #(ptr ptr ptr long) +@ stdcall NdrNonEncapsulatedUnionBufferSize(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionFree(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionMarshall(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionMemorySize(ptr ptr) +@ stdcall NdrNonEncapsulatedUnionUnmarshall(ptr ptr ptr long) @ stub NdrNsGetBuffer @ stub NdrNsSendReceive @ stdcall NdrOleAllocate(long) @@ -341,16 +341,16 @@ @ stdcall NdrUserMarshalMemorySize(ptr ptr) @ stub NdrUserMarshalSimpleTypeConvert @ stdcall NdrUserMarshalUnmarshall(ptr ptr ptr long) -@ stub NdrVaryingArrayBufferSize -@ stub NdrVaryingArrayFree -@ stub NdrVaryingArrayMarshall -@ stub NdrVaryingArrayMemorySize -@ stub NdrVaryingArrayUnmarshall -@ stub NdrXmitOrRepAsBufferSize -@ stub NdrXmitOrRepAsFree -@ stub NdrXmitOrRepAsMarshall -@ stub NdrXmitOrRepAsMemorySize -@ stub NdrXmitOrRepAsUnmarshall +@ stdcall NdrVaryingArrayBufferSize(ptr ptr ptr) +@ stdcall NdrVaryingArrayFree(ptr ptr ptr) +@ stdcall NdrVaryingArrayMarshall(ptr ptr ptr) +@ stdcall NdrVaryingArrayMemorySize(ptr ptr) +@ stdcall NdrVaryingArrayUnmarshall(ptr ptr ptr long) +@ stdcall NdrXmitOrRepAsBufferSize(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsFree(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsMarshall(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsMemorySize(ptr ptr) +@ stdcall NdrXmitOrRepAsUnmarshall(ptr ptr ptr long) @ stub NdrpCreateProxy # wxp @ stub NdrpCreateStub # wxp @ stub NdrpGetProcFormatString # wxp _____ Modified: trunk/reactos/lib/rpcrt4/rpcrt4_main.c --- trunk/reactos/lib/rpcrt4/rpcrt4_main.c 2005-08-12 17:43:23 UTC (rev 17336) +++ trunk/reactos/lib/rpcrt4/rpcrt4_main.c 2005-08-12 17:50:33 UTC (rev 17337) @@ -57,7 +57,7 @@ * * - ORPC is RPC for OLE; once we have a working RPC framework, we can * use it to implement out-of-process OLE client/server communications. - * ATM there is maybe a disconnect between the marshalling in the OLE DLL's + * ATM there is maybe a disconnect between the marshalling in the OLE DLLs * and the marshalling going on here [TODO: well, is there or not?] * * - In-source API Documentation, at least for those functions which we have
19 years, 4 months
1
0
0
0
[ea] 17336: XML chunks are required to contain a single node.
by ea@svn.reactos.com
XML chunks are required to contain a single node. Modified: trunk/vms/directory.xml _____ Modified: trunk/vms/directory.xml --- trunk/vms/directory.xml 2005-08-12 17:41:40 UTC (rev 17335) +++ trunk/vms/directory.xml 2005-08-12 17:43:23 UTC (rev 17336) @@ -1,3 +1,4 @@ +<group> <directory name="lib"> <xi:include href="lib/directory.xml" /> </directory> @@ -9,4 +10,4 @@ <directory name="tools"> <xi:include href="tools/directory.xml" /> </directory> - +</group>
19 years, 4 months
1
0
0
0
[gvg] 17335: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Phil Krylov <phil(a)newstar.rinet.ru> - Added some useful TRACEs. - Allow NULL parameter for WM_SETTEXT in RichEdit. - Implemented EM_LINELENGTH RichEdit message. - Fixed EM_LINEINDEX handler and added EM_LINEFROMCHAR handler. - Implemented EM_EXLINEFROMCHAR, EM_LINEINDEX, EM_FINDTEXT, EM_FINDTEXTW, EM_FINDTEXTEX, and EM_FINDTEXTEXW messages. - Fixed a comment about EM_STREAMIN. - Implemented EM_GETLINECOUNT RichEdit message. - Fixed EM_GETCHARFORMAT for selection containing a single character. - Fixed an off-by-one error in EM_GETLINECOUNT handler. - Fixed an off-by-one error in EM_STREAMOUT handler for non-Unicode plain text output. - Fixed another couple of EM_STREAMOUT bugs. - Removed junk from UTF-8 RTF output. - Added emulation of RichEdit 1.0 behaviour when the 1.0 window class is being used. This emulation (introduced in M$ RichEdit 3.0) counts paragraph endings as 2 characters (CR+LF) instead of 1 (CR). - Added EM_GETZOOM and EM_SETZOOM RichEdit message handlers. - Added some missing but useful items to the TODO list. Felix Nawothnig <felix.nawothnig(a)t-online.de> - Check structure size and fix return values in EM_GETCHARFORMAT. Aric Stewart <aric(a)codeweavers.com> - Implementation for EM_GETTEXTEX. Daniel Remenak <dtremenak(a)gmail.com> - Basic handling of EM_SETTEXTEX. Stefan Huehner <stefan(a)huehner.org> - Make functions static to fix -Wmissing-declarations warnings. - Change some char* to const char* to fix warnigns. - Make some function static. - Fix -Wmissing-declarations warnings. Modified: trunk/reactos/lib/riched20/caret.c Modified: trunk/reactos/lib/riched20/editor.c Modified: trunk/reactos/lib/riched20/editor.h Modified: trunk/reactos/lib/riched20/editstr.h Modified: trunk/reactos/lib/riched20/paint.c Modified: trunk/reactos/lib/riched20/para.c Modified: trunk/reactos/lib/riched20/row.c Modified: trunk/reactos/lib/riched20/run.c Modified: trunk/reactos/lib/riched20/style.c Modified: trunk/reactos/lib/riched20/wrap.c Modified: trunk/reactos/lib/riched20/writer.c Modified: trunk/reactos/w32api/include/richedit.h _____ Modified: trunk/reactos/lib/riched20/caret.c --- trunk/reactos/lib/riched20/caret.c 2005-08-12 17:34:06 UTC (rev 17334) +++ trunk/reactos/lib/riched20/caret.c 2005-08-12 17:41:40 UTC (rev 17335) @@ -192,6 +192,8 @@ /* ME_SkipAndPropagateCharOffset(p->pRun, shift); */ ME_CheckCharOffsets(editor); nChars--; + if (editor->bEmulateVersion10 && nChars) + nChars--; continue; } else @@ -413,7 +415,7 @@ } } -BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p) +static BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p) { if (p->nOffset) { p->nOffset = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, -1); @@ -453,21 +455,26 @@ return FALSE; } -BOOL ME_ArrowRight(ME_TextEditor *editor, ME_Cursor *p) +static BOOL ME_ArrowRight(ME_TextEditor *editor, ME_Cursor *p) { - int new_ofs = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, 1); - if (new_ofs<p->pRun->member.run.strText->nLen) { - p->nOffset = new_ofs; - } - else + ME_DisplayItem *pRun; + + if (!(p->pRun->member.run.nFlags & MERF_ENDPARA)) { - ME_DisplayItem *pRun = ME_FindItemFwd(p->pRun, diRun); - if (pRun) { - p->pRun = pRun; - assert(p->pRun->type == diRun); - p->nOffset = 0; + int new_ofs = ME_StrRelPos2(p->pRun->member.run.strText, p->nOffset, 1); + + if (new_ofs<p->pRun->member.run.strText->nLen) + { + p->nOffset = new_ofs; + return TRUE; } } + pRun = ME_FindItemFwd(p->pRun, diRun); + if (pRun) { + p->pRun = pRun; + assert(p->pRun->type == diRun); + p->nOffset = 0; + } return TRUE; } @@ -698,7 +705,7 @@ return x; } -void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowUp(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pItem, *pItem2; @@ -725,7 +732,7 @@ pCursor->pRun = ME_FindRunInRow(editor, pItem2, x, &pCursor->nOffset, &editor->bCaretAtEnd); } -void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowDown(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pItem; @@ -749,7 +756,7 @@ assert(pCursor->pRun->type == diRun); } -void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pLast, *p; @@ -804,7 +811,7 @@ In such a situation, clicking the scrollbar restores its position back to the normal range (ie. sets it to (doclength-screenheight)). */ -void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRun = pCursor->pRun; ME_DisplayItem *pLast, *p; @@ -852,7 +859,7 @@ assert(pCursor->pRun->type == diRun); } -void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow); if (pRow) { @@ -871,7 +878,7 @@ editor->bCaretAtEnd = FALSE; } -void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diTextStart); if (pRow) { @@ -883,7 +890,7 @@ } } -void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *pRow; @@ -907,7 +914,7 @@ editor->bCaretAtEnd = FALSE; } -void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor) { ME_DisplayItem *p = ME_FindItemFwd(pCursor->pRun, diTextEnd); assert(p); @@ -924,7 +931,7 @@ return memcmp(&editor->pCursors[0], &editor->pCursors[1], sizeof(ME_Cursor))!=0; } -int ME_GetSelCursor(ME_TextEditor *editor, int dir) +static int ME_GetSelCursor(ME_TextEditor *editor, int dir) { int cdir = ME_GetCursorOfs(editor, 0) - ME_GetCursorOfs(editor, 1); @@ -934,7 +941,7 @@ return 1; } -BOOL ME_CancelSelection(ME_TextEditor *editor, int dir) +static BOOL ME_CancelSelection(ME_TextEditor *editor, int dir) { int cdir; @@ -979,7 +986,7 @@ return TRUE; } -void ME_RepaintSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor) +static void ME_RepaintSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor) { if (ME_UpdateSelection(editor, pTempCursor)) { ME_EnsureVisible(editor, editor->pCursors[0].pRun); _____ Modified: trunk/reactos/lib/riched20/editor.c --- trunk/reactos/lib/riched20/editor.c 2005-08-12 17:34:06 UTC (rev 17334) +++ trunk/reactos/lib/riched20/editor.c 2005-08-12 17:41:40 UTC (rev 17335) @@ -31,10 +31,10 @@ + EM_EMPTYUNDOBUFFER + EM_EXGETSEL - EM_EXLIMITTEXT - - EM_EXLINEFROMCHAR + + EM_EXLINEFROMCHAR + EM_EXSETSEL - - EM_FINDTEXT - - EM_FINDTEXTEX + + EM_FINDTEXT (only FR_DOWN flag implemented) + + EM_FINDTEXTEX (only FR_DOWN flag implemented) - EM_FINDWORDBREAK - EM_FMTLINES - EM_FORMATRANGE @@ -51,7 +51,7 @@ - EM_GETLANGOPTIONS 2.0 - EM_GETLIMITTEXT - EM_GETLINE - - EM_GETLINECOUNT returns number of rows, not of paragraphs + + EM_GETLINECOUNT returns number of rows, not of paragraphs + EM_GETMODIFY - EM_GETOLEINTERFACE - EM_GETOPTIONS @@ -73,12 +73,12 @@ - EM_GETWORDBREAKPROC - EM_GETWORDBREAKPROCEX - EM_GETWORDWRAPMODE 1.0asian - - EM_SETZOOM 3.0 + + EM_GETZOOM 3.0 - EM_HIDESELECTION - EM_LIMITTEXT - - EM_LINEFROMCHAR - - EM_LINEINDEX - - EM_LINELENGTH + + EM_LINEFROMCHAR + + EM_LINEINDEX + + EM_LINELENGTH + EM_LINESCROLL - EM_PASTESPECIAL - EM_POSFROMCHARS @@ -112,17 +112,17 @@ - EM_SETSCROLLPOS 3.0 - EM_SETTABSTOPS 3.0 - EM_SETTARGETDEVICE - - EM_SETTEXTEX 3.0 + + EM_SETTEXTEX 3.0 (unicode only, no rich text insertion handling, proper style?) - EM_SETTEXTMODE 2.0 - EM_SETTYPOGRAPHYOPTIONS 3.0 - EM_SETUNDOLIMIT 2.0 - EM_SETWORDBREAKPROC - EM_SETWORDBREAKPROCEX - EM_SETWORDWRAPMODE 1.0asian - - EM_SETZOOM 3.0 + + EM_SETZOOM 3.0 - EM_SHOWSCROLLBAR 2.0 - EM_STOPGROUPTYPING 2.0 - + EM_STREAMIN (can't fall back to text when the RTF isn't really RTF) + + EM_STREAMIN + EM_STREAMOUT + EM_UNDO + WM_CHAR @@ -205,6 +205,9 @@ * - when should EN_SELCHANGE be sent after text change ? (before/after EN_UPDATE?) * - WM_SETTEXT may use wrong style (but I'm 80% sure it's OK) * - EM_GETCHARFORMAT with SCF_SELECTION may not behave 100% like in original (but very close) + * - full justification + * - hyphenation + * - tables * * Bugs that are probably fixed, but not so easy to verify: * - EN_UPDATE/EN_CHANGE are handled very incorrectly (should be OK now) @@ -218,6 +221,7 @@ */ #include "editor.h" +#include "commdlg.h" #include "ole2.h" #include "richole.h" #include "winreg.h" @@ -231,7 +235,7 @@ int me_debug = 0; HANDLE me_heap = NULL; -ME_TextBuffer *ME_MakeText(void) { +static ME_TextBuffer *ME_MakeText(void) { ME_TextBuffer *buf = ALLOC_OBJ(ME_TextBuffer); @@ -295,7 +299,7 @@ return 0; } -void ME_RTFCharAttrHook(RTF_Info *info) +static void ME_RTFCharAttrHook(RTF_Info *info) { CHARFORMAT2W fmt; fmt.cbSize = sizeof(fmt); @@ -394,7 +398,7 @@ /* FIXME this function doesn't get any information about context of the RTF tag, which is very bad, the same tags mean different things in different contexts */ -void ME_RTFParAttrHook(RTF_Info *info) +static void ME_RTFParAttrHook(RTF_Info *info) { PARAFORMAT2 fmt; fmt.cbSize = sizeof(fmt); @@ -459,7 +463,7 @@ } } -void ME_RTFReadHook(RTF_Info *info) { +static void ME_RTFReadHook(RTF_Info *info) { switch(info->rtfClass) { case rtfGroup: @@ -651,11 +655,75 @@ } +static int +ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CHARRANGE *chrgText) +{ + int nStart = chrg->cpMin; + int nLen = lstrlenW(text); + ME_DisplayItem *item = ME_FindItemAtOffset(editor, diRun, nStart, &nStart); + ME_DisplayItem *para; + + if (!item) + return -1; + + if (!nLen) + { + if (chrgText) + chrgText->cpMin = chrgText->cpMax = chrg->cpMin; + return chrg->cpMin; + } + + if (!(flags & FR_DOWN)) + FIXME("Backward search not implemented\n"); + if (!(flags & FR_MATCHCASE)) + FIXME("Case-insensitive search not implemented\n"); + if (flags & ~(FR_DOWN | FR_MATCHCASE)) + FIXME("Flags 0x%08lx not implemented\n", flags & ~(FR_DOWN | FR_MATCHCASE)); + + para = ME_GetParagraph(item); + while (item && para->member.para.nCharOfs + item->member.run.nCharOfs + nStart + nLen < chrg->cpMax) + { + ME_DisplayItem *pCurItem = item; + int nCurStart = nStart; + int nMatched = 0; + + while (pCurItem->member.run.strText->szData[nCurStart + nMatched] == text[nMatched]) + { + nMatched++; + if (nMatched == nLen) + { + nStart += para->member.para.nCharOfs + item->member.run.nCharOfs; + if (chrgText) + { + chrgText->cpMin = nStart; + chrgText->cpMax = nStart + nLen; + } + return nStart; + } + if (nCurStart + nMatched == ME_StrLen(pCurItem->member.run.strText)) + { + pCurItem = ME_FindItemFwd(pCurItem, diRun); + nCurStart = -nMatched; + } + } + nStart++; + if (nStart == ME_StrLen(item->member.run.strText)) + { + item = ME_FindItemFwd(item, diRun); + para = ME_GetParagraph(item); + nStart = 0; + } + } + return -1; +} + + ME_TextEditor *ME_MakeEditor(HWND hWnd) { ME_TextEditor *ed = ALLOC_OBJ(ME_TextEditor); HDC hDC; int i; ed->hWnd = hWnd; + ed->bEmulateVersion10 = FALSE; ed->pBuffer = ME_MakeText(); hDC = GetDC(hWnd); ME_MakeFirstParagraph(hDC, ed->pBuffer); @@ -679,6 +747,7 @@ ed->nParagraphs = 1; ed->nLastSelStart = ed->nLastSelEnd = 0; ed->nScrollPosY = 0; + ed->nZoomNumerator = ed->nZoomDenominator = 0; for (i=0; i<HFONT_CACHE_SIZE; i++) { ed->pFontCache[i].nRefs = 0; @@ -753,6 +822,7 @@ return 0; } + void ME_DestroyEditor(ME_TextEditor *editor) { ME_DisplayItem *pFirst = editor->pBuffer->pFirst; @@ -808,6 +878,140 @@ FIXME(#e ": stub\n"); \ return DefWindowProcW(hWnd, msg, wParam, lParam); +static const char * const edit_messages[] = { + "EM_GETSEL", + "EM_SETSEL", + "EM_GETRECT", + "EM_SETRECT", + "EM_SETRECTNP", + "EM_SCROLL", + "EM_LINESCROLL", + "EM_SCROLLCARET", + "EM_GETMODIFY", + "EM_SETMODIFY", + "EM_GETLINECOUNT", + "EM_LINEINDEX", + "EM_SETHANDLE", + "EM_GETHANDLE", + "EM_GETTHUMB", + "EM_UNKNOWN_BF", + "EM_UNKNOWN_C0", + "EM_LINELENGTH", + "EM_REPLACESEL", + "EM_UNKNOWN_C3", + "EM_GETLINE", + "EM_LIMITTEXT", + "EM_CANUNDO", + "EM_UNDO", + "EM_FMTLINES", + "EM_LINEFROMCHAR", + "EM_UNKNOWN_CA", + "EM_SETTABSTOPS", + "EM_SETPASSWORDCHAR", + "EM_EMPTYUNDOBUFFER", + "EM_GETFIRSTVISIBLELINE", + "EM_SETREADONLY", + "EM_SETWORDBREAKPROC", + "EM_GETWORDBREAKPROC", + "EM_GETPASSWORDCHAR", + "EM_SETMARGINS", + "EM_GETMARGINS", + "EM_GETLIMITTEXT", + "EM_POSFROMCHAR", + "EM_CHARFROMPOS" +}; + +static const char * const richedit_messages[] = { + "EM_CANPASTE", + "EM_DISPLAYBAND", + "EM_EXGETSEL", + "EM_EXLIMITTEXT", + "EM_EXLINEFROMCHAR", + "EM_EXSETSEL", + "EM_FINDTEXT", + "EM_FORMATRANGE", + "EM_GETCHARFORMAT", + "EM_GETEVENTMASK", + "EM_GETOLEINTERFACE", + "EM_GETPARAFORMAT", + "EM_GETSELTEXT", + "EM_HIDESELECTION", + "EM_PASTESPECIAL", + "EM_REQUESTRESIZE", + "EM_SELECTIONTYPE", + "EM_SETBKGNDCOLOR", + "EM_SETCHARFORMAT", + "EM_SETEVENTMASK", + "EM_SETOLECALLBACK", + "EM_SETPARAFORMAT", + "EM_SETTARGETDEVICE", + "EM_STREAMIN", + "EM_STREAMOUT", + "EM_GETTEXTRANGE", + "EM_FINDWORDBREAK", + "EM_SETOPTIONS", + "EM_GETOPTIONS", + "EM_FINDTEXTEX", + "EM_GETWORDBREAKPROCEX", + "EM_SETWORDBREAKPROCEX", + "EM_SETUNDOLIMIT", + "EM_UNKNOWN_USER_83", + "EM_REDO", + "EM_CANREDO", + "EM_GETUNDONAME", + "EM_GETREDONAME", + "EM_STOPGROUPTYPING", + "EM_SETTEXTMODE", + "EM_GETTEXTMODE", + "EM_AUTOURLDETECT", + "EM_GETAUTOURLDETECT", + "EM_SETPALETTE", + "EM_GETTEXTEX", + "EM_GETTEXTLENGTHEX", + "EM_SHOWSCROLLBAR", + "EM_SETTEXTEX", + "EM_UNKNOWN_USER_98", + "EM_UNKNOWN_USER_99", + "EM_SETPUNCTUATION", + "EM_GETPUNCTUATION", + "EM_SETWORDWRAPMODE", + "EM_GETWORDWRAPMODE", + "EM_SETIMECOLOR", + "EM_GETIMECOLOR", + "EM_SETIMEOPTIONS", + "EM_GETIMEOPTIONS", + "EM_CONVPOSITION", + "EM_UNKNOWN_USER_109", + "EM_UNKNOWN_USER_110", + "EM_UNKNOWN_USER_111", + "EM_UNKNOWN_USER_112", + "EM_UNKNOWN_USER_113", + "EM_UNKNOWN_USER_114", + "EM_UNKNOWN_USER_115", + "EM_UNKNOWN_USER_116", + "EM_UNKNOWN_USER_117", + "EM_UNKNOWN_USER_118", + "EM_UNKNOWN_USER_119", + "EM_SETLANGOPTIONS", + "EM_GETLANGOPTIONS", + "EM_GETIMECOMPMODE", + "EM_FINDTEXTW", + "EM_FINDTEXTEXW", + "EM_RECONVERSION", + "EM_SETIMEMODEBIAS", + "EM_GETIMEMODEBIAS" +}; + +static const char * +get_msg_name(UINT msg) +{ + if (msg >= EM_GETSEL && msg <= EM_SETLIMITTEXT) + return edit_messages[msg - EM_GETSEL]; + if (msg >= EM_CANPASTE && msg <= EM_GETIMEMODEBIAS) + return richedit_messages[msg - EM_CANPASTE]; + return ""; +} + /****************************************************************** * RichEditANSIWndProc (RICHED20.10) */ @@ -816,16 +1020,15 @@ PAINTSTRUCT ps; SCROLLINFO si; ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongW(hWnd, 0); - TRACE("msg %d %08x %08lx\n", msg, wParam, lParam); + + TRACE("msg %d (%s) %08x %08lx\n", msg, get_msg_name(msg), wParam, lParam); + switch(msg) { UNSUPPORTED_MSG(EM_AUTOURLDETECT) UNSUPPORTED_MSG(EM_CHARFROMPOS) UNSUPPORTED_MSG(EM_DISPLAYBAND) UNSUPPORTED_MSG(EM_EXLIMITTEXT) - UNSUPPORTED_MSG(EM_EXLINEFROMCHAR) - UNSUPPORTED_MSG(EM_FINDTEXT) - UNSUPPORTED_MSG(EM_FINDTEXTEX) UNSUPPORTED_MSG(EM_FINDWORDBREAK) UNSUPPORTED_MSG(EM_FMTLINES) UNSUPPORTED_MSG(EM_FORMATRANGE) @@ -838,25 +1041,19 @@ UNSUPPORTED_MSG(EM_GETLANGOPTIONS) UNSUPPORTED_MSG(EM_GETLIMITTEXT) UNSUPPORTED_MSG(EM_GETLINE) - UNSUPPORTED_MSG(EM_GETLINECOUNT) /* UNSUPPORTED_MSG(EM_GETOLEINTERFACE) separate stub */ UNSUPPORTED_MSG(EM_GETOPTIONS) UNSUPPORTED_MSG(EM_GETPASSWORDCHAR) UNSUPPORTED_MSG(EM_GETRECT) UNSUPPORTED_MSG(EM_GETREDONAME) UNSUPPORTED_MSG(EM_GETSCROLLPOS) - UNSUPPORTED_MSG(EM_GETTEXTEX) UNSUPPORTED_MSG(EM_GETTEXTMODE) UNSUPPORTED_MSG(EM_GETTYPOGRAPHYOPTIONS) UNSUPPORTED_MSG(EM_GETUNDONAME) UNSUPPORTED_MSG(EM_GETWORDBREAKPROC) UNSUPPORTED_MSG(EM_GETWORDBREAKPROCEX) - UNSUPPORTED_MSG(EM_GETZOOM) UNSUPPORTED_MSG(EM_HIDESELECTION) UNSUPPORTED_MSG(EM_LIMITTEXT) /* also known as EM_SETLIMITTEXT */ - UNSUPPORTED_MSG(EM_LINEFROMCHAR) - UNSUPPORTED_MSG(EM_LINEINDEX) - UNSUPPORTED_MSG(EM_LINELENGTH) UNSUPPORTED_MSG(EM_PASTESPECIAL) /* UNSUPPORTED_MSG(EM_POSFROMCHARS) missing in Wine headers */ UNSUPPORTED_MSG(EM_REQUESTRESIZE) @@ -876,14 +1073,12 @@ UNSUPPORTED_MSG(EM_SETSCROLLPOS) UNSUPPORTED_MSG(EM_SETTABSTOPS) UNSUPPORTED_MSG(EM_SETTARGETDEVICE) - UNSUPPORTED_MSG(EM_SETTEXTEX) UNSUPPORTED_MSG(EM_SETTEXTMODE) UNSUPPORTED_MSG(EM_SETTYPOGRAPHYOPTIONS) UNSUPPORTED_MSG(EM_SETUNDOLIMIT) UNSUPPORTED_MSG(EM_SETWORDBREAKPROC) UNSUPPORTED_MSG(EM_SETWORDBREAKPROCEX) UNSUPPORTED_MSG(EM_SHOWSCROLLBAR) - UNSUPPORTED_MSG(EM_SETZOOM) UNSUPPORTED_MSG(WM_SETFONT) UNSUPPORTED_MSG(WM_STYLECHANGING) UNSUPPORTED_MSG(WM_STYLECHANGED) @@ -905,6 +1100,7 @@ case WM_NCCREATE: { CREATESTRUCTW *pcs = (CREATESTRUCTW *)lParam; + TRACE("WM_NCCREATE: style 0x%08lx\n", pcs->style); editor = ME_MakeEditor(hWnd); SetWindowLongW(hWnd, 0, (long)editor); pcs = 0; /* ignore */ @@ -928,6 +1124,7 @@ { CHARRANGE *pRange = (CHARRANGE *)lParam; ME_GetSelection(editor, (int *)&pRange->cpMin, (int *)&pRange->cpMax); + TRACE("EM_EXGETSEL = (%ld,%ld)\n", pRange->cpMin, pRange->cpMax); return 0; } case EM_CANUNDO: @@ -950,12 +1147,44 @@ case EM_EXSETSEL: { CHARRANGE *pRange = (CHARRANGE *)lParam; + TRACE("EM_EXSETSEL (%ld,%ld)\n", pRange->cpMin, pRange->cpMax); ME_SetSelection(editor, pRange->cpMin, pRange->cpMax); /* FIXME optimize */ ME_Repaint(editor); ME_SendSelChange(editor); return 0; } + case EM_SETTEXTEX: + { + LPWSTR wszText = (LPWSTR)lParam; + SETTEXTEX *pStruct = (SETTEXTEX *)wParam; + size_t len = lstrlenW(wszText); + int from, to; + ME_Style *style; + TRACE("EM_SETTEXEX - %s, flags %d, cp %d\n", debugstr_w(wszText), (int)pStruct->flags, pStruct->codepage); + if (pStruct->codepage != 1200) { + FIXME("EM_SETTEXTEX only supports unicode right now!\n"); + return 0; + } + /* FIXME: this should support RTF strings too, according to MSDN */ + if (pStruct->flags & ST_SELECTION) { + ME_GetSelection(editor, &from, &to); + style = ME_GetSelectionInsertStyle(editor); + ME_InternalDeleteText(editor, from, to - from); + ME_InsertTextFromCursor(editor, 0, wszText, len, style); + ME_ReleaseStyle(style); + } + else { + ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor)); + ME_InsertTextFromCursor(editor, 0, wszText, -1, editor->pBuffer->pDefaultStyle); + len = 1; + } + ME_CommitUndo(editor); + if (!(pStruct->flags & ST_KEEPUNDO)) + ME_EmptyUndoStack(editor); + ME_UpdateRepaint(editor); + return len; + } case EM_SETBKGNDCOLOR: { LRESULT lColor = ME_GetBackColor(editor); @@ -1002,7 +1231,7 @@ if (!wParam) ME_SetDefaultCharFormat(editor, p); else if (wParam == (SCF_WORD | SCF_SELECTION)) - FIXME("word selection not supported\n"); + FIXME("EM_SETCHARFORMAT: word selection not supported\n"); else if (wParam == SCF_ALL) ME_SetCharFormat(editor, 0, ME_GetTextLength(editor), p); else { @@ -1018,14 +1247,19 @@ } case EM_GETCHARFORMAT: { - CHARFORMAT2W tmp; + CHARFORMAT2W tmp, *dst = (CHARFORMAT2W *)lParam; + if (dst->cbSize != sizeof(CHARFORMATA) && + dst->cbSize != sizeof(CHARFORMATW) && + dst->cbSize != sizeof(CHARFORMAT2A) && + dst->cbSize != sizeof(CHARFORMAT2W)) + return 0; tmp.cbSize = sizeof(tmp); if (!wParam) ME_GetDefaultCharFormat(editor, &tmp); else ME_GetSelectionCharFormat(editor, &tmp); - ME_CopyToCFAny((CHARFORMAT2W *)lParam, &tmp); - return 0; + ME_CopyToCFAny(dst, &tmp); + return tmp.dwMask; } case EM_SETPARAFORMAT: ME_SetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam); @@ -1087,12 +1321,21 @@ } case WM_SETTEXT: { - LPWSTR wszText = ME_ToUnicode(hWnd, (void *)lParam); - TRACE("WM_SETTEXT - %s\n", (char *)(wszText)); /* debugstr_w() */ ME_InternalDeleteText(editor, 0, ME_GetTextLength(editor)); - /* uses default style! */ - ME_InsertTextFromCursor(editor, 0, wszText, -1, editor->pBuffer->pDefaultStyle); - ME_EndToUnicode(hWnd, wszText); + if (lParam) + { + LPWSTR wszText = ME_ToUnicode(hWnd, (void *)lParam); + TRACE("WM_SETTEXT lParam==%lx\n",lParam); + TRACE("WM_SETTEXT - %s\n", debugstr_w(wszText)); /* debugstr_w() */ + if (lstrlenW(wszText) > 0) + { + /* uses default style! */ + ME_InsertTextFromCursor(editor, 0, wszText, -1, editor->pBuffer->pDefaultStyle); + } + ME_EndToUnicode(hWnd, wszText); + } + else + TRACE("WM_SETTEXT - NULL\n"); ME_CommitUndo(editor); ME_EmptyUndoStack(editor); ME_UpdateRepaint(editor); @@ -1184,6 +1427,29 @@ tr.lpstrText = (WCHAR *)lParam; return RichEditANSIWndProc(hWnd, EM_GETTEXTRANGE, 0, (LPARAM)&tr); } + case EM_GETTEXTEX: + { + GETTEXTEX *ex = (GETTEXTEX*)wParam; + + if (ex->flags != 0) + FIXME("Unhandled EM_GETTEXTEX flags 0x%lx\n",ex->flags); + + if (IsWindowUnicode(hWnd)) + return ME_GetTextW(editor, (LPWSTR)lParam, 0, ex->cb, FALSE); + else + { + LPWSTR buffer = HeapAlloc(GetProcessHeap(),0,ex->cb*sizeof(WCHAR)); + DWORD buflen = ex->cb; + LRESULT rc; + DWORD flags = 0; + + buflen = ME_GetTextW(editor, buffer, 0, buflen, FALSE); + rc = WideCharToMultiByte(ex->codepage, flags, buffer, buflen, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefaultChar); + + HeapFree(GetProcessHeap(),0,buffer); + return rc; + } + } case EM_GETSELTEXT: { int from, to; @@ -1213,6 +1479,114 @@ } return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, rng->chrg.cpMax-rng->chrg.cpMin, FALSE); } + case EM_GETLINECOUNT: + { + ME_DisplayItem *item = editor->pBuffer->pFirst->next; + int nRows = 0; + + while (item != editor->pBuffer->pLast) + { + assert(item->type == diParagraph); + nRows += item->member.para.nRows; + item = item->member.para.next_para; + } + TRACE("EM_GETLINECOUNT: nRows==%d\n", nRows); + return max(1, nRows); + } + case EM_LINEFROMCHAR: + { + if (wParam == -1) + return ME_RowNumberFromCharOfs(editor, ME_GetCursorOfs(editor, 1)); + else + return ME_RowNumberFromCharOfs(editor, wParam); + } + case EM_EXLINEFROMCHAR: + { + return ME_RowNumberFromCharOfs(editor, lParam); + } + case EM_LINEINDEX: + { + ME_DisplayItem *item, *para; + int nCharOfs; + + if (wParam == -1) + item = ME_FindItemBack(editor->pCursors[0].pRun, diStartRow); + else + item = ME_FindRowWithNumber(editor, wParam); + if (!item) + return -1; + para = ME_GetParagraph(item); + item = ME_FindItemFwd(item, diRun); + nCharOfs = para->member.para.nCharOfs + item->member.run.nCharOfs; + TRACE("EM_LINEINDEX: nCharOfs==%d\n", nCharOfs); + return nCharOfs; + } + case EM_LINELENGTH: + { + ME_DisplayItem *item, *item_end; + int nChars = 0; + + if (wParam > ME_GetTextLength(editor)) + return 0; + if (wParam == -1) + { + FIXME("EM_LINELENGTH: returning number of unselected characters on lines with selection unsupported.\n"); + return 0; + } + item = ME_FindItemAtOffset(editor, diRun, wParam, NULL); + item = ME_RowStart(item); + item_end = ME_RowEnd(item); + if (!item_end) + { + /* Empty buffer, no runs */ + nChars = 0; + } + else + { + nChars = ME_CharOfsFromRunOfs(editor, item_end, ME_StrLen(item_end->member.run.strText)); + nChars -= ME_CharOfsFromRunOfs(editor, item, 0); + } + TRACE("EM_LINELENGTH(%d)==%d\n",wParam, nChars); + return nChars; + } + case EM_FINDTEXT: + { + FINDTEXTA *ft = (FINDTEXTA *)lParam; + int nChars = MultiByteToWideChar(CP_ACP, 0, ft->lpstrText, -1, NULL, 0); + WCHAR *tmp; + + if ((tmp = ALLOC_N_OBJ(WCHAR, nChars)) != NULL) + MultiByteToWideChar(CP_ACP, 0, ft->lpstrText, -1, tmp, nChars); + return ME_FindText(editor, wParam, &ft->chrg, tmp, NULL); + } + case EM_FINDTEXTEX: + { + FINDTEXTEXA *ex = (FINDTEXTEXA *)lParam; + int nChars = MultiByteToWideChar(CP_ACP, 0, ex->lpstrText, -1, NULL, 0); + WCHAR *tmp; + + if ((tmp = ALLOC_N_OBJ(WCHAR, nChars)) != NULL) + MultiByteToWideChar(CP_ACP, 0, ex->lpstrText, -1, tmp, nChars); + return ME_FindText(editor, wParam, &ex->chrg, tmp, &ex->chrgText); + } + case EM_FINDTEXTW: + { + FINDTEXTW *ft = (FINDTEXTW *)lParam; + return ME_FindText(editor, wParam, &ft->chrg, ft->lpstrText, NULL); + } + case EM_FINDTEXTEXW: + { + FINDTEXTEXW *ex = (FINDTEXTEXW *)lParam; + return ME_FindText(editor, wParam, &ex->chrg, ex->lpstrText, &ex->chrgText); + } + case EM_GETZOOM: + if (!wParam || !lParam) + return FALSE; + *(int *)wParam = editor->nZoomNumerator; + *(int *)lParam = editor->nZoomDenominator; + return TRUE; + case EM_SETZOOM: + return ME_SetZoom(editor, wParam, lParam); case WM_CREATE: ME_CommitUndo(editor); ME_WrapMarkedParagraphs(editor); @@ -1369,10 +1743,7 @@ } case WM_SIZE: { - ME_MarkAllForWrapping(editor); - ME_WrapMarkedParagraphs(editor); - ME_UpdateScrollBar(editor); - ME_Repaint(editor); + ME_RewrapRepaint(editor); return DefWindowProcW(hWnd, msg, wParam, lParam); } case EM_GETOLEINTERFACE: @@ -1388,13 +1759,24 @@ return 0L; } + /****************************************************************** * RichEdit10ANSIWndProc (RICHED20.9) */ LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { + LRESULT result; + /* FIXME: this is NOT the same as 2.0 version */ - return RichEditANSIWndProc(hWnd, msg, wParam, lParam); + result = RichEditANSIWndProc(hWnd, msg, wParam, lParam); + if (msg == WM_NCCREATE) + { + ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongW(hWnd, 0); + + editor->bEmulateVersion10 = TRUE; + editor->pBuffer->pLast->member.para.nCharOfs = 2; + } + return result; } void ME_SendOldNotify(ME_TextEditor *editor, int nCode) _____ Modified: trunk/reactos/lib/riched20/editor.h --- trunk/reactos/lib/riched20/editor.h 2005-08-12 17:34:06 UTC (rev 17334) +++ trunk/reactos/lib/riched20/editor.h 2005-08-12 17:41:40 UTC (rev 17335) @@ -100,6 +100,8 @@ ME_DisplayItem *ME_RowStart(ME_DisplayItem *item); ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); void ME_RenumberParagraphs(ME_DisplayItem *item); /* TODO */ +ME_DisplayItem *ME_FindRowWithNumber(ME_TextEditor *editor, int nRow); +int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs); /* run.c */ ME_DisplayItem *ME_MakeRun(ME_Style *s, ME_String *strData, int nFlags); @@ -189,6 +191,7 @@ /* paint.c */ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, RECT *rcUpdate); void ME_Repaint(ME_TextEditor *editor); +void ME_RewrapRepaint(ME_TextEditor *editor); void ME_UpdateRepaint(ME_TextEditor *editor); void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph); void ME_UpdateScrollBar(ME_TextEditor *editor); @@ -196,6 +199,7 @@ void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun); COLORREF ME_GetBackColor(ME_TextEditor *editor); void ME_Scroll(ME_TextEditor *editor, int cx, int cy); +BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator); /* richole.c */ extern LRESULT CreateIRichEditOle(LPVOID *); _____ Modified: trunk/reactos/lib/riched20/editstr.h --- trunk/reactos/lib/riched20/editstr.h 2005-08-12 17:34:06 UTC (rev 17334) +++ trunk/reactos/lib/riched20/editstr.h 2005-08-12 17:41:40 UTC (rev 17335) @@ -147,6 +147,7 @@ int nFlags; int nYPos, nHeight; int nLastPaintYPos, nLastPaintHeight; + int nRows; struct tagME_DisplayItem *prev_para, *next_para, *document; } ME_Paragraph; @@ -246,6 +247,7 @@ typedef struct tagME_TextEditor { HWND hWnd; + BOOL bEmulateVersion10; BOOL bCaretShown; ME_TextBuffer *pBuffer; ME_Cursor *pCursors; @@ -267,6 +269,7 @@ ME_OutStream *pStream; BOOL bScrollX, bScrollY; int nScrollPosY; + int nZoomNumerator, nZoomDenominator; } ME_TextEditor; typedef struct tagME_Context _____ Modified: trunk/reactos/lib/riched20/paint.c --- trunk/reactos/lib/riched20/paint.c 2005-08-12 17:34:06 UTC (rev 17334) +++ trunk/reactos/lib/riched20/paint.c 2005-08-12 17:41:40 UTC (rev 17335) @@ -94,7 +94,7 @@ ME_DestroyContext(&c); } -void ME_MarkParagraphRange(ME_TextEditor *editor, ME_DisplayItem *p1, +static void ME_MarkParagraphRange(ME_TextEditor *editor, ME_DisplayItem *p1, ME_DisplayItem *p2, int nFlags) { ME_DisplayItem *p3; @@ -113,7 +113,7 @@ } while (p1 != p2); } -void ME_MarkOffsetRange(ME_TextEditor *editor, int from, int to, int nFlags) +static void ME_MarkOffsetRange(ME_TextEditor *editor, int from, int to, int nFlags) { ME_Cursor c1, c2; ME_CursorFromCharOfs(editor, from, &c1); @@ -122,7 +122,7 @@ ME_MarkParagraphRange(editor, ME_GetParagraph(c1.pRun), ME_GetParagraph(c2.pRun), nFlags); } -void ME_MarkSelectionForRepaint(ME_TextEditor *editor) +static void ME_MarkSelectionForRepaint(ME_TextEditor *editor) { int from, to, from2, to2, end; @@ -173,7 +173,18 @@ ME_SendSelChange(editor); } -void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, int nChars, + +void +ME_RewrapRepaint(ME_TextEditor *editor) +{ + ME_MarkAllForWrapping(editor); + ME_WrapMarkedParagraphs(editor); + ME_UpdateScrollBar(editor); + ME_Repaint(editor); +} + + +static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, int nChars, ME_Style *s, int *width, int nSelFrom, int nSelTo, int ymin, int cy) { HDC hDC = c->hDC; HGDIOBJ hOldFont; @@ -193,7 +204,17 @@ if (s->fmt.dwEffects & CFE_SUBSCRIPT) yTwipsOffset = -s->fmt.yHeight/12; } if (yTwipsOffset) - yOffset = yTwipsOffset*GetDeviceCaps(hDC, LOGPIXELSY)/1440; + { + int numerator = 1; + int denominator = 1; + + if (c->editor->nZoomNumerator) + { + numerator = c->editor->nZoomNumerator; + denominator = c->editor->nZoomDenominator; + } + yOffset = yTwipsOffset * GetDeviceCaps(hDC, LOGPIXELSY) * numerator / denominator / 1440; + } ExtTextOutW(hDC, x, y-yOffset, 0, NULL, szText, nChars, NULL); [truncated at 1000 lines; 445 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17334: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes (Reg* functions). Modified: trunk/reactos/lib/oledlg/insobjdlg.c _____ Modified: trunk/reactos/lib/oledlg/insobjdlg.c --- trunk/reactos/lib/oledlg/insobjdlg.c 2005-08-12 17:30:09 UTC (rev 17333) +++ trunk/reactos/lib/oledlg/insobjdlg.c 2005-08-12 17:34:06 UTC (rev 17334) @@ -333,7 +333,8 @@ */ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo) { - DWORD i, len; + DWORD i; + LONG len; HKEY hkclsids; HKEY hkey; CLSID clsid;
19 years, 4 months
1
0
0
0
[gvg] 17333: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Huw Davies <huw(a)codeweavers.com> for Mandriva - Cope with the index in a import table entry being a typeinfo index rather than a guid offset. Robert Shearman <rob(a)codeweavers.com> - Document active object and variant functions. - Rename OLEAUT32_Dll* Functions to Dll*. - IRpcStubBuffer_Disconnect can be called multiple times. - Release TypeLib when freeing stub buffer. - Fix confusion between number of characters and number of bytes in unmarshaling BSTRs. Convert it all to characters for consistency with the BSTR_User* routines. - Marshal and unmarshal TKIND_ENUM and TKIND_ALIAS. - Fix VT_BYREF|VT_UNKNOWN return values by comparing the correct value with VT_UNKNOWN and VT_DISPATCH. - Better tracing. - Return DISP_E_EXCEPTION from ITypeInfo_Invoke on an error in the called function. - Remove RegisterTypeLib hack. - Support VT_BYREF|VT_I4 in _copy_arg. - Activate ITypeLib, ITypeInfo and IEnumVARIANT Marshalers. Alex Villacis Lasso <a_villacis(a)palosanto.com> - Fix GIF palette allocation, by relying on ColorCount instead of SColorResolution. - Ensure that underflowing negative float is represented as a positive 0, just as native oleaut32. Alexandre Julliard <julliard(a)winehq.org> - Get rid of cursoricon.h. Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes (Reg* functions). - Interlocked LONG* gcc warning fixes. Stefan Huehner <stefan(a)huehner.org> - Fix some more -Wmissing-declarations warnings. Robert Shearman <rob(a)codeweavers.com> for Mandriva - Add a generic TYPEDESC VT to VARIANT VT mapper so we can use the standard Variant* routines. Use this new function to properly copy & de-reference the return value. - Conversions between variants types of the same size should ignore overflows. - Tests for this behaviour. Modified: trunk/reactos/include/wine/unicode.h Modified: trunk/reactos/lib/oleaut32/connpt.c Modified: trunk/reactos/lib/oleaut32/dispatch.c Modified: trunk/reactos/lib/oleaut32/oleaut.c Modified: trunk/reactos/lib/oleaut32/oleaut32.spec Modified: trunk/reactos/lib/oleaut32/olefont.c Modified: trunk/reactos/lib/oleaut32/olepicture.c Modified: trunk/reactos/lib/oleaut32/recinfo.c Modified: trunk/reactos/lib/oleaut32/regsvr.c Modified: trunk/reactos/lib/oleaut32/tmarshal.c Modified: trunk/reactos/lib/oleaut32/typelib.c Modified: trunk/reactos/lib/oleaut32/typelib.h Modified: trunk/reactos/lib/oleaut32/typelib16.c Modified: trunk/reactos/lib/oleaut32/typelib2.c Modified: trunk/reactos/lib/oleaut32/variant.c Modified: trunk/reactos/lib/oleaut32/vartype.c _____ Modified: trunk/reactos/include/wine/unicode.h --- trunk/reactos/include/wine/unicode.h 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/include/wine/unicode.h 2005-08-12 17:30:09 UTC (rev 17333) @@ -20,6 +20,7 @@ #define strcmpiW(s1,s2) _wcsicmp((const wchar_t *)(s1),(const wchar_t *)(s2)) #define strncmpiW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n)) #define strtoulW(s1,s2,b) wcstoul((const wchar_t *)(s1),(wchar_t **)(s2),(b)) +#define strspnW(str, accept) wcsspn((const wchar_t *)(str), (const wchar_t *)(accept)) #define tolowerW(n) towlower((n)) #define toupperW(n) towupper((n)) #define islowerW(n) iswlower((n)) _____ Modified: trunk/reactos/lib/oleaut32/connpt.c --- trunk/reactos/lib/oleaut32/connpt.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/connpt.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -54,7 +54,7 @@ IUnknown *Obj; /* Reference count */ - DWORD ref; + LONG ref; /* IID of sink interface */ IID iid; @@ -76,7 +76,7 @@ const IEnumConnectionsVtbl *lpvtbl; - DWORD ref; + LONG ref; /* IUnknown of ConnectionPoint, used for ref counting */ IUnknown *pUnk; _____ Modified: trunk/reactos/lib/oleaut32/dispatch.c --- trunk/reactos/lib/oleaut32/dispatch.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/dispatch.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -217,7 +217,7 @@ const IDispatchVtbl *lpVtbl; void * pvThis; ITypeInfo * pTypeInfo; - ULONG ref; + LONG ref; } StdDispatch; /*********************************************************************** ******* _____ Modified: trunk/reactos/lib/oleaut32/oleaut.c --- trunk/reactos/lib/oleaut32/oleaut.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/oleaut.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -42,8 +42,11 @@ /* The OLE Automation ProxyStub Interface Class (aka Typelib Marshaler) */ extern const GUID CLSID_PSOAInterface; -/* IDispatch marshaler */ extern const GUID CLSID_PSDispatch; +extern const GUID CLSID_PSEnumVariant; +extern const GUID CLSID_PSTypeInfo; +extern const GUID CLSID_PSTypeLib; +extern const GUID CLSID_PSTypeComp; static BOOL BSTR_bCache = TRUE; /* Cache allocations to minimise alloc calls? */ @@ -449,6 +452,18 @@ /*********************************************************************** * RegisterActiveObject (OLEAUT32.33) + * + * Registers an object in the global item table. + * + * PARAMS + * punk [I] Object to register. + * rcid [I] CLSID of the object. + * dwFlags [I] Flags. + * pdwRegister [O] Address to store cookie of object registration in. + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. */ HRESULT WINAPI RegisterActiveObject( LPUNKNOWN punk,REFCLSID rcid,DWORD dwFlags,LPDWORD pdwRegister @@ -475,6 +490,16 @@ /*********************************************************************** * RevokeActiveObject (OLEAUT32.34) + * + * Revokes an object from the global item table. + * + * PARAMS + * xregister [I] Registration cookie. + * reserved [I] Reserved. Set to NULL. + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. */ HRESULT WINAPI RevokeActiveObject(DWORD xregister,LPVOID reserved) { @@ -491,6 +516,17 @@ /*********************************************************************** * GetActiveObject (OLEAUT32.35) + * + * Gets an object from the global item table. + * + * PARAMS + * rcid [I] CLSID of the object. + * preserved [I] Reserved. Set to NULL. + * ppunk [O] Address to store object into. + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. */ HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk) { @@ -667,7 +703,7 @@ /*********************************************************************** * DllGetClassObject (OLEAUT32.1) */ -HRESULT WINAPI OLEAUT32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) { *ppv = NULL; if (IsEqualGUID(rclsid,&CLSID_StdFont)) { @@ -684,8 +720,11 @@ return S_OK; } } - if (IsEqualGUID(rclsid,&CLSID_PSDispatch)) { - return OLEAUTPS_DllGetClassObject(rclsid,iid,ppv); + if (IsEqualCLSID(rclsid, &CLSID_PSDispatch) || + IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) || + IsEqualCLSID(rclsid, &CLSID_PSTypeLib) || + IsEqualCLSID(rclsid, &CLSID_PSEnumVariant)) { + return OLEAUTPS_DllGetClassObject(&CLSID_PSDispatch, iid, ppv); } if (IsEqualGUID(rclsid,&CLSID_PSOAInterface)) { if (S_OK==TypeLibFac_DllGetClassObject(rclsid,iid,ppv)) @@ -707,7 +746,7 @@ * RETURNS * Always returns S_FALSE. This dll cannot be unloaded. */ -HRESULT WINAPI OLEAUT32_DllCanUnloadNow(void) +HRESULT WINAPI DllCanUnloadNow(void) { return S_FALSE; } _____ Modified: trunk/reactos/lib/oleaut32/oleaut32.spec --- trunk/reactos/lib/oleaut32/oleaut32.spec 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/oleaut32.spec 2005-08-12 17:30:09 UTC (rev 17333) @@ -1,4 +1,4 @@ -1 stdcall -private DllGetClassObject(ptr ptr ptr) OLEAUT32_DllGetClassObject +1 stdcall -private DllGetClassObject(ptr ptr ptr) 2 stdcall SysAllocString(wstr) 3 stdcall SysReAllocString(ptr wstr) 4 stdcall SysAllocStringLen(wstr long) @@ -312,8 +312,8 @@ 317 stdcall VarR8Round(double long ptr) 318 stdcall VarCat(ptr ptr ptr) 319 stdcall VarDateFromUdateEx(ptr long long ptr) -320 stdcall -private DllRegisterServer() OLEAUT32_DllRegisterServer -321 stdcall -private DllUnregisterServer() OLEAUT32_DllUnregisterServer +320 stdcall -private DllRegisterServer() +321 stdcall -private DllUnregisterServer() 322 stdcall GetRecordInfoFromGuids(ptr long long long ptr ptr) 323 stdcall GetRecordInfoFromTypeInfo(ptr ptr) 325 stub SetVarConversionLocaleSetting @@ -382,7 +382,7 @@ 399 stub UserMSG_free_local 401 stdcall OleLoadPictureEx(ptr long long long long long long ptr) 402 stub OleLoadPictureFileEx -410 stdcall -private DllCanUnloadNow() OLEAUT32_DllCanUnloadNow +410 stdcall -private DllCanUnloadNow() 411 stdcall SafeArrayCreateVector(long long long) 412 stdcall SafeArrayCopyData(ptr ptr) 413 stdcall VectorFromBstr(ptr ptr) _____ Modified: trunk/reactos/lib/oleaut32/olefont.c --- trunk/reactos/lib/oleaut32/olefont.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/olefont.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -72,7 +72,7 @@ /* * Reference count for that instance of the class. */ - ULONG ref; + LONG ref; /* * This structure contains the description of the class. @@ -2102,7 +2102,7 @@ { /* IUnknown fields */ const IClassFactoryVtbl *lpVtbl; - DWORD ref; + LONG ref; } IClassFactoryImpl; static HRESULT WINAPI _____ Modified: trunk/reactos/lib/oleaut32/olepicture.c --- trunk/reactos/lib/oleaut32/olepicture.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/olepicture.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -76,7 +76,6 @@ #include "wine/unicode.h" #include "wine/wingdi16.h" -#include "cursoricon.h" #ifdef HAVE_JPEGLIB_H /* This is a hack, so jpeglib.h does not redefine INT32 and the like*/ @@ -93,6 +92,29 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); +#include "pshpack1.h" + +typedef struct { + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; + WORD xHotspot; + WORD yHotspot; + DWORD dwDIBSize; + DWORD dwDIBOffset; +} CURSORICONFILEDIRENTRY; + +typedef struct +{ + WORD idReserved; + WORD idType; + WORD idCount; + CURSORICONFILEDIRENTRY idEntries[1]; +} CURSORICONFILEDIR; + +#include "poppack.h" + /*********************************************************************** ** * Declaration of implementation class */ @@ -109,7 +131,7 @@ const IConnectionPointContainerVtbl *lpvtbl4; /* Object reference count */ - DWORD ref; + LONG ref; /* We own the object and must destroy it ourselves */ BOOL fOwn; @@ -1117,12 +1139,12 @@ ); /* */ padding = (gif->SWidth+3) & ~3; - bmi = HeapAlloc(GetProcessHeap(),0,sizeof(BITMAPINFOHEADER)+(1<<gif->SColorRes olution)*sizeof(RGBQUAD)); - bytes= HeapAlloc(GetProcessHeap(),0,padding*gif->SHeight); si = gif->SavedImages+0; gid = &(si->ImageDesc); cm = gid->ColorMap; if (!cm) cm = gif->SColorMap; + bmi = HeapAlloc(GetProcessHeap(),0,sizeof(BITMAPINFOHEADER)+(cm->ColorCount)*s izeof(RGBQUAD)); + bytes= HeapAlloc(GetProcessHeap(),0,padding*gif->SHeight); /* look for the transparent color extension */ for (i = 0; i < si->ExtensionBlockCount; ++i) { @@ -1134,7 +1156,7 @@ } } - for (i=0;i<(1<<gif->SColorResolution);i++) { + for (i = 0; i < cm->ColorCount; i++) { bmi->bmiColors[i].rgbRed = cm->Colors[i].Red; bmi->bmiColors[i].rgbGreen = cm->Colors[i].Green; bmi->bmiColors[i].rgbBlue = cm->Colors[i].Blue; @@ -1181,7 +1203,7 @@ bmi->bmiHeader.biSizeImage = padding*gif->SHeight; bmi->bmiHeader.biXPelsPerMeter = 0; bmi->bmiHeader.biYPelsPerMeter = 0; - bmi->bmiHeader.biClrUsed = 1 << gif->SColorResolution; + bmi->bmiHeader.biClrUsed = cm->ColorCount; bmi->bmiHeader.biClrImportant = 0; hdcref = GetDC(0); @@ -2210,7 +2232,7 @@ { /* IUnknown fields */ const IClassFactoryVtbl *lpVtbl; - DWORD ref; + LONG ref; } IClassFactoryImpl; static HRESULT WINAPI _____ Modified: trunk/reactos/lib/oleaut32/recinfo.c --- trunk/reactos/lib/oleaut32/recinfo.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/recinfo.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -42,7 +42,7 @@ typedef struct { const IRecordInfoVtbl *lpVtbl; - ULONG ref; + LONG ref; GUID guid; UINT lib_index; _____ Modified: trunk/reactos/lib/oleaut32/regsvr.c --- trunk/reactos/lib/oleaut32/regsvr.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/regsvr.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -445,20 +445,20 @@ extern GUID const CLSID_PSDispatch; -static GUID const CLSID_PSEnumVariant = { +GUID const CLSID_PSEnumVariant = { 0x00020421, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; -static GUID const CLSID_PSTypeInfo = { +GUID const CLSID_PSTypeInfo = { 0x00020422, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; -static GUID const CLSID_PSTypeLib = { +GUID const CLSID_PSTypeLib = { 0x00020423, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; +GUID const CLSID_PSTypeComp = { + 0x00020425, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + extern GUID const CLSID_PSOAInterface; -static GUID const CLSID_PSTypeComp = { - 0x00020425, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; - static GUID const CLSID_OldFont = { 0x46763EE0, 0xCAB2, 0x11CE, {0x8C,0x20,0x00,0xAA,0x00,0x51,0xE5,0xD4} }; @@ -903,7 +903,7 @@ /*********************************************************************** * DllRegisterServer (OLEAUT32.320) */ -HRESULT WINAPI OLEAUT32_DllRegisterServer() +HRESULT WINAPI DllRegisterServer(void) { HRESULT hr; @@ -918,7 +918,7 @@ /*********************************************************************** * DllUnregisterServer (OLEAUT32.321) */ -HRESULT WINAPI OLEAUT32_DllUnregisterServer() +HRESULT WINAPI DllUnregisterServer(void) { HRESULT hr; _____ Modified: trunk/reactos/lib/oleaut32/tmarshal.c --- trunk/reactos/lib/oleaut32/tmarshal.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/tmarshal.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -262,7 +262,8 @@ char tlguid[200],typelibkey[300],interfacekey[300],ver[100]; char tlfn[260]; OLECHAR tlfnW[260]; - DWORD tlguidlen, verlen, type, tlfnlen; + DWORD tlguidlen, verlen, type; + LONG tlfnlen; ITypeLib *tl; sprintf( interfacekey, "Interface\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib ", @@ -277,14 +278,14 @@ } type = (1<<REG_SZ); tlguidlen = sizeof(tlguid); - if (RegQueryValueExA(ikey,NULL,NULL,&type,tlguid,&tlguidlen)) { + if (RegQueryValueExA(ikey,NULL,NULL,&type,(LPBYTE)tlguid,&tlguidlen)) { ERR("Getting typelib guid failed.\n"); RegCloseKey(ikey); return E_FAIL; } type = (1<<REG_SZ); verlen = sizeof(ver); - if (RegQueryValueExA(ikey,"Version",NULL,&type,ver,&verlen)) { + if (RegQueryValueExA(ikey,"Version",NULL,&type,(LPBYTE)ver,&verlen)) { ERR("Could not get version value?\n"); RegCloseKey(ikey); return E_FAIL; @@ -357,7 +358,7 @@ typedef struct _TMProxyImpl { LPVOID *lpvtbl; const IRpcProxyBufferVtbl *lpvtbl2; - ULONG ref; + LONG ref; TMAsmProxy *asmstubs; ITypeInfo* tinfo; @@ -564,15 +565,18 @@ if (writeit) { /* ptr to ptr to magic widestring, basically */ BSTR *bstr = (BSTR *) *arg; + DWORD len; if (!*bstr) { /* -1 means "null string" which is equivalent to empty string */ - DWORD fakelen = -1; - xbuf_add(buf, (LPBYTE)&fakelen,4); + len = -1; + hres = xbuf_add(buf, (LPBYTE)&len,sizeof(DWORD)); + if (hres) return hres; } else { - /* BSTRs store the length behind the first character */ - DWORD *len = ((DWORD *)(*bstr))-1; - hres = xbuf_add(buf, (LPBYTE) len, *len + 4); - if (hres) return hres; + len = *((DWORD*)*bstr-1)/sizeof(WCHAR); + hres = xbuf_add(buf,(LPBYTE)&len,sizeof(DWORD)); + if (hres) return hres; + hres = xbuf_add(buf,(LPBYTE)*bstr,len * sizeof(WCHAR)); + if (hres) return hres; } } @@ -591,17 +595,18 @@ TRACE_(olerelay)("<bstr NULL>"); } if (writeit) { - if (!*arg) { - DWORD fakelen = -1; - hres = xbuf_add(buf,(LPBYTE)&fakelen,4); - if (hres) - return hres; + BSTR bstr = (BSTR)*arg; + DWORD len; + if (!bstr) { + len = -1; + hres = xbuf_add(buf,(LPBYTE)&len,sizeof(DWORD)); + if (hres) return hres; } else { - DWORD *bstr = ((DWORD*)(*arg))-1; - - hres = xbuf_add(buf,(LPBYTE)bstr,bstr[0]+4); - if (hres) - return hres; + len = *((DWORD*)bstr-1)/sizeof(WCHAR); + hres = xbuf_add(buf,(LPBYTE)&len,sizeof(DWORD)); + if (hres) return hres; + hres = xbuf_add(buf,(LPBYTE)bstr,len * sizeof(WCHAR)); + if (hres) return hres; } } @@ -704,6 +709,14 @@ if (debugout) TRACE_(olerelay)("}"); break; } + case TKIND_ALIAS: + return serialize_param(tinfo2,writeit,debugout,dealloc,&tattr->tdescAlias,arg,b uf); + case TKIND_ENUM: + hres = S_OK; + if (debugout) TRACE_(olerelay)("%lx",*arg); + if (writeit) + hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD)); + return hres; default: FIXME("Unhandled typekind %d\n",tattr->typekind); hres = E_FAIL; @@ -1130,8 +1143,8 @@ **bstr = NULL; if (debugout) TRACE_(olerelay)("<bstr NULL>"); } else { - str = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,len+sizeof(WCHAR)); - hres = xbuf_get(buf,(LPBYTE)str,len); + str = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(len+1)*sizeof(WCHAR)); + hres = xbuf_get(buf,(LPBYTE)str,len*sizeof(WCHAR)); if (hres) { ERR("Failed to read BSTR.\n"); return hres; @@ -1160,8 +1173,8 @@ *arg = 0; if (debugout) TRACE_(olerelay)("<bstr NULL>"); } else { - str = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,len+sizeof(WCHAR)); - hres = xbuf_get(buf,(LPBYTE)str,len); + str = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(len+1)*sizeof(WCHAR)); + hres = xbuf_get(buf,(LPBYTE)str,len*sizeof(WCHAR)); if (hres) { ERR("Failed to read BSTR.\n"); return hres; @@ -1275,6 +1288,15 @@ if (debugout) TRACE_(olerelay)("}"); break; } + case TKIND_ALIAS: + return deserialize_param(tinfo2,readit,debugout,alloc,&tattr->tdescAlias,arg,bu f); + case TKIND_ENUM: + if (readit) { + hres = xbuf_get(buf,(LPBYTE)arg,sizeof(DWORD)); + if (hres) ERR("Failed to read enum (4 byte)\n"); + } + if (debugout) TRACE_(olerelay)("%lx",*arg); + return hres; default: ERR("Unhandled typekind %d\n",tattr->typekind); hres = E_FAIL; @@ -1911,7 +1933,7 @@ typedef struct _TMStubImpl { const IRpcStubBufferVtbl *lpvtbl; - ULONG ref; + LONG ref; LPUNKNOWN pUnk; ITypeInfo *tinfo; @@ -1952,6 +1974,7 @@ if (!refCount) { IRpcStubBuffer_Disconnect(iface); + ITypeInfo_Release(This->tinfo); CoTaskMemFree(This); } return refCount; @@ -1976,9 +1999,11 @@ TRACE("(%p)->()\n", This); - IUnknown_Release(This->pUnk); - This->pUnk = NULL; - return; + if (This->pUnk) + { + IUnknown_Release(This->pUnk); + This->pUnk = NULL; + } } static HRESULT WINAPI _____ Modified: trunk/reactos/lib/oleaut32/typelib.c --- trunk/reactos/lib/oleaut32/typelib.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/typelib.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -84,6 +84,8 @@ /* The OLE Automation ProxyStub Interface Class (aka Typelib Marshaler) */ const GUID CLSID_PSOAInterface = { 0x00020424, 0, 0, { 0xC0, 0, 0, 0, 0, 0, 0, 0x46 } }; +static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYPE *vt); + /*********************************************************************** ***** * FromLExxx * @@ -617,17 +619,8 @@ MESSAGE("\n"); } - /* - * FIXME: The 1 is just here until we implement rpcrt4 - * stub/proxy handling. Until then it helps IShield - * v6 to work. - */ - if (1 || (tattr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) + if (tattr->wTypeFlags & (TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL)) { - if (!(tattr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) { - FIXME("Registering non-oleautomation interface!\n"); - } - /* register interface<->typelib coupling */ get_interface_key( &tattr->guid, keyName ); if (RegCreateKeyExW(HKEY_CLASSES_ROOT, keyName, 0, NULL, 0, @@ -863,7 +856,7 @@ { const ITypeLib2Vtbl *lpVtbl; const ITypeCompVtbl *lpVtblTypeComp; - ULONG ref; + LONG ref; TLIBATTR LibAttr; /* guid,lcid,syskind,version,flags */ /* strings can be stored in tlb as multibyte strings BUT they are *always* @@ -975,7 +968,7 @@ { const ITypeInfo2Vtbl *lpVtbl; const ITypeCompVtbl *lpVtblTypeComp; - ULONG ref; + LONG ref; TYPEATTR TypeAttr ; /* _lots_ of type information. */ ITypeLibImpl * pTypeLib; /* back pointer to typelib */ int index; /* index in this typelib; */ @@ -1070,14 +1063,14 @@ } } -void dump_ELEMDESC(ELEMDESC *edesc) { +static void dump_ELEMDESC(ELEMDESC *edesc) { char buf[200]; dump_TypeDesc(&edesc->tdesc,buf); MESSAGE("\t\ttdesc.vartype %d (%s)\n",edesc->tdesc.vt,buf); MESSAGE("\t\tu.parmadesc.flags %x\n",edesc->u.paramdesc.wParamFlags); MESSAGE("\t\tu.parmadesc.lpex %p\n",edesc->u.paramdesc.pparamdescex); } -void dump_FUNCDESC(FUNCDESC *funcdesc) { +static void dump_FUNCDESC(FUNCDESC *funcdesc) { int i; MESSAGE("memid is %08lx\n",funcdesc->memid); for (i=0;i<funcdesc->cParams;i++) { @@ -1116,10 +1109,6 @@ dump_ELEMDESC(&funcdesc->elemdescFunc); } -void dump_IDLDESC(IDLDESC *idl) { - MESSAGE("\t\twIdlflags: %d\n",idl->wIDLFlags); -} - static const char * typekind_desc[] = { "TKIND_ENUM", @@ -1133,27 +1122,6 @@ "TKIND_MAX" }; -void dump_TYPEATTR(TYPEATTR *tattr) { - char buf[200]; - MESSAGE("\tguid: %s\n",debugstr_guid(&tattr->guid)); - MESSAGE("\tlcid: %ld\n",tattr->lcid); - MESSAGE("\tmemidConstructor: %ld\n",tattr->memidConstructor); - MESSAGE("\tmemidDestructor: %ld\n",tattr->memidDestructor); - MESSAGE("\tschema: %s\n",debugstr_w(tattr->lpstrSchema)); - MESSAGE("\tsizeInstance: %ld\n",tattr->cbSizeInstance); - MESSAGE("\tkind:%s\n", typekind_desc[tattr->typekind]); - MESSAGE("\tcFuncs: %d\n", tattr->cFuncs); - MESSAGE("\tcVars: %d\n", tattr->cVars); - MESSAGE("\tcImplTypes: %d\n", tattr->cImplTypes); - MESSAGE("\tcbSizeVft: %d\n", tattr->cbSizeVft); - MESSAGE("\tcbAlignment: %d\n", tattr->cbAlignment); - MESSAGE("\twTypeFlags: %d\n", tattr->wTypeFlags); - MESSAGE("\tVernum: %d.%d\n", tattr->wMajorVerNum,tattr->wMinorVerNum); - dump_TypeDesc(&tattr->tdescAlias,buf); - MESSAGE("\ttypedesc: %s\n", buf); - dump_IDLDESC(&tattr->idldescType); -} - static void dump_TLBFuncDescOne(TLBFuncDesc * pfd) { int i; @@ -1305,7 +1273,7 @@ dump_TLBImplType(pty->impltypelist); } -void dump_VARDESC(VARDESC *v) +static void dump_VARDESC(VARDESC *v) { MESSAGE("memid %ld\n",v->memid); MESSAGE("lpstrSchema %s\n",debugstr_w(v->lpstrSchema)); @@ -1397,7 +1365,7 @@ * Functions for reading MSFT typelibs (those created by CreateTypeLib2) */ /* read function */ -DWORD MSFT_Read(void *buffer, DWORD count, TLBContext *pcx, long where ) +static DWORD MSFT_Read(void *buffer, DWORD count, TLBContext *pcx, long where ) { TRACE_(typelib)("pos=0x%08x len=0x%08lx 0x%08x 0x%08x 0x%08lx\n", pcx->pos, count, pcx->oStart, pcx->length, where); @@ -1454,7 +1422,7 @@ TRACE_(typelib)("%s\n", debugstr_guid(pGuid)); } -BSTR MSFT_ReadName( TLBContext *pcx, int offset) +static BSTR MSFT_ReadName( TLBContext *pcx, int offset) { char * name; MSFT_NameIntro niName; @@ -1489,7 +1457,7 @@ return bstrName; } -BSTR MSFT_ReadString( TLBContext *pcx, int offset) +static BSTR MSFT_ReadString( TLBContext *pcx, int offset) { char * string; INT16 length; @@ -1997,8 +1965,11 @@ if(pImpLib){ (*ppRefType)->reference=offset; (*ppRefType)->pImpTLInfo = pImpLib; - MSFT_ReadGuid(&(*ppRefType)->guid, impinfo.oGuid, pcx); - (*ppRefType)->index = TLB_REF_USE_GUID; + if(impinfo.flags & MSFT_IMPINFO_OFFSET_IS_GUID) { + MSFT_ReadGuid(&(*ppRefType)->guid, impinfo.oGuid, pcx); + (*ppRefType)->index = TLB_REF_USE_GUID; + } else + (*ppRefType)->index = impinfo.oGuid; }else{ ERR("Cannot find a reference\n"); (*ppRefType)->reference=-1; @@ -2038,7 +2009,7 @@ /* * process a typeinfo record */ -ITypeInfoImpl * MSFT_DoTypeInfo( +static ITypeInfoImpl * MSFT_DoTypeInfo( TLBContext *pcx, int count, ITypeLibImpl * pLibInfo) @@ -4617,6 +4588,10 @@ memcpy(argpos, &V_I4(arg), 4); hres = S_OK; break; + case VT_BYREF|VT_I4: + memcpy(argpos, V_I4REF(arg), 4); + hres = S_OK; + break; default: FIXME("vt 0x%x -> TKIND_ENUM unhandled.\n",V_VT(arg)); hres = E_FAIL; @@ -4697,6 +4672,123 @@ return E_FAIL; } +static HRESULT userdefined_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYPE *vt) +{ + HRESULT hr = S_OK; + ITypeInfo *tinfo2 = NULL; + TYPEATTR *tattr = NULL; + + hr = ITypeInfo_GetRefTypeInfo(tinfo, tdesc->u.hreftype, &tinfo2); + if (hr) + { + ERR("Could not get typeinfo of hreftype %lx for VT_USERDEFINED, " + "hr = 0x%08lx\n", + tdesc->u.hreftype, hr); + return hr; + } + hr = ITypeInfo_GetTypeAttr(tinfo2, &tattr); + if (hr) + { + ERR("ITypeInfo_GetTypeAttr failed, hr = 0x%08lx\n", hr); + ITypeInfo_Release(tinfo2); + return hr; + } + + switch (tattr->typekind) + { + case TKIND_ENUM: + *vt |= VT_INT; + break; + + case TKIND_ALIAS: + tdesc = &tattr->tdescAlias; + hr = typedescvt_to_variantvt(tinfo2, &tattr->tdescAlias, vt); + break; + + case TKIND_INTERFACE: + if (IsEqualIID(&IID_IDispatch, &tattr->guid)) + *vt |= VT_DISPATCH; + else + *vt |= VT_UNKNOWN; + break; + + case TKIND_DISPATCH: + *vt |= VT_DISPATCH; + break; + + case TKIND_RECORD: + FIXME("TKIND_RECORD unhandled.\n"); + hr = E_NOTIMPL; + break; + + case TKIND_UNION: + FIXME("TKIND_RECORD unhandled.\n"); + hr = E_NOTIMPL; + break; + + default: + FIXME("TKIND %d unhandled.\n",tattr->typekind); + hr = E_NOTIMPL; + break; + } + ITypeInfo_ReleaseTypeAttr(tinfo2, tattr); + ITypeInfo_Release(tinfo2); + return hr; +} + +static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYPE *vt) +{ + HRESULT hr = S_OK; + + /* enforce only one level of pointer indirection */ + if (!(*vt & VT_BYREF) && (tdesc->vt == VT_PTR)) + { + tdesc = tdesc->u.lptdesc; + + /* munch VT_PTR -> VT_USERDEFINED(interface) into VT_UNKNOWN or + * VT_DISPATCH and VT_PTR -> VT_PTR -> VT_USERDEFINED(interface) into + * VT_BYREF|VT_DISPATCH or VT_BYREF|VT_UNKNOWN */ + if ((tdesc->vt == VT_USERDEFINED) || + ((tdesc->vt == VT_PTR) && (tdesc->u.lptdesc->vt == VT_USERDEFINED))) + { + VARTYPE vt_userdefined = 0; + TYPEDESC *tdesc_userdefined = tdesc; + if (tdesc->vt == VT_PTR) + { + vt_userdefined = VT_BYREF; + tdesc_userdefined = tdesc->u.lptdesc; + } + hr = userdefined_to_variantvt(tinfo, tdesc_userdefined, &vt_userdefined); + if ((hr == S_OK) && + (((vt_userdefined & VT_TYPEMASK) == VT_UNKNOWN) || + ((vt_userdefined & VT_TYPEMASK) == VT_DISPATCH))) + { + *vt |= vt_userdefined; + return S_OK; + } + } + *vt = VT_BYREF; + } + + switch (tdesc->vt) + { + case VT_HRESULT: + *vt |= VT_ERROR; + break; + case VT_USERDEFINED: + hr = userdefined_to_variantvt(tinfo, tdesc, vt); + break; + case VT_PTR: + ERR("cannot convert VT_PTR into variant VT\n"); + hr = E_FAIL; + break; + default: + *vt |= tdesc->vt; + break; + } + return hr; +} + /*********************************************************************** * DispCallFunc (OLEAUT32.@) */ @@ -4772,6 +4864,11 @@ hres = ITypeInfo2_GetFuncDesc(iface, func_index, &func_desc); if(FAILED(hres)) return hres; + if (TRACE_ON(ole)) + { + TRACE("invoking:\n"); + dump_FUNCDESC(func_desc); + } switch (func_desc->funckind) { case FUNC_PUREVIRTUAL: @@ -4873,76 +4970,36 @@ args ); - if (pVarResult && (dwFlags & (DISPATCH_PROPERTYGET))) { - args2pos = 0; - for (i = 0; i < func_desc->cParams - pDispParams->cArgs; i++) { - ELEMDESC *elemdesc = &(func_desc->lprgelemdescParam[i+pDispParams->cArgs]); - TYPEDESC *tdesc = &(elemdesc->tdesc); - int arglen = _argsize(tdesc->vt); - TYPEDESC i4_tdesc; - i4_tdesc.vt = VT_I4; - - /* If we are a pointer to a variant, we are done already */ - if ((tdesc->vt==VT_PTR)&&(tdesc->u.lptdesc->vt==VT_VARIANT)) - continue; - - if (tdesc->vt == VT_PTR) { - tdesc = tdesc->u.lptdesc; - arglen = _argsize(tdesc->vt); - } - - VariantInit(pVarResult); - memcpy(&V_INT(pVarResult),&args2[args2pos],arglen*sizeof(DWORD)); - - if (tdesc->vt == VT_USERDEFINED) { - ITypeInfo *tinfo2; - TYPEATTR *tattr; - - hres = ITypeInfo_GetRefTypeInfo(iface,tdesc->u.hreftype,&tinfo2); - if (FAILED(hres)) { - FIXME("Could not get typeinfo of hreftype %lx for VT_USERDEFINED, while coercing. Copying 4 byte.\n",tdesc->u.hreftype); - goto func_fail; - } - ITypeInfo_GetTypeAttr(tinfo2,&tattr); - switch (tattr->typekind) { - case TKIND_ENUM: - /* force the return type to be VT_I4 */ - tdesc = &i4_tdesc; + if (pVarResult) { + for (i = 0; i < func_desc->cParams; i++) { + USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; + if (wParamFlags & PARAMFLAG_FRETVAL) { + ELEMDESC *elemdesc = &func_desc->lprgelemdescParam[i]; + TYPEDESC *tdesc = &elemdesc->tdesc; + VARIANTARG varresult; + V_VT(&varresult) = 0; + hres = typedescvt_to_variantvt((ITypeInfo *)iface, tdesc, &V_VT(&varresult)); + if (hres) break; - case TKIND_ALIAS: - TRACE("TKIND_ALIAS to vt 0x%x\n",tattr->tdescAlias.vt); - tdesc = &(tattr->tdescAlias); - break; - - case TKIND_INTERFACE: - FIXME("TKIND_INTERFACE unhandled.\n"); - break; - case TKIND_DISPATCH: - FIXME("TKIND_DISPATCH unhandled.\n"); - break; - case TKIND_RECORD: - FIXME("TKIND_RECORD unhandled.\n"); - break; - default: - FIXME("TKIND %d unhandled.\n",tattr->typekind); - break; - } - ITypeInfo_Release(tinfo2); + /* FIXME: this is really messy - we should keep the + * args in VARIANTARGs rather than a DWORD array */ + memcpy(&V_UI4(&varresult), &args[i+1], sizeof(DWORD)); + if (TRACE_ON(ole)) + { + TRACE("varresult: "); + dump_Variant(&varresult); + } + hres = VariantCopyInd(pVarResult, &varresult); + break; } - V_VT(pVarResult) = tdesc->vt; - - /* HACK: VB5 likes this. - * I do not know why. There is 1 example in MSDN which uses - * this which appears broken (mixes int vals and - * IDispatch*.). - */ - if ((tdesc->vt == VT_PTR) && (dwFlags & DISPATCH_METHOD)) - V_VT(pVarResult) = VT_DISPATCH; - TRACE("storing into variant:\n"); - dump_Variant(pVarResult); - args2pos += arglen; } } + + if ((func_desc->elemdescFunc.tdesc.vt == VT_HRESULT) && FAILED(res)) { + WARN("invoked function failed with error 0x%08lx\n", res); + hres = DISP_E_EXCEPTION; + if (pExcepInfo) pExcepInfo->scode = res; + } func_fail: HeapFree(GetProcessHeap(), 0, rgvarg); HeapFree(GetProcessHeap(),0,args2); _____ Modified: trunk/reactos/lib/oleaut32/typelib.h --- trunk/reactos/lib/oleaut32/typelib.h 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/typelib.h 2005-08-12 17:30:09 UTC (rev 17333) @@ -157,18 +157,20 @@ /* else it is zero? */ INT res18; /* always? 0 */ /*060*/ INT res19; /* always? -1 */ - } MSFT_TypeInfoBase; +} MSFT_TypeInfoBase; /* layout of an entry with information on imported types */ typedef struct tagMSFT_ImpInfo { - INT res0; /* bits 0 - 15: count */ + INT flags; /* bits 0 - 15: count */ /* bit 16: if set oGuid is an offset to Guid */ /* if clear oGuid is a typeinfo index in the specified typelib */ /* bits 24 - 31: TKIND of reference */ INT oImpFile; /* offset in the Import File table */ INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of res0) */ - } MSFT_ImpInfo; +} MSFT_ImpInfo; +#define MSFT_IMPINFO_OFFSET_IS_GUID 0x00010000 + /* function description data */ typedef struct { /* INT recsize; record size including some xtra stuff */ _____ Modified: trunk/reactos/lib/oleaut32/typelib16.c --- trunk/reactos/lib/oleaut32/typelib16.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/typelib16.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -80,7 +80,7 @@ { char xguid[80]; char typelibkey[100],pathname[260]; - DWORD plen; + LONG plen; TRACE("\n"); _____ Modified: trunk/reactos/lib/oleaut32/typelib2.c --- trunk/reactos/lib/oleaut32/typelib2.c 2005-08-12 17:19:46 UTC (rev 17332) +++ trunk/reactos/lib/oleaut32/typelib2.c 2005-08-12 17:30:09 UTC (rev 17333) @@ -148,7 +148,7 @@ const ICreateTypeLib2Vtbl *lpVtbl; const ITypeLib2Vtbl *lpVtblTypeLib2; [truncated at 1000 lines; 236 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17332: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Robert Shearman <rob(a)codeweavers.com> - Marshal return value from IRemUnknown_RemQueryInterface. - We should be starting with 1 reference. - IRpcStubBuffer_Disconnect can be called more than once. - Silence now noisy error messages caused by changes in the way we call ipid_to_stubmanager. Move the error message to the one place it is needed. - By-pass the RPC runtime if possible when calling an STA by posting a message directly to the apartment window for it to process. Fixes a deadlock in InstallShield caused by having to create a thread when freeing an object that comes from an STA apartment. Added tests that fail without this fix. - Hack around broken state management so InstallShield works. - Delete the stub manager outside of the apartment critical section because the deletion may require the object to re-enter the apartment. - Always query for the correct stub interface, otherwise we will be pointing to the completely wrong object when a proxy does a queryinterface. - Remove assumption that the stub buffer will handle the lifetime of the object. Alex Villacis Lasso <a_villacis(a)palosanto.com> - Initialize RegisteredClass properly in CoRegisterClassObject to prevent crash in CoRevokeClassObject when accessing (uninitialized) pMarshalledData. Mike McCormack <mike(a)codeweavers.com> - Fix gcc 4.0 -Wpointer-sign warnings. Vitaly Lipatov <lav(a)etersoft.ru> - Added some documentation. Stefan Huehner <stefan(a)huehner.org> - Fix some missing-declarations warnings. Marcus Meissner <meissner(a)suse.de> - 16bit interfaces are cdecl, so drop the WINAPI. - 16bit COM interfaces are cdecl, not WINAPI. - OleInitializeWOW gets 2 arguments. - Added OleSetMenuDescriptor16 stub. Marcus Meissner <marcus(a)jet.franken.de> - Implemented IsValidInterface16, CoMemAlloc. Added debug to HGLOBALLockBytes16_QueryInterface. Modified: trunk/reactos/lib/ole32/antimoniker.c Modified: trunk/reactos/lib/ole32/bindctx.c Modified: trunk/reactos/lib/ole32/clipboard.c Modified: trunk/reactos/lib/ole32/compobj.c Modified: trunk/reactos/lib/ole32/compobj.spec Modified: trunk/reactos/lib/ole32/compobj_private.h Modified: trunk/reactos/lib/ole32/compositemoniker.c Modified: trunk/reactos/lib/ole32/datacache.c Modified: trunk/reactos/lib/ole32/defaulthandler.c Modified: trunk/reactos/lib/ole32/errorinfo.c Modified: trunk/reactos/lib/ole32/filemoniker.c Modified: trunk/reactos/lib/ole32/ftmarshal.c Modified: trunk/reactos/lib/ole32/hglobalstream.c Modified: trunk/reactos/lib/ole32/ifs.c Modified: trunk/reactos/lib/ole32/ifs.h Modified: trunk/reactos/lib/ole32/itemmoniker.c Modified: trunk/reactos/lib/ole32/marshal.c Modified: trunk/reactos/lib/ole32/memlockbytes.c Modified: trunk/reactos/lib/ole32/memlockbytes16.c Modified: trunk/reactos/lib/ole32/moniker.c Modified: trunk/reactos/lib/ole32/ole16.c Modified: trunk/reactos/lib/ole32/ole2.c Modified: trunk/reactos/lib/ole32/ole2.spec Modified: trunk/reactos/lib/ole32/ole2_16.c Modified: trunk/reactos/lib/ole32/ole2conv.spec Modified: trunk/reactos/lib/ole32/ole2nls.spec Modified: trunk/reactos/lib/ole32/ole2prox.spec Modified: trunk/reactos/lib/ole32/ole2thk.spec Modified: trunk/reactos/lib/ole32/ole32.spec Modified: trunk/reactos/lib/ole32/oleobj.c Modified: trunk/reactos/lib/ole32/oleproxy.c Modified: trunk/reactos/lib/ole32/rpc.c Modified: trunk/reactos/lib/ole32/stg_prop.c Modified: trunk/reactos/lib/ole32/storage.c Modified: trunk/reactos/lib/ole32/storage.spec Modified: trunk/reactos/lib/ole32/storage32.c Modified: trunk/reactos/lib/ole32/storage32.h Modified: trunk/reactos/lib/ole32/stubmanager.c _____ Modified: trunk/reactos/lib/ole32/antimoniker.c --- trunk/reactos/lib/ole32/antimoniker.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/antimoniker.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -49,7 +49,7 @@ */ const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ } AntiMonikerImpl; _____ Modified: trunk/reactos/lib/ole32/bindctx.c --- trunk/reactos/lib/ole32/bindctx.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/bindctx.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -52,7 +52,7 @@ const IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ BindCtxObject* bindCtxTable; /* this is a table in which all bounded objects are stored*/ DWORD bindCtxTableLastIndex; /* first free index in the table */ _____ Modified: trunk/reactos/lib/ole32/clipboard.c --- trunk/reactos/lib/ole32/clipboard.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/clipboard.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -122,7 +122,7 @@ /* * Reference count of this object */ - ULONG ref; + LONG ref; }; typedef struct OLEClipbrd OLEClipbrd; @@ -145,7 +145,7 @@ /* * Reference count of this object */ - DWORD ref; + LONG ref; /* * IUnknown implementation of the parent data object. _____ Modified: trunk/reactos/lib/ole32/compobj.c --- trunk/reactos/lib/ole32/compobj.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/compobj.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -1403,6 +1403,8 @@ newClass->classIdentifier = *rclsid; newClass->runContext = dwClsContext; newClass->connectFlags = flags; + newClass->pMarshaledData = NULL; + /* * Use the address of the chain node as the cookie since we are sure it's * unique. FIXME: not on 64-bit platforms. _____ Modified: trunk/reactos/lib/ole32/compobj.spec --- trunk/reactos/lib/ole32/compobj.spec 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/compobj.spec 2005-08-12 17:19:46 UTC (rev 17332) @@ -1,218 +1,218 @@ -1 pascal CoBuildVersion() CoBuildVersion -2 pascal CoInitialize(long) CoInitialize16 -3 pascal CoUninitialize() CoUninitialize16 -4 pascal CoGetMalloc(long ptr) CoGetMalloc16 -5 pascal CoRegisterClassObject(ptr ptr long long ptr) CoRegisterClassObject16 -6 pascal CoRevokeClassObject(long) CoRevokeClassObject16 -7 pascal CoGetClassObject(ptr long ptr ptr ptr) CoGetClassObject -8 stub COMARSHALINTERFACE -9 stub COUNMARSHALINTERFACE -10 stub COLOADLIBRARY -11 stub COFREELIBRARY -12 stub COFREEALLLIBRARIES -13 pascal CoCreateInstance(ptr ptr long ptr ptr) CoCreateInstance -14 stub STRINGFROMIID -15 pascal CoDisconnectObject(ptr long) CoDisconnectObject -16 stub CORELEASEMARSHALDATA -17 pascal -ret16 CoFreeUnusedLibraries() CoFreeUnusedLibraries -18 pascal -ret16 IsEqualGUID(ptr ptr) IsEqualGUID16 -19 pascal StringFromCLSID(ptr ptr) StringFromCLSID16 -20 pascal CLSIDFromString(str ptr) CLSIDFromString16 -21 stub ISVALIDPTRIN -22 stub ISVALIDPTROUT -23 stub ISVALIDINTERFACE -24 stub ISVALIDIID -25 stub RESULTFROMSCODE -26 stub GETSCODE -27 pascal CoRegisterMessageFilter(ptr ptr) CoRegisterMessageFilter16 -28 stub COISHANDLERCONNECTED -29 stub SHRADDREF -30 pascal -ret16 CoFileTimeToDosDateTime(ptr ptr ptr) CoFileTimeToDosDateTime16 -31 pascal -ret16 CoDosDateTimeToFileTime(word word ptr) CoDosDateTimeToFileTime16 -32 stub COMARSHALHRESULT -33 stub COUNMARSHALHRESULT -34 pascal CoGetCurrentProcess() CoGetCurrentProcess -35 stub SHRCREATE -36 stub COISOLE1CLASS -37 stub _GUID_NULL -38 stub _IID_IUNKNOWN -39 stub _IID_ICLASSFACTORY -40 stub _IID_IMALLOC -41 stub _IID_IMARSHAL -42 stub _IID_IRPCCHANNEL -43 stub _IID_IRPCSTUB -44 stub _IID_ISTUBMANAGER -45 stub _IID_IRPCPROXY -46 stub _IID_IPROXYMANAGER -47 stub _IID_IPSFACTORY -48 stub _IID_ILOCKBYTES -49 stub _IID_ISTORAGE -50 stub _IID_ISTREAM -51 stub _IID_IENUMSTATSTG -52 stub _IID_IBINDCTX -53 stub _IID_IMONIKER -54 stub _IID_IRUNNINGOBJECTTABLE -55 stub _IID_IINTERNALMONIKER -56 stub _IID_IROOTSTORAGE -57 stub _IID_IDFRESERVED1 -58 stub _IID_IDFRESERVED2 -59 stub _IID_IDFRESERVED3 -60 stub _IID_IMESSAGEFILTER -61 pascal CLSIDFromProgID(str ptr) CLSIDFromProgID16 -62 pascal ProgIDFromCLSID(ptr ptr) ProgIDFromCLSID16 -63 pascal CoLockObjectExternal(segptr word word) CoLockObjectExternal16 -64 stub _CLSID_STDMARSHAL -65 stub COGETTREATASCLASS -66 stub COTREATASCLASS -67 stub COGETSTANDARDMARSHAL -68 stub PROPAGATERESULT -69 stub IIDFROMSTRING -70 stub _IID_ISTDMARSHALINFO -71 pascal CoCreateStandardMalloc(long ptr) CoCreateStandardMalloc16 -72 stub _IID_IEXTERNALCONNECTION -73 stub COCREATEGUID -75 stub FNASSERT -76 pascal StringFromGUID2(ptr ptr word) StringFromGUID2 -77 stub COGETCLASSEXT -78 stub OLE1CLASSFROMCLSID2 -79 stub CLSIDFROMOLE1CLASS -80 stub COOPENCLASSKEY -81 stub GUIDFROMSTRING -82 pascal CoFileTimeNow(ptr) CoFileTimeNow -83 stub REMALLOCOID -84 stub REMFREEOID -85 stub REMCREATEREMOTEHANDLER -86 stub REMCONNECTTOOBJECT -87 stub REMGETINFOFORCID -88 stub LRPCCALL -89 stub LRPCDISPATCH -90 stub LRPCREGISTERMONITOR -91 stub LRPCREVOKEMONITOR -92 stub LRPCGETTHREADWINDOW -93 stub TIMERCALLBACKPROC -94 pascal LookupETask(ptr ptr) LookupETask16 -95 pascal -ret16 SetETask(word ptr) SetETask16 -96 stub LRPCFREEMONITORDATA -97 stub REMLOOKUPSHUNK -98 stub SHRGETSIZE -99 stub CALLTHKMGRUNINITIALIZE -100 stub ??0CARRAYFVALUE@@REC@KI@Z -101 stub ??1CARRAYFVALUE@@REC@XZ -102 stub ?ASSERTVALID@CARRAYFVALUE@@RFCXXZ -103 stub ?FREEEXTRA@CARRAYFVALUE@@RECXXZ -104 stub ?_GETAT@CARRAYFVALUE@@RFCPEXH@Z -105 stub ?GETSIZE@CARRAYFVALUE@@RFCHXZ -106 stub ?REMOVEALL@CARRAYFVALUE@@RECXXZ -107 stub SHRDESTROY -108 stub ?INDEXOF@CARRAYFVALUE@@RECHPEXII@Z -109 stub ?INSERTAT@CARRAYFVALUE@@RECHHPEXH@Z -110 stub COSETSTATE -111 stub ?REMOVEAT@CARRAYFVALUE@@RECXHH@Z -112 stub ?SETAT@CARRAYFVALUE@@RECXHPEX@Z -113 stub ?SETATGROW@CARRAYFVALUE@@RECHHPEX@Z -114 stub ?SETSIZE@CARRAYFVALUE@@RECHHH@Z -115 pascal CoGetState(ptr) CoGetState16 -116 pascal DllEntryPoint(long word word word long word) COMPOBJ_DllEntryPoint -117 stub ?RELEASE@CSTDMALLOC@@VEAKXZ -118 stub ?ALLOC@CSTDMALLOC@@VEAPEXK@Z -119 stub SHRRELEASE -120 stub ?GETASSOCAT@CMAPKEYTOVALUE@@BFCPEUCASSOC@1@PEXIAEI@Z -121 stub ?SETASSOCKEY@CMAPKEYTOVALUE@@BFCHPEUCASSOC@1@PEXI@Z -122 stub ??1CMAPKEYTOVALUE@@REC@XZ -123 stub ?GETASSOCKEYPTR@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEPEXPEI@Z -124 stub ?NEWASSOC@CMAPKEYTOVALUE@@BECPEUCASSOC@1@IPEXI0@Z -125 stub ?SIZEASSOC@CMAPKEYTOVALUE@@BFCIXZ -126 stub ?FREEASSOC@CMAPKEYTOVALUE@@BECXPEUCASSOC@1@@Z -127 stub ?GETSTARTPOSITION@CMAPKEYTOVALUE@@RFCPEXXZ -128 stub ?GETNEXTASSOC@CMAPKEYTOVALUE@@RFCXPEPEXPEXPEI1@Z -129 stub ?COMPAREASSOCKEY@CMAPKEYTOVALUE@@BFCHPEUCASSOC@1@PEXI@Z -130 stub ?REMOVEHKEY@CMAPKEYTOVALUE@@RECHK@Z -131 stub ?GETHKEY@CMAPKEYTOVALUE@@RFCKPEXI@Z -132 stub ?GETCOUNT@CMAPKEYTOVALUE@@RFCHXZ -133 stub ?LOOKUP@CMAPKEYTOVALUE@@RFCHPEXI0@Z -134 stub ?GETASSOCVALUE@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEX@Z -135 stub ?REMOVEKEY@CMAPKEYTOVALUE@@RECHPEXI@Z -136 stub ?REMOVEALL@CMAPKEYTOVALUE@@RECXXZ -137 stub SHRALLOC -138 stub ?FREEASSOCKEY@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@@Z -139 stub ?SETAT@CMAPKEYTOVALUE@@RECHPEXI0@Z -140 stub ?LOOKUPHKEY@CMAPKEYTOVALUE@@RFCHKPEX@Z -141 stub ?ASSERTVALID@CMAPKEYTOVALUE@@RFCXXZ -142 stub ?SETASSOCVALUE@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEX@Z -143 stub ?SETATHKEY@CMAPKEYTOVALUE@@RECHKPEX@Z -144 stub ??0CMAPKEYTOVALUE@@REC@KIIHP7CIPEXI@ZI@Z -145 stub ?INITHASHTABLE@CMAPKEYTOVALUE@@BECHXZ -146 stub ?GETASSOCVALUEPTR@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEPEX@Z -147 stub ?LOOKUPADD@CMAPKEYTOVALUE@@RFCHPEXI0@Z -148 stub MKVDEFAULTHASHKEY -149 stub DELETE16 -150 stub COMEMCTXOF -151 stub COMEMALLOC -152 stub COMEMFREE -153 stub SHRREALLOC -154 stub ___EXPORTEDSTUB -155 stub LRPCREGISTERWIN32SMONITOR -156 stub MYREMGETINFOFORCID -157 stub SHRFREE -158 stub OPNEW16 -159 stub ADDCOINFO -160 stub CORUNMODALLOOP -161 stub COHANDLEINCOMINGCALL -162 stub COSETACKSTATE -163 stub SHRDIDALLOC -164 stub ?GETAT@CARRAYFVALUE@@RFCPEXH@Z -165 stub ?GETUPPERBOUND@CARRAYFVALUE@@RFCHXZ -166 stub OPDELETE16 -167 stub ?GETSIZEVALUE@CARRAYFVALUE@@RFCHXZ -168 stub ?PROXY1632ADDREF@@ZAKPEVCPROXY1632@@@Z -# FIXME: 169 is a duplicate of 97 -169 stub REMLOOKUPSHUNK_dup -170 stub ?ISEMPTY@CMAPKEYTOVALUE@@RFCHXZ -171 stub ?FREE@CSTDMALLOC@@VEAXPEX@Z -172 stub CALLTHKMGRINITIALIZE -173 stub ?REALLOC@CSTDMALLOC@@VEAPEXPEXK@Z -174 stub ?SM16RHQI@@ZAPEXPEVCSM16RELEASEHANDLER@@AFUGUID@@PEPEX@Z -175 stub ?PROXY1632METHOD10@@ZAKPEVCPROXY1632@@@Z -# FIXME: 176 is a duplicate of 154 -176 stub ___EXPORTEDSTUB_dup -177 stub ?PROXY1632METHOD20@@ZAKPEVCPROXY1632@@@Z -178 stub ?PROXY1632METHOD11@@ZAKPEVCPROXY1632@@@Z -179 stub ?PROXY1632METHOD30@@ZAKPEVCPROXY1632@@@Z -180 stub ?PROXY1632METHOD21@@ZAKPEVCPROXY1632@@@Z -181 stub ?PROXY1632METHOD12@@ZAKPEVCPROXY1632@@@Z -182 stub ?PROXY1632METHOD31@@ZAKPEVCPROXY1632@@@Z -183 stub ?PROXY1632METHOD22@@ZAKPEVCPROXY1632@@@Z -184 stub ?PROXY1632METHOD13@@ZAKPEVCPROXY1632@@@Z -185 stub ?GETSIZE@CSTDMALLOC@@VEAKPEX@Z -186 stub ?PROXY1632METHOD23@@ZAKPEVCPROXY1632@@@Z -187 stub ?PROXY1632METHOD14@@ZAKPEVCPROXY1632@@@Z -188 stub ?PROXY1632METHOD24@@ZAKPEVCPROXY1632@@@Z -189 stub ?PROXY1632METHOD15@@ZAKPEVCPROXY1632@@@Z -190 stub ?PROXY1632METHOD25@@ZAKPEVCPROXY1632@@@Z -191 stub ?PROXY1632METHOD16@@ZAKPEVCPROXY1632@@@Z -192 stub ?PROXY1632METHOD26@@ZAKPEVCPROXY1632@@@Z -193 stub ?PROXY1632METHOD17@@ZAKPEVCPROXY1632@@@Z -194 stub ?PROXY1632METHOD27@@ZAKPEVCPROXY1632@@@Z -195 stub ?PROXY1632METHOD18@@ZAKPEVCPROXY1632@@@Z -196 stub ?PROXY1632METHOD28@@ZAKPEVCPROXY1632@@@Z -197 stub ?ADDREF@CSTDMALLOC@@VEAKXZ -198 stub ?PROXY1632METHOD19@@ZAKPEVCPROXY1632@@@Z -199 stub ?PROXY1632METHOD29@@ZAKPEVCPROXY1632@@@Z -200 stub CALL32INITIALIZE -201 pascal CALLOBJECTINWOW(ptr ptr) CallObjectInWOW -203 stub CALLOBJECTINWOWCHECKINIT -204 stub CALLOBJECTINWOWCHECKTHKMGR -205 stub CONVERTHR1632 -206 stub CONVERTHR3216 -207 stub ADDAPPCOMPATFLAG - -# WINE internal relays (for Win16 interfaces) -500 cdecl IMalloc16_QueryInterface(ptr ptr ptr) IMalloc16_fnQueryInterface -501 cdecl IMalloc16_AddRef(ptr) IMalloc16_fnAddRef -502 cdecl IMalloc16_Release(ptr) IMalloc16_fnRelease -503 cdecl IMalloc16_Alloc(ptr long) IMalloc16_fnAlloc -504 cdecl IMalloc16_Realloc(ptr segptr long) IMalloc16_fnRealloc -505 cdecl IMalloc16_Free(ptr segptr) IMalloc16_fnFree -506 cdecl IMalloc16_GetSize(ptr segptr) IMalloc16_fnGetSize -507 cdecl IMalloc16_DidAlloc(ptr segptr) IMalloc16_fnDidAlloc -508 cdecl IMalloc16_HeapMinimize(ptr) IMalloc16_fnHeapMinimize +1 pascal CoBuildVersion() CoBuildVersion +2 pascal CoInitialize(long) CoInitialize16 +3 pascal CoUninitialize() CoUninitialize16 +4 pascal CoGetMalloc(long ptr) CoGetMalloc16 +5 pascal CoRegisterClassObject(ptr ptr long long ptr) CoRegisterClassObject16 +6 pascal CoRevokeClassObject(long) CoRevokeClassObject16 +7 pascal CoGetClassObject(ptr long ptr ptr ptr) CoGetClassObject +8 stub COMARSHALINTERFACE +9 stub COUNMARSHALINTERFACE +10 stub COLOADLIBRARY +11 stub COFREELIBRARY +12 stub COFREEALLLIBRARIES +13 pascal CoCreateInstance(ptr ptr long ptr ptr) CoCreateInstance +14 stub STRINGFROMIID +15 pascal CoDisconnectObject(ptr long) CoDisconnectObject +16 stub CORELEASEMARSHALDATA +17 pascal -ret16 CoFreeUnusedLibraries() CoFreeUnusedLibraries +18 pascal -ret16 IsEqualGUID(ptr ptr) IsEqualGUID16 +19 pascal StringFromCLSID(ptr ptr) StringFromCLSID16 +20 pascal CLSIDFromString(str ptr) CLSIDFromString16 +21 stub ISVALIDPTRIN +22 stub ISVALIDPTROUT +23 pascal IsValidInterface(segptr) IsValidInterface16 +24 stub ISVALIDIID +25 stub RESULTFROMSCODE +26 stub GETSCODE +27 pascal CoRegisterMessageFilter(ptr ptr) CoRegisterMessageFilter16 +28 stub COISHANDLERCONNECTED +29 stub SHRADDREF +30 pascal -ret16 CoFileTimeToDosDateTime(ptr ptr ptr) CoFileTimeToDosDateTime16 +31 pascal -ret16 CoDosDateTimeToFileTime(word word ptr) CoDosDateTimeToFileTime16 +32 stub COMARSHALHRESULT +33 stub COUNMARSHALHRESULT +34 pascal CoGetCurrentProcess() CoGetCurrentProcess +35 stub SHRCREATE +36 stub COISOLE1CLASS +37 stub _GUID_NULL +38 stub _IID_IUNKNOWN +39 stub _IID_ICLASSFACTORY +40 stub _IID_IMALLOC +41 stub _IID_IMARSHAL +42 stub _IID_IRPCCHANNEL +43 stub _IID_IRPCSTUB +44 stub _IID_ISTUBMANAGER +45 stub _IID_IRPCPROXY +46 stub _IID_IPROXYMANAGER +47 stub _IID_IPSFACTORY +48 stub _IID_ILOCKBYTES +49 stub _IID_ISTORAGE +50 stub _IID_ISTREAM +51 stub _IID_IENUMSTATSTG +52 stub _IID_IBINDCTX +53 stub _IID_IMONIKER +54 stub _IID_IRUNNINGOBJECTTABLE +55 stub _IID_IINTERNALMONIKER +56 stub _IID_IROOTSTORAGE +57 stub _IID_IDFRESERVED1 +58 stub _IID_IDFRESERVED2 +59 stub _IID_IDFRESERVED3 +60 stub _IID_IMESSAGEFILTER +61 pascal CLSIDFromProgID(str ptr) CLSIDFromProgID16 +62 pascal ProgIDFromCLSID(ptr ptr) ProgIDFromCLSID16 +63 pascal CoLockObjectExternal(segptr word word) CoLockObjectExternal16 +64 stub _CLSID_STDMARSHAL +65 stub COGETTREATASCLASS +66 stub COTREATASCLASS +67 stub COGETSTANDARDMARSHAL +68 stub PROPAGATERESULT +69 stub IIDFROMSTRING +70 stub _IID_ISTDMARSHALINFO +71 pascal CoCreateStandardMalloc(long ptr) CoCreateStandardMalloc16 +72 stub _IID_IEXTERNALCONNECTION +73 stub COCREATEGUID +75 stub FNASSERT +76 pascal StringFromGUID2(ptr ptr word) StringFromGUID2 +77 stub COGETCLASSEXT +78 stub OLE1CLASSFROMCLSID2 +79 stub CLSIDFROMOLE1CLASS +80 stub COOPENCLASSKEY +81 stub GUIDFROMSTRING +82 pascal CoFileTimeNow(ptr) CoFileTimeNow +83 stub REMALLOCOID +84 stub REMFREEOID +85 stub REMCREATEREMOTEHANDLER +86 stub REMCONNECTTOOBJECT +87 stub REMGETINFOFORCID +88 stub LRPCCALL +89 stub LRPCDISPATCH +90 stub LRPCREGISTERMONITOR +91 stub LRPCREVOKEMONITOR +92 stub LRPCGETTHREADWINDOW +93 stub TIMERCALLBACKPROC +94 pascal LookupETask(ptr ptr) LookupETask16 +95 pascal -ret16 SetETask(word ptr) SetETask16 +96 stub LRPCFREEMONITORDATA +97 stub REMLOOKUPSHUNK +98 stub SHRGETSIZE +99 stub CALLTHKMGRUNINITIALIZE +100 stub ??0CARRAYFVALUE@@REC@KI@Z +101 stub ??1CARRAYFVALUE@@REC@XZ +102 stub ?ASSERTVALID@CARRAYFVALUE@@RFCXXZ +103 stub ?FREEEXTRA@CARRAYFVALUE@@RECXXZ +104 stub ?_GETAT@CARRAYFVALUE@@RFCPEXH@Z +105 stub ?GETSIZE@CARRAYFVALUE@@RFCHXZ +106 stub ?REMOVEALL@CARRAYFVALUE@@RECXXZ +107 stub SHRDESTROY +108 stub ?INDEXOF@CARRAYFVALUE@@RECHPEXII@Z +109 stub ?INSERTAT@CARRAYFVALUE@@RECHHPEXH@Z +110 stub COSETSTATE +111 stub ?REMOVEAT@CARRAYFVALUE@@RECXHH@Z +112 stub ?SETAT@CARRAYFVALUE@@RECXHPEX@Z +113 stub ?SETATGROW@CARRAYFVALUE@@RECHHPEX@Z +114 stub ?SETSIZE@CARRAYFVALUE@@RECHHH@Z +115 pascal CoGetState(ptr) CoGetState16 +116 pascal DllEntryPoint(long word word word long word) COMPOBJ_DllEntryPoint +117 stub ?RELEASE@CSTDMALLOC@@VEAKXZ +118 stub ?ALLOC@CSTDMALLOC@@VEAPEXK@Z +119 stub SHRRELEASE +120 stub ?GETASSOCAT@CMAPKEYTOVALUE@@BFCPEUCASSOC@1@PEXIAEI@Z +121 stub ?SETASSOCKEY@CMAPKEYTOVALUE@@BFCHPEUCASSOC@1@PEXI@Z +122 stub ??1CMAPKEYTOVALUE@@REC@XZ +123 stub ?GETASSOCKEYPTR@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEPEXPEI@Z +124 stub ?NEWASSOC@CMAPKEYTOVALUE@@BECPEUCASSOC@1@IPEXI0@Z +125 stub ?SIZEASSOC@CMAPKEYTOVALUE@@BFCIXZ +126 stub ?FREEASSOC@CMAPKEYTOVALUE@@BECXPEUCASSOC@1@@Z +127 stub ?GETSTARTPOSITION@CMAPKEYTOVALUE@@RFCPEXXZ +128 stub ?GETNEXTASSOC@CMAPKEYTOVALUE@@RFCXPEPEXPEXPEI1@Z +129 stub ?COMPAREASSOCKEY@CMAPKEYTOVALUE@@BFCHPEUCASSOC@1@PEXI@Z +130 stub ?REMOVEHKEY@CMAPKEYTOVALUE@@RECHK@Z +131 stub ?GETHKEY@CMAPKEYTOVALUE@@RFCKPEXI@Z +132 stub ?GETCOUNT@CMAPKEYTOVALUE@@RFCHXZ +133 stub ?LOOKUP@CMAPKEYTOVALUE@@RFCHPEXI0@Z +134 stub ?GETASSOCVALUE@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEX@Z +135 stub ?REMOVEKEY@CMAPKEYTOVALUE@@RECHPEXI@Z +136 stub ?REMOVEALL@CMAPKEYTOVALUE@@RECXXZ +137 stub SHRALLOC +138 stub ?FREEASSOCKEY@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@@Z +139 stub ?SETAT@CMAPKEYTOVALUE@@RECHPEXI0@Z +140 stub ?LOOKUPHKEY@CMAPKEYTOVALUE@@RFCHKPEX@Z +141 stub ?ASSERTVALID@CMAPKEYTOVALUE@@RFCXXZ +142 stub ?SETASSOCVALUE@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEX@Z +143 stub ?SETATHKEY@CMAPKEYTOVALUE@@RECHKPEX@Z +144 stub ??0CMAPKEYTOVALUE@@REC@KIIHP7CIPEXI@ZI@Z +145 stub ?INITHASHTABLE@CMAPKEYTOVALUE@@BECHXZ +146 stub ?GETASSOCVALUEPTR@CMAPKEYTOVALUE@@BFCXPEUCASSOC@1@PEPEX@Z +147 stub ?LOOKUPADD@CMAPKEYTOVALUE@@RFCHPEXI0@Z +148 stub MKVDEFAULTHASHKEY +149 stub DELETE16 +150 stub COMEMCTXOF +151 pascal CoMemAlloc(long long long) +152 stub COMEMFREE +153 stub SHRREALLOC +154 stub ___EXPORTEDSTUB +155 stub LRPCREGISTERWIN32SMONITOR +156 stub MYREMGETINFOFORCID +157 stub SHRFREE +158 stub OPNEW16 +159 stub ADDCOINFO +160 stub CORUNMODALLOOP +161 stub COHANDLEINCOMINGCALL +162 stub COSETACKSTATE +163 stub SHRDIDALLOC +164 stub ?GETAT@CARRAYFVALUE@@RFCPEXH@Z +165 stub ?GETUPPERBOUND@CARRAYFVALUE@@RFCHXZ +166 stub OPDELETE16 +167 stub ?GETSIZEVALUE@CARRAYFVALUE@@RFCHXZ +168 stub ?PROXY1632ADDREF@@ZAKPEVCPROXY1632@@@Z +# FIXME: 169 is a duplicate of 97 +169 stub REMLOOKUPSHUNK_dup +170 stub ?ISEMPTY@CMAPKEYTOVALUE@@RFCHXZ +171 stub ?FREE@CSTDMALLOC@@VEAXPEX@Z +172 stub CALLTHKMGRINITIALIZE +173 stub ?REALLOC@CSTDMALLOC@@VEAPEXPEXK@Z +174 stub ?SM16RHQI@@ZAPEXPEVCSM16RELEASEHANDLER@@AFUGUID@@PEPEX@Z +175 stub ?PROXY1632METHOD10@@ZAKPEVCPROXY1632@@@Z +# FIXME: 176 is a duplicate of 154 +176 stub ___EXPORTEDSTUB_dup +177 stub ?PROXY1632METHOD20@@ZAKPEVCPROXY1632@@@Z +178 stub ?PROXY1632METHOD11@@ZAKPEVCPROXY1632@@@Z +179 stub ?PROXY1632METHOD30@@ZAKPEVCPROXY1632@@@Z +180 stub ?PROXY1632METHOD21@@ZAKPEVCPROXY1632@@@Z +181 stub ?PROXY1632METHOD12@@ZAKPEVCPROXY1632@@@Z +182 stub ?PROXY1632METHOD31@@ZAKPEVCPROXY1632@@@Z +183 stub ?PROXY1632METHOD22@@ZAKPEVCPROXY1632@@@Z +184 stub ?PROXY1632METHOD13@@ZAKPEVCPROXY1632@@@Z +185 stub ?GETSIZE@CSTDMALLOC@@VEAKPEX@Z +186 stub ?PROXY1632METHOD23@@ZAKPEVCPROXY1632@@@Z +187 stub ?PROXY1632METHOD14@@ZAKPEVCPROXY1632@@@Z +188 stub ?PROXY1632METHOD24@@ZAKPEVCPROXY1632@@@Z +189 stub ?PROXY1632METHOD15@@ZAKPEVCPROXY1632@@@Z +190 stub ?PROXY1632METHOD25@@ZAKPEVCPROXY1632@@@Z +191 stub ?PROXY1632METHOD16@@ZAKPEVCPROXY1632@@@Z +192 stub ?PROXY1632METHOD26@@ZAKPEVCPROXY1632@@@Z +193 stub ?PROXY1632METHOD17@@ZAKPEVCPROXY1632@@@Z +194 stub ?PROXY1632METHOD27@@ZAKPEVCPROXY1632@@@Z +195 stub ?PROXY1632METHOD18@@ZAKPEVCPROXY1632@@@Z +196 stub ?PROXY1632METHOD28@@ZAKPEVCPROXY1632@@@Z +197 stub ?ADDREF@CSTDMALLOC@@VEAKXZ +198 stub ?PROXY1632METHOD19@@ZAKPEVCPROXY1632@@@Z +199 stub ?PROXY1632METHOD29@@ZAKPEVCPROXY1632@@@Z +200 stub CALL32INITIALIZE +201 pascal CALLOBJECTINWOW(ptr ptr) CallObjectInWOW +203 stub CALLOBJECTINWOWCHECKINIT +204 stub CALLOBJECTINWOWCHECKTHKMGR +205 stub CONVERTHR1632 +206 stub CONVERTHR3216 +207 stub ADDAPPCOMPATFLAG + +# WINE internal relays (for Win16 interfaces) +500 cdecl IMalloc16_QueryInterface(ptr ptr ptr) IMalloc16_fnQueryInterface +501 cdecl IMalloc16_AddRef(ptr) IMalloc16_fnAddRef +502 cdecl IMalloc16_Release(ptr) IMalloc16_fnRelease +503 cdecl IMalloc16_Alloc(ptr long) IMalloc16_fnAlloc +504 cdecl IMalloc16_Realloc(ptr segptr long) IMalloc16_fnRealloc +505 cdecl IMalloc16_Free(ptr segptr) IMalloc16_fnFree +506 cdecl IMalloc16_GetSize(ptr segptr) IMalloc16_fnGetSize +507 cdecl IMalloc16_DidAlloc(ptr segptr) IMalloc16_fnDidAlloc +508 cdecl IMalloc16_HeapMinimize(ptr) IMalloc16_fnHeapMinimize Property changes on: trunk/reactos/lib/ole32/compobj.spec ___________________________________________________________________ Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/ole32/compobj_private.h --- trunk/reactos/lib/ole32/compobj_private.h 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/compobj_private.h 2005-08-12 17:19:46 UTC (rev 17332) @@ -112,7 +112,7 @@ OXID oxid; /* object exported ID (RO) */ OID oid; /* object ID (RO) */ struct list interfaces; /* imported interfaces (CS cs) */ - DWORD refs; /* proxy reference count (LOCK) */ + LONG refs; /* proxy reference count (LOCK) */ CRITICAL_SECTION cs; /* thread safety for this object and children */ ULONG sorflags; /* STDOBJREF flags (RO) */ IRemUnknown *remunk; /* proxy to IRemUnknown used for lifecycle management (CS cs) */ @@ -124,12 +124,12 @@ { struct list entry; - DWORD refs; /* refcount of the apartment (LOCK) */ + LONG refs; /* refcount of the apartment (LOCK) */ DWORD model; /* threading model (RO) */ DWORD tid; /* thread id (RO) */ HANDLE thread; /* thread handle (RO) */ OXID oxid; /* object exporter ID (RO) */ - DWORD ipidc; /* interface pointer ID counter, starts at 1 (LOCK) */ + LONG ipidc; /* interface pointer ID counter, starts at 1 (LOCK) */ HWND win; /* message window (RO) */ CRITICAL_SECTION cs; /* thread safety */ LPMESSAGEFILTER filter; /* message filter (CS cs) */ _____ Modified: trunk/reactos/lib/ole32/compositemoniker.c --- trunk/reactos/lib/ole32/compositemoniker.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/compositemoniker.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -54,7 +54,7 @@ */ const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ IMoniker** tabMoniker; /* dynamaic table containing all components (monikers) of this composite moniker */ @@ -70,7 +70,7 @@ const IEnumMonikerVtbl *lpVtbl; /* VTable relative to the IEnumMoniker interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ IMoniker** tabMoniker; /* dynamic table containing the enumerated monikers */ _____ Modified: trunk/reactos/lib/ole32/datacache.c --- trunk/reactos/lib/ole32/datacache.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/datacache.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -103,7 +103,7 @@ /* * Reference count of this object */ - ULONG ref; + LONG ref; /* * IUnknown implementation of the outer object. _____ Modified: trunk/reactos/lib/ole32/defaulthandler.c --- trunk/reactos/lib/ole32/defaulthandler.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/defaulthandler.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -78,7 +78,7 @@ /* * Reference count of this object */ - ULONG ref; + LONG ref; /* * IUnknown implementation of the outer object. _____ Modified: trunk/reactos/lib/ole32/errorinfo.c --- trunk/reactos/lib/ole32/errorinfo.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/errorinfo.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -131,7 +131,7 @@ const IErrorInfoVtbl *lpvtei; const ICreateErrorInfoVtbl *lpvtcei; const ISupportErrorInfoVtbl *lpvtsei; - DWORD ref; + LONG ref; GUID m_Guid; BSTR bstrSource; _____ Modified: trunk/reactos/lib/ole32/filemoniker.c --- trunk/reactos/lib/ole32/filemoniker.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/filemoniker.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -53,7 +53,7 @@ */ const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ LPOLESTR filePathName; /* path string identified by this filemoniker */ _____ Modified: trunk/reactos/lib/ole32/ftmarshal.c --- trunk/reactos/lib/ole32/ftmarshal.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/ftmarshal.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -38,7 +38,7 @@ typedef struct _FTMarshalImpl { const IUnknownVtbl *lpVtbl; - DWORD ref; + LONG ref; const IMarshalVtbl *lpvtblFTM; IUnknown *pUnkOuter; _____ Modified: trunk/reactos/lib/ole32/hglobalstream.c --- trunk/reactos/lib/ole32/hglobalstream.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/hglobalstream.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -60,7 +60,7 @@ /* * Reference count */ - ULONG ref; + LONG ref; /* * Support for the stream _____ Modified: trunk/reactos/lib/ole32/ifs.c --- trunk/reactos/lib/ole32/ifs.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/ifs.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -366,7 +366,7 @@ typedef struct { const IMallocSpyVtbl *lpVtbl; - DWORD ref; + LONG ref; } _MallocSpy; /* this is the static object instance */ _____ Modified: trunk/reactos/lib/ole32/ifs.h --- trunk/reactos/lib/ole32/ifs.h 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/ifs.h 2005-08-12 17:19:46 UTC (rev 17332) @@ -29,6 +29,11 @@ typedef LPSTR LPOLESTR16; typedef LPCSTR LPCOLESTR16; +#define STDMETHOD16CALLTYPE __cdecl +#define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m) +#define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m) + + /*********************************************************************** * IMalloc16 interface */ @@ -38,16 +43,16 @@ DECLARE_INTERFACE_(IMalloc16,IUnknown) { /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD16_(ULONG,AddRef)(THIS) PURE; + STDMETHOD16_(ULONG,Release)(THIS) PURE; /*** IMalloc16 methods ***/ - STDMETHOD_(LPVOID,Alloc)(THIS_ DWORD cb) PURE; - STDMETHOD_(LPVOID,Realloc)(THIS_ LPVOID pv, DWORD cb) PURE; - STDMETHOD_(void,Free)(THIS_ LPVOID pv) PURE; - STDMETHOD_(DWORD,GetSize)(THIS_ LPVOID pv) PURE; - STDMETHOD_(INT16,DidAlloc)(THIS_ LPVOID pv) PURE; - STDMETHOD_(LPVOID,HeapMinimize)(THIS) PURE; + STDMETHOD16_(LPVOID,Alloc)(THIS_ DWORD cb) PURE; + STDMETHOD16_(LPVOID,Realloc)(THIS_ LPVOID pv, DWORD cb) PURE; + STDMETHOD16_(void,Free)(THIS_ LPVOID pv) PURE; + STDMETHOD16_(DWORD,GetSize)(THIS_ LPVOID pv) PURE; + STDMETHOD16_(INT16,DidAlloc)(THIS_ LPVOID pv) PURE; + STDMETHOD16_(LPVOID,HeapMinimize)(THIS) PURE; }; #undef INTERFACE @@ -63,17 +68,17 @@ DECLARE_INTERFACE_(ILockBytes16,IUnknown) { /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD16_(ULONG,AddRef)(THIS) PURE; + STDMETHOD16_(ULONG,Release)(THIS) PURE; /*** ILockBytes16 methods ***/ - STDMETHOD(ReadAt)(THIS_ ULARGE_INTEGER ulOffset, void *pv, ULONG cb, ULONG *pcbRead) PURE; - STDMETHOD(WriteAt)(THIS_ ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten) PURE; - STDMETHOD(Flush)(THIS) PURE; - STDMETHOD(SetSize)(THIS_ ULARGE_INTEGER cb) PURE; - STDMETHOD(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; - STDMETHOD(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; - STDMETHOD(Stat)(THIS_ STATSTG *pstatstg, DWORD grfStatFlag) PURE; + STDMETHOD16(ReadAt)(THIS_ ULARGE_INTEGER ulOffset, void *pv, ULONG cb, ULONG *pcbRead) PURE; + STDMETHOD16(WriteAt)(THIS_ ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten) PURE; + STDMETHOD16(Flush)(THIS) PURE; + STDMETHOD16(SetSize)(THIS_ ULARGE_INTEGER cb) PURE; + STDMETHOD16(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; + STDMETHOD16(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; + STDMETHOD16(Stat)(THIS_ STATSTG *pstatstg, DWORD grfStatFlag) PURE; }; #undef INTERFACE @@ -98,22 +103,22 @@ DECLARE_INTERFACE_(IStream16,ISequentialStream) { /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD16_(ULONG,AddRef)(THIS) PURE; + STDMETHOD16_(ULONG,Release)(THIS) PURE; /*** ISequentialStream methods ***/ - STDMETHOD_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE; - STDMETHOD_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE; + STDMETHOD16_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE; + STDMETHOD16_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE; /*** IStream16 methods ***/ - STDMETHOD(Seek)(THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) PURE; - STDMETHOD(SetSize)(THIS_ ULARGE_INTEGER libNewSize) PURE; - STDMETHOD(CopyTo)(THIS_ IStream16* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) PURE; - STDMETHOD(Commit)(THIS_ DWORD grfCommitFlags) PURE; - STDMETHOD(Revert)(THIS) PURE; - STDMETHOD(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; - STDMETHOD(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; - STDMETHOD(Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; - STDMETHOD(Clone)(THIS_ IStream16** ppstm) PURE; + STDMETHOD16(Seek)(THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) PURE; + STDMETHOD16(SetSize)(THIS_ ULARGE_INTEGER libNewSize) PURE; + STDMETHOD16(CopyTo)(THIS_ IStream16* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) PURE; + STDMETHOD16(Commit)(THIS_ DWORD grfCommitFlags) PURE; + STDMETHOD16(Revert)(THIS) PURE; + STDMETHOD16(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; + STDMETHOD16(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; + STDMETHOD16(Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; + STDMETHOD16(Clone)(THIS_ IStream16** ppstm) PURE; }; #undef INTERFACE @@ -125,25 +130,25 @@ DECLARE_INTERFACE_(IStorage16,IUnknown) { /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD16_(ULONG,AddRef)(THIS) PURE; + STDMETHOD16_(ULONG,Release)(THIS) PURE; /*** IStorage16 methods ***/ - STDMETHOD_(HRESULT,CreateStream)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream16** ppstm) PURE; - STDMETHOD_(HRESULT,OpenStream)(THIS_ LPCOLESTR16 pwcsName, void* reserved1, DWORD grfMode, DWORD reserved2, IStream16** ppstm) PURE; - STDMETHOD_(HRESULT,CreateStorage)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD dwStgFmt, DWORD reserved2, IStorage16** ppstg) PURE; - STDMETHOD_(HRESULT,OpenStorage)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgPriority, DWORD grfMode, SNB16 snbExclude, DWORD reserved, IStorage16** ppstg) PURE; - STDMETHOD_(HRESULT,CopyTo)(THIS_ DWORD ciidExclude, const IID* rgiidExclude, SNB16 snbExclude, IStorage16* pstgDest) PURE; - STDMETHOD_(HRESULT,MoveElementTo)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgDest, LPCOLESTR16 pwcsNewName, DWORD grfFlags) PURE; - STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; - STDMETHOD_(HRESULT,Revert)(THIS) PURE; - STDMETHOD_(HRESULT,EnumElements)(THIS_ DWORD reserved1, void* reserved2, DWORD reserved3, IEnumSTATSTG** ppenum) PURE; - STDMETHOD_(HRESULT,DestroyElement)(THIS_ LPCOLESTR16 pwcsName) PURE; - STDMETHOD_(HRESULT,RenameElement)(THIS_ LPCOLESTR16 pwcsOldName, LPCOLESTR16 pwcsNewName) PURE; - STDMETHOD_(HRESULT,SetElementTimes)(THIS_ LPCOLESTR16 pwcsName, const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE; - STDMETHOD_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE; - STDMETHOD_(HRESULT,SetStateBits)(THIS_ DWORD grfStateBits, DWORD grfMask) PURE; - STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; + STDMETHOD16_(HRESULT,CreateStream)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream16** ppstm) PURE; + STDMETHOD16_(HRESULT,OpenStream)(THIS_ LPCOLESTR16 pwcsName, void* reserved1, DWORD grfMode, DWORD reserved2, IStream16** ppstm) PURE; + STDMETHOD16_(HRESULT,CreateStorage)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD dwStgFmt, DWORD reserved2, IStorage16** ppstg) PURE; + STDMETHOD16_(HRESULT,OpenStorage)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgPriority, DWORD grfMode, SNB16 snbExclude, DWORD reserved, IStorage16** ppstg) PURE; + STDMETHOD16_(HRESULT,CopyTo)(THIS_ DWORD ciidExclude, const IID* rgiidExclude, SNB16 snbExclude, IStorage16* pstgDest) PURE; + STDMETHOD16_(HRESULT,MoveElementTo)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgDest, LPCOLESTR16 pwcsNewName, DWORD grfFlags) PURE; + STDMETHOD16_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; + STDMETHOD16_(HRESULT,Revert)(THIS) PURE; + STDMETHOD16_(HRESULT,EnumElements)(THIS_ DWORD reserved1, void* reserved2, DWORD reserved3, IEnumSTATSTG** ppenum) PURE; + STDMETHOD16_(HRESULT,DestroyElement)(THIS_ LPCOLESTR16 pwcsName) PURE; + STDMETHOD16_(HRESULT,RenameElement)(THIS_ LPCOLESTR16 pwcsOldName, LPCOLESTR16 pwcsNewName) PURE; + STDMETHOD16_(HRESULT,SetElementTimes)(THIS_ LPCOLESTR16 pwcsName, const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE; + STDMETHOD16_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE; + STDMETHOD16_(HRESULT,SetStateBits)(THIS_ DWORD grfStateBits, DWORD grfMask) PURE; + STDMETHOD16_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; }; #undef INTERFACE _____ Modified: trunk/reactos/lib/ole32/itemmoniker.c --- trunk/reactos/lib/ole32/itemmoniker.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/itemmoniker.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -52,7 +52,7 @@ */ const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ LPOLESTR itemName; /* item name identified by this ItemMoniker */ _____ Modified: trunk/reactos/lib/ole32/marshal.c --- trunk/reactos/lib/ole32/marshal.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/marshal.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -85,18 +85,27 @@ } /* creates a new stub manager */ -HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *obj, MSHLFLAGS mshlflags) +HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *object, MSHLFLAGS mshlflags) { struct stub_manager *manager; struct ifstub *ifstub; BOOL tablemarshal; IRpcStubBuffer *stub = NULL; HRESULT hr; + IUnknown *iobject = NULL; /* object of type riid */ hr = apartment_getoxid(apt, &stdobjref->oxid); if (hr != S_OK) return hr; + hr = IUnknown_QueryInterface(object, riid, (void **)&iobject); + if (hr != S_OK) + { + ERR("object doesn't expose interface %s, failing with error 0x%08lx\n", + debugstr_guid(riid), hr); + return E_NOINTERFACE; + } + /* IUnknown doesn't require a stub buffer, because it never goes out on * the wire */ if (!IsEqualIID(riid, &IID_IUnknown)) @@ -107,19 +116,19 @@ if (hr != S_OK) { ERR("couldn't get IPSFactory buffer for interface %s\n", debugstr_guid(riid)); + IUnknown_Release(iobject); return hr; } - hr = IPSFactoryBuffer_CreateStub(psfb, riid, obj, &stub); + hr = IPSFactoryBuffer_CreateStub(psfb, riid, iobject, &stub); IPSFactoryBuffer_Release(psfb); if (hr != S_OK) { ERR("Failed to create an IRpcStubBuffer from IPSFactory for %s\n", debugstr_guid(riid)); + IUnknown_Release(iobject); return hr; } } - else /* need to addref object anyway */ - IUnknown_AddRef(obj); if (mshlflags & MSHLFLAGS_NOPING) stdobjref->flags = SORF_NOPING; @@ -128,16 +137,17 @@ /* FIXME: what happens if we register an interface twice with different * marshaling flags? */ - if ((manager = get_stub_manager_from_object(apt, obj))) + if ((manager = get_stub_manager_from_object(apt, object))) TRACE("registering new ifstub on pre-existing manager\n"); else { TRACE("constructing new stub manager\n"); - manager = new_stub_manager(apt, obj, mshlflags); + manager = new_stub_manager(apt, object, mshlflags); if (!manager) { if (stub) IRpcStubBuffer_Release(stub); + IUnknown_Release(iobject); return E_OUTOFMEMORY; } } @@ -145,10 +155,11 @@ tablemarshal = ((mshlflags & MSHLFLAGS_TABLESTRONG) || (mshlflags & MSHLFLAGS_TABLEWEAK)); - ifstub = stub_manager_new_ifstub(manager, stub, obj, riid); + ifstub = stub_manager_new_ifstub(manager, stub, iobject, riid); + IUnknown_Release(iobject); + if (stub) IRpcStubBuffer_Release(stub); if (!ifstub) { - IRpcStubBuffer_Release(stub); stub_manager_int_release(manager); /* FIXME: should we do another release to completely destroy the * stub manager? */ @@ -763,7 +774,7 @@ typedef struct _StdMarshalImpl { const IMarshalVtbl *lpvtbl; - DWORD ref; + LONG ref; IID iid; DWORD dwDestContext; @@ -826,7 +837,6 @@ void* pvDestContext, DWORD mshlflags) { STDOBJREF stdobjref; - IUnknown *pUnk; ULONG res; HRESULT hres; APARTMENT *apt = COM_CurrentApt(); @@ -842,18 +852,7 @@ /* make sure this apartment can be reached from other threads / processes */ RPC_StartRemoting(apt); - hres = IUnknown_QueryInterface((LPUNKNOWN)pv, riid, (LPVOID*)&pUnk); - if (hres != S_OK) - { - ERR("object doesn't expose interface %s, failing with error 0x%08lx\n", - debugstr_guid(riid), hres); - return E_NOINTERFACE; - } - - hres = marshal_object(apt, &stdobjref, riid, pUnk, mshlflags); - - IUnknown_Release(pUnk); - + hres = marshal_object(apt, &stdobjref, riid, (IUnknown *)pv, mshlflags); if (hres) { ERR("Failed to create ifstub, hres=0x%lx\n", hres); _____ Modified: trunk/reactos/lib/ole32/memlockbytes.c --- trunk/reactos/lib/ole32/memlockbytes.c 2005-08-12 17:07:28 UTC (rev 17331) +++ trunk/reactos/lib/ole32/memlockbytes.c 2005-08-12 17:19:46 UTC (rev 17332) @@ -57,7 +57,7 @@ /* * Reference count */ - ULONG ref; + LONG ref; /* * Support for the LockBytes object @@ -155,6 +155,24 @@ /*********************************************************************** ******* * CreateILockBytesOnHGlobal [OLE32.@] + * + * Create a byte array object which is intended to be the compound file foundation. + * This object supports a COM implementation of the ILockBytes interface. + * + * PARAMS + * hGlobal [ I] Global memory handle + * fDeleteOnRelease [ I] Whether the handle should be freed when the object is released. + * ppLkbyt [ O] Address of ILockBytes pointer that receives + * the interface pointer to the new byte array object. + * + * RETURNS + * Success: S_OK + * + * NOTES + * The supplied ILockBytes pointer can be used by the StgCreateDocfileOnILockBytes + * function to build a compound file on top of this byte array object. + * The ILockBytes interface instance calls the GlobalReAlloc function to grow + * the memory block as required. */ HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, @@ -176,6 +194,17 @@ /*********************************************************************** ******* * GetHGlobalFromILockBytes [OLE32.@] + * + * Retrieve a global memory handle to a byte array object created + * using the CreateILockBytesOnHGlobal function. + * + * PARAMS + * plkbyt [ I] Pointer to the ILockBytes interface on byte array object + * phglobal [ O] Address to store a global memory handle + * RETURNS + * S_OK if *phglobal has a correct value + * E_INVALIDARG if any parameters are invalid + * */ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal) { @@ -224,10 +253,10 @@ /*********************************************************************** ******* * This is the constructor for the HGLOBALLockBytesImpl class. * - * Params: - * hGlobal - Handle that will support the stream. can be NULL. [truncated at 1000 lines; 2292 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17331: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Robert Shearman <rob(a)codeweavers.com> - In MsiLocateComponent pcchBuf can be NULL so don't try to dereference it. Alexandre Julliard <julliard(a)winehq.org> - Use the official names for the Unicode string constants. Aric Stewart <aric(a)codeweavers.com> - Implement MsiGetLanguage. - Relocate the msi file to prevent cd locking, corrected to properly not try to relocated #nnnn handles as files. - Use the SourceList functions to get the source path in ConfigureProductExW. - Handle installs off multiple volumes and properly pull the prompt string from the error table. - If MsiGetProperty(A/W) is called with a NULL for the value buffer but a value in the size for the value buffer, then Msi fills in the size of the value into the pointer for size. This is tested and confirmed with native MSI. - Bail out if the reg key is empty. This prevents us from writing garbage to the property table. - Properly resize the buffer based on ERROR_MORE_DATA. Also remember to free the allocated buffer. - Further testing shows that when CustomActionData needs to be blank it is an empty string not ' '. - Correct an error where I was not properly advancing a pointer. - Add source.c to start handling the various MsiSourceList apis used in v3 of MSI, and now internally. - Update files.c to use the MsiSourceList apis to make sure our SourceList keys in the registry are included and correct. - Use the strings defined in msi.h. - Use SOURCEDIR instead of PackagePath. Because the PackagePath may be local, while SOURCEDIR is more proper and will be a full directory. - InstallShield does a number of actions using DoAction before the Install starts so the PackageCode needs to be loaded on OpenPackage instead of the beginning of the install process. - When working toward install on demand support we need to reset all the constant values so that multiple install process do not get confused by leftover values from the previous install. - Fill and use the ProductCode part of the MSIPACKAGE structure. - Add the string constants located in msi.h and make use of them in files.c and source.c. - Keep track of what sequence we are in and register unique actions. This allows us to make sure actions and custom actions flagged to run only once, actually run only once. - Also clean up some of the numeric constants in custom.c using the defined values from msidefs.h. Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes. - Display icons in buttons that have them. - Use LoadImage to load bitmaps and icons. - Set the initial focus on the control specified by Control_First in the Dialog table. - Move to the next mask edit field when the current one becomes full. - Make the tab order in msi dialogs right. - Don't crash when cancelling out of a modeless dialog. - Stop the install when cancelling from a modeless dialog. Modified: trunk/reactos/lib/msi/Makefile.in Modified: trunk/reactos/lib/msi/action.c Modified: trunk/reactos/lib/msi/action.h Modified: trunk/reactos/lib/msi/appsearch.c Modified: trunk/reactos/lib/msi/custom.c Modified: trunk/reactos/lib/msi/dialog.c Modified: trunk/reactos/lib/msi/events.c Modified: trunk/reactos/lib/msi/files.c Modified: trunk/reactos/lib/msi/helpers.c Modified: trunk/reactos/lib/msi/install.c Modified: trunk/reactos/lib/msi/msi.c Modified: trunk/reactos/lib/msi/msi.spec Modified: trunk/reactos/lib/msi/msi.xml Modified: trunk/reactos/lib/msi/msipriv.h Modified: trunk/reactos/lib/msi/package.c Modified: trunk/reactos/lib/msi/registry.c Added: trunk/reactos/lib/msi/source.c Modified: trunk/reactos/lib/msi/string.c Modified: trunk/reactos/lib/msi/suminfo.c Modified: trunk/reactos/lib/msi/upgrade.c Modified: trunk/reactos/w32api/include/msi.h _____ Modified: trunk/reactos/lib/msi/Makefile.in --- trunk/reactos/lib/msi/Makefile.in 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/Makefile.in 2005-08-12 17:07:28 UTC (rev 17331) @@ -33,6 +33,7 @@ registry.c \ regsvr.c \ select.c \ + source.c \ string.c \ suminfo.c \ table.c \ _____ Modified: trunk/reactos/lib/msi/action.c --- trunk/reactos/lib/msi/action.c 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/action.c 2005-08-12 17:07:28 UTC (rev 17331) @@ -432,7 +432,7 @@ *****************************************************/ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath, - LPCWSTR szCommandLine) + LPCWSTR szCommandLine, LPCWSTR msiFilePath) { DWORD sz; WCHAR buffer[10]; @@ -447,6 +447,10 @@ package->script = HeapAlloc(GetProcessHeap(),0,sizeof(MSISCRIPT)); memset(package->script,0,sizeof(MSISCRIPT)); + package->script->InWhatSequence = SEQUENCE_INSTALL; + + package->msiFilePath= strdupW(msiFilePath); + if (szPackagePath) { LPWSTR p, check, path; @@ -538,10 +542,14 @@ { if (atoiW(buffer) >= INSTALLUILEVEL_REDUCED) { + package->script->InWhatSequence |= SEQUENCE_UI; rc = ACTION_ProcessUISequence(package); ui = TRUE; if (rc == ERROR_SUCCESS) + { + package->script->InWhatSequence |= SEQUENCE_EXEC; rc = ACTION_ProcessExecSequence(package,TRUE); + } } else rc = ACTION_ProcessExecSequence(package,FALSE); @@ -666,6 +674,11 @@ else rc = ACTION_PerformAction(iap->package,action,FALSE); + msi_dialog_check_messages( NULL ); + + if (iap->package->CurrentInstallState != ERROR_SUCCESS ) + rc = iap->package->CurrentInstallState; + if (rc == ERROR_FUNCTION_NOT_CALLED) rc = ERROR_SUCCESS; @@ -814,18 +827,6 @@ return ret; } -static BOOL ACTION_HandleDialogBox( MSIPACKAGE *package, LPCWSTR dialog, UINT* rc ) -{ - BOOL ret = FALSE; - - if (ACTION_DialogBox(package,dialog) == ERROR_SUCCESS) - { - *rc = package->CurrentInstallState; - ret = TRUE; - } - return ret; -} - static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action, UINT* rc, BOOL force ) { @@ -868,7 +869,6 @@ rc = ERROR_FUNCTION_NOT_CALLED; } - package->CurrentInstallState = rc; return rc; } @@ -884,18 +884,15 @@ if (!handled) handled = ACTION_HandleCustomAction(package, action, &rc, FALSE); - if (!handled) - handled = ACTION_HandleDialogBox(package, action, &rc); + if( !handled && ACTION_DialogBox(package,action) == ERROR_SUCCESS ) + handled = TRUE; - msi_dialog_check_messages( NULL ); - if (!handled) { FIXME("UNHANDLED MSI ACTION %s\n",debugstr_w(action)); rc = ERROR_FUNCTION_NOT_CALLED; } - package->CurrentInstallState = rc; return rc; } @@ -1371,9 +1368,6 @@ if (targetdir[0] == '.' && targetdir[1] == 0) targetdir = NULL; - if (srcdir && srcdir[0] == '.' && srcdir[1] == 0) - srcdir = NULL; - if (targetdir) { TRACE(" TargetDefault = %s\n",debugstr_w(targetdir)); @@ -1414,14 +1408,11 @@ static void ACTION_UpdateInstallStates(MSIPACKAGE *package) { int i; - LPWSTR productcode; - productcode = load_dynamic_property(package,szProductCode,NULL); - for (i = 0; i < package->loaded_components; i++) { INSTALLSTATE res; - res = MsiGetComponentPathW(productcode, + res = MsiGetComponentPathW(package->ProductCode, package->components[i].ComponentId , NULL, NULL); if (res < 0) res = INSTALLSTATE_ABSENT; @@ -2127,7 +2118,7 @@ { TRACE("Setting value %s of %s\n",debugstr_w(deformated), debugstr_w(uikey)); - RegSetValueExW(hkey, deformated, 0, type, value_data, size); + RegSetValueExW(hkey, deformated, 0, type, (LPBYTE)value_data, size); } else { @@ -2143,7 +2134,7 @@ TRACE("Checked and setting value %s of %s\n", debugstr_w(deformated), debugstr_w(uikey)); if (deformated || size) - RegSetValueExW(hkey, deformated, 0, type, value_data, size); + RegSetValueExW(hkey, deformated, 0, type, (LPBYTE) value_data, size); } } RegCloseKey(hkey); @@ -2500,7 +2491,6 @@ */ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) { - LPWSTR productcode; WCHAR squished_pc[GUID_SIZE]; WCHAR squished_cc[GUID_SIZE]; UINT rc; @@ -2511,15 +2501,12 @@ return ERROR_INVALID_HANDLE; /* writes the Component and Features values to the registry */ - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; rc = MSIREG_OpenComponents(&hkey); if (rc != ERROR_SUCCESS) goto end; - squash_guid(productcode,squished_pc); + squash_guid(package->ProductCode,squished_pc); ui_progress(package,1,COMPONENT_PROGRESS_VALUE,1,0); for (i = 0; i < package->loaded_components; i++) { @@ -2555,7 +2542,7 @@ if (keypath) { - RegSetValueExW(hkey2,squished_pc,0,REG_SZ,(LPVOID)keypath, + RegSetValueExW(hkey2,squished_pc,0,REG_SZ,(LPBYTE)keypath, (strlenW(keypath)+1)*sizeof(WCHAR)); if (package->components[i].Attributes & @@ -2567,7 +2554,7 @@ '0','0','0','0','0','0','0','0',0}; RegSetValueExW(hkey2,szPermKey,0,REG_SZ, - (LPVOID)keypath, + (LPBYTE)keypath, (strlenW(keypath)+1)*sizeof(WCHAR)); } @@ -2575,7 +2562,7 @@ /* UI stuff */ uirow = MSI_CreateRecord(3); - MSI_RecordSetStringW(uirow,1,productcode); + MSI_RecordSetStringW(uirow,1,package->ProductCode); MSI_RecordSetStringW(uirow,2,package->components[i]. ComponentId); MSI_RecordSetStringW(uirow,3,keypath); @@ -2602,7 +2589,7 @@ /* UI stuff */ uirow = MSI_CreateRecord(2); - MSI_RecordSetStringW(uirow,1,productcode); + MSI_RecordSetStringW(uirow,1,package->ProductCode); MSI_RecordSetStringW(uirow,2,package->components[i]. ComponentId); ui_actiondata(package,szProcessComponents,uirow); @@ -2611,7 +2598,6 @@ } } end: - HeapFree(GetProcessHeap(), 0, productcode); RegCloseKey(hkey); return rc; } @@ -3019,25 +3005,14 @@ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','I','c','o','n','`',0}; /* for registry stuff */ - LPWSTR productcode; HKEY hkey=0; HKEY hukey=0; - static const WCHAR szProductName[] = - {'P','r','o','d','u','c','t','N','a','m','e',0}; - static const WCHAR szPackageCode[] = - {'P','a','c','k','a','g','e','C','o','d','e',0}; - static const WCHAR szLanguage[] = - {'L','a','n','g','u','a','g','e',0}; static const WCHAR szProductLanguage[] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0}; - static const WCHAR szProductIcon[] = - {'P','r','o','d','u','c','t','I','c','o','n',0}; static const WCHAR szARPProductIcon[] = {'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0}; static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}; - static const WCHAR szVersion[] = - {'V','e','r','s','i','o','n',0}; DWORD langid; LPWSTR buffer; DWORD size; @@ -3057,28 +3032,26 @@ /* ok there is a lot more done here but i need to figure out what */ - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; - - rc = MSIREG_OpenProductsKey(productcode,&hkey,TRUE); + rc = MSIREG_OpenProductsKey(package->ProductCode,&hkey,TRUE); if (rc != ERROR_SUCCESS) goto end; - rc = MSIREG_OpenUserProductsKey(productcode,&hukey,TRUE); + rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); if (rc != ERROR_SUCCESS) goto end; - buffer = load_dynamic_property(package,szProductName,NULL); + buffer = load_dynamic_property(package,INSTALLPROPERTY_PRODUCTNAMEW,NULL); size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hukey,szProductName,0,REG_SZ, (BYTE *)buffer,size); + RegSetValueExW(hukey,INSTALLPROPERTY_PRODUCTNAMEW,0,REG_SZ, + (LPBYTE)buffer,size); HeapFree(GetProcessHeap(),0,buffer); buffer = load_dynamic_property(package,szProductLanguage,NULL); size = sizeof(DWORD); langid = atoiW(buffer); - RegSetValueExW(hukey,szLanguage,0,REG_DWORD, (BYTE *)&langid,size); + RegSetValueExW(hukey,INSTALLPROPERTY_LANGUAGEW,0,REG_DWORD, + (LPBYTE)&langid,size); HeapFree(GetProcessHeap(),0,buffer); buffer = load_dynamic_property(package,szARPProductIcon,NULL); @@ -3087,7 +3060,8 @@ LPWSTR path; build_icon_path(package,buffer,&path); size = strlenW(path) * sizeof(WCHAR); - RegSetValueExW(hukey,szProductIcon,0,REG_SZ, (BYTE *)path,size); + RegSetValueExW(hukey,INSTALLPROPERTY_PRODUCTICONW,0,REG_SZ, + (LPBYTE)path,size); } HeapFree(GetProcessHeap(),0,buffer); @@ -3096,7 +3070,8 @@ { DWORD verdword = build_version_dword(buffer); size = sizeof(DWORD); - RegSetValueExW(hukey,szVersion,0,REG_DWORD, (BYTE *)&verdword,size); + RegSetValueExW(hukey,INSTALLPROPERTY_VERSIONW,0,REG_DWORD, (LPBYTE + )&verdword,size); } HeapFree(GetProcessHeap(),0,buffer); @@ -3119,8 +3094,8 @@ if (ptr) *ptr = 0; squash_guid(guidbuffer,squashed); size = strlenW(squashed)*sizeof(WCHAR); - RegSetValueExW(hukey,szPackageCode,0,REG_SZ, (LPSTR)squashed, - size); + RegSetValueExW(hukey,INSTALLPROPERTY_PACKAGECODEW,0,REG_SZ, + (LPBYTE)squashed, size); } else { @@ -3137,7 +3112,6 @@ end: - HeapFree(GetProcessHeap(),0,productcode); RegCloseKey(hkey); RegCloseKey(hukey); @@ -3331,7 +3305,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) { - LPWSTR productcode; UINT rc; DWORD i; HKEY hkey=0; @@ -3340,15 +3313,11 @@ if (!package) return ERROR_INVALID_HANDLE; - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; - - rc = MSIREG_OpenFeaturesKey(productcode,&hkey,TRUE); + rc = MSIREG_OpenFeaturesKey(package->ProductCode,&hkey,TRUE); if (rc != ERROR_SUCCESS) goto end; - rc = MSIREG_OpenUserFeaturesKey(productcode,&hukey,TRUE); + rc = MSIREG_OpenUserFeaturesKey(package->ProductCode,&hukey,TRUE); if (rc != ERROR_SUCCESS) goto end; @@ -3400,14 +3369,14 @@ size = (strlenW(data)+1)*sizeof(WCHAR); RegSetValueExW(hkey,package->features[i].Feature,0,REG_SZ, - (LPSTR)data,size); + (LPBYTE)data,size); HeapFree(GetProcessHeap(),0,data); if (!absent) { size = strlenW(package->features[i].Feature_Parent)*sizeof(WCHAR); RegSetValueExW(hukey,package->features[i].Feature,0,REG_SZ, - (LPSTR)package->features[i].Feature_Parent,size); + (LPBYTE)package->features[i].Feature_Parent,size); } else { @@ -3417,7 +3386,7 @@ data[0] = 0x6; strcpyW(&data[1],package->features[i].Feature_Parent); RegSetValueExW(hukey,package->features[i].Feature,0,REG_SZ, - (LPSTR)data,size); + (LPBYTE)data,size); HeapFree(GetProcessHeap(),0,data); } } @@ -3425,7 +3394,6 @@ end: RegCloseKey(hkey); RegCloseKey(hukey); - HeapFree(GetProcessHeap(), 0, productcode); return rc; } @@ -3433,7 +3401,6 @@ { HKEY hkey=0; LPWSTR buffer = NULL; - LPWSTR productcode; UINT rc,i; DWORD size; static WCHAR szNONE[] = {0}; @@ -3484,8 +3451,6 @@ '%','s','\\', 'I','n','s','t','a','l','l','e','r','\\', '%','x','.','m','s','i',0}; - static const WCHAR szLocalPackage[]= - {'L','o','c','a','l','P','a','c','k','a','g','e',0}; static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0}; static const WCHAR modpath_fmt[] = @@ -3496,20 +3461,10 @@ {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0}; static const WCHAR szEstimatedSize[] = {'E','s','t','i','m','a','t','e','d','S','i','z','e',0}; - static const WCHAR szInstallDate[] = - {'I','n','s','t','a','l','l','D','a','t','e',0}; - static const WCHAR szLanguage[] = - {'L','a','n','g','u','a','g','e',0}; static const WCHAR szProductLanguage[] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0}; static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}; - static const WCHAR szVersion[] = - {'V','e','r','s','i','o','n',0}; - static const WCHAR szVersionMajor[] = - {'V','e','r','s','i','o','n','M','a','j','o','r',0}; - static const WCHAR szVersionMinor[] = - {'V','e','r','s','i','o','n','M','i','n','o','r',0}; SYSTEMTIME systime; static const WCHAR date_fmt[] = {'%','i','%','i','%','i',0}; @@ -3520,11 +3475,7 @@ if (!package) return ERROR_INVALID_HANDLE; - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; - - rc = MSIREG_OpenUninstallKey(productcode,&hkey,TRUE); + rc = MSIREG_OpenUninstallKey(package->ProductCode,&hkey,TRUE); if (rc != ERROR_SUCCESS) goto end; @@ -3538,14 +3489,14 @@ if (rc != ERROR_SUCCESS) buffer = szNONE; size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hkey,szRegKeys[i],0,REG_SZ,(LPSTR)buffer,size); + RegSetValueExW(hkey,szRegKeys[i],0,REG_SZ,(LPBYTE)buffer,size); HeapFree(GetProcessHeap(),0,buffer); i++; } rc = 0x1; size = sizeof(rc); - RegSetValueExW(hkey,szWindowsInstaler,0,REG_DWORD,(LPSTR)&rc,size); + RegSetValueExW(hkey,szWindowsInstaler,0,REG_DWORD,(LPBYTE)&rc,size); /* copy the package locally */ num = GetTickCount() & 0xffff; @@ -3574,34 +3525,37 @@ snprintfW(path,sizeof(path)/sizeof(path[0]),installerPathFmt,windir); create_full_pathW(path); TRACE("Copying to local package %s\n",debugstr_w(packagefile)); - if (!CopyFileW(package->PackagePath,packagefile,FALSE)) + if (!CopyFileW(package->msiFilePath,packagefile,FALSE)) ERR("Unable to copy package (%s -> %s) (error %ld)\n", - debugstr_w(package->PackagePath), debugstr_w(packagefile), + debugstr_w(package->msiFilePath), debugstr_w(packagefile), GetLastError()); size = strlenW(packagefile)*sizeof(WCHAR); - RegSetValueExW(hkey,szLocalPackage,0,REG_SZ,(LPSTR)packagefile,size); + RegSetValueExW(hkey,INSTALLPROPERTY_LOCALPACKAGEW,0,REG_SZ, + (LPBYTE)packagefile,size); /* do ModifyPath and UninstallString */ size = deformat_string(package,modpath_fmt,&buffer); - RegSetValueExW(hkey,szModifyPath,0,REG_EXPAND_SZ,(LPSTR)buffer,size); - RegSetValueExW(hkey,szUninstallString,0,REG_EXPAND_SZ,(LPSTR)buffer,size ); + RegSetValueExW(hkey,szModifyPath,0,REG_EXPAND_SZ,(LPBYTE)buffer,size); + RegSetValueExW(hkey,szUninstallString,0,REG_EXPAND_SZ,(LPBYTE)buffer,siz e); HeapFree(GetProcessHeap(),0,buffer); FIXME("Write real Estimated Size when we have it\n"); size = 0; - RegSetValueExW(hkey,szEstimatedSize,0,REG_DWORD,(LPSTR)&size,sizeof(DWOR D)); + RegSetValueExW(hkey,szEstimatedSize,0,REG_DWORD,(LPBYTE)&size,sizeof(DWO RD)); GetLocalTime(&systime); size = 9*sizeof(WCHAR); buffer= HeapAlloc(GetProcessHeap(),0,size); sprintfW(buffer,date_fmt,systime.wYear,systime.wMonth,systime.wDay); size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hkey,szInstallDate,0,REG_SZ,(LPSTR)buffer,size); + RegSetValueExW(hkey,INSTALLPROPERTY_INSTALLDATEW,0,REG_SZ, + (LPBYTE)buffer,size); HeapFree(GetProcessHeap(),0,buffer); buffer = load_dynamic_property(package,szProductLanguage,NULL); size = atoiW(buffer); - RegSetValueExW(hkey,szLanguage,0,REG_DWORD, (LPSTR)&size,sizeof(DWORD)); + RegSetValueExW(hkey,INSTALLPROPERTY_LANGUAGEW,0,REG_DWORD, + (LPBYTE)&size,sizeof(DWORD)); HeapFree(GetProcessHeap(),1,buffer); buffer = load_dynamic_property(package,szProductVersion,NULL); @@ -3611,9 +3565,12 @@ DWORD vermajor = verdword>>24; DWORD verminor = (verdword>>16)&0x00FF; size = sizeof(DWORD); - RegSetValueExW(hkey,szVersion,0,REG_DWORD,(LPSTR)&verdword,size); - RegSetValueExW(hkey,szVersionMajor,0,REG_DWORD,(LPSTR)&vermajor,size); - RegSetValueExW(hkey,szVersionMinor,0,REG_DWORD,(LPSTR)&verminor,size); + RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONW,0,REG_DWORD, + (LPBYTE)&verdword,size); + RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONMAJORW,0,REG_DWORD, + (LPBYTE)&vermajor,size); + RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONMINORW,0,REG_DWORD, + (LPBYTE)&verminor,size); } HeapFree(GetProcessHeap(),0,buffer); @@ -3624,11 +3581,11 @@ HKEY hkey2; WCHAR squashed[33]; MSIREG_OpenUpgradeCodesKey(upgrade_code, &hkey2, TRUE); - squash_guid(productcode,squashed); + squash_guid(package->ProductCode,squashed); RegSetValueExW(hkey2, squashed, 0,REG_SZ,NULL,0); RegCloseKey(hkey2); MSIREG_OpenUserUpgradeCodesKey(upgrade_code, &hkey2, TRUE); - squash_guid(productcode,squashed); + squash_guid(package->ProductCode,squashed); RegSetValueExW(hkey2, squashed, 0,REG_SZ,NULL,0); RegCloseKey(hkey2); @@ -3636,7 +3593,6 @@ } end: - HeapFree(GetProcessHeap(),0,productcode); RegCloseKey(hkey); return ERROR_SUCCESS; @@ -3700,68 +3656,33 @@ 'A','F','T','E','R','R','E','B','O','O','T','=','1',' ', 'R','U','N','O','N','C','E','E','N','T','R','Y','=','\"','%','s','\"',0} ; WCHAR buffer[256], sysdir[MAX_PATH]; - HKEY hkey,hukey; - LPWSTR productcode; + HKEY hkey; WCHAR squished_pc[100]; - INT rc; DWORD size; - static const WCHAR szLUS[] = { - 'L','a','s','t','U','s','e','d','S','o','u','r','c','e',0}; - static const WCHAR szSourceList[] = { - 'S','o','u','r','c','e','L','i','s','t',0}; - static const WCHAR szPackageName[] = { - 'P','a','c','k','a','g','e','N','a','m','e',0}; if (!package) return ERROR_INVALID_HANDLE; - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; + squash_guid(package->ProductCode,squished_pc); - squash_guid(productcode,squished_pc); - GetSystemDirectoryW(sysdir, sizeof(sysdir)/sizeof(sysdir[0])); RegCreateKeyW(HKEY_LOCAL_MACHINE,RunOnce,&hkey); snprintfW(buffer,sizeof(buffer)/sizeof(buffer[0]),msiexec_fmt,sysdir, squished_pc); size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hkey,squished_pc,0,REG_SZ,(LPSTR)buffer,size); + RegSetValueExW(hkey,squished_pc,0,REG_SZ,(LPBYTE)buffer,size); RegCloseKey(hkey); TRACE("Reboot command %s\n",debugstr_w(buffer)); RegCreateKeyW(HKEY_LOCAL_MACHINE,InstallRunOnce,&hkey); - sprintfW(buffer,install_fmt,productcode,squished_pc); + sprintfW(buffer,install_fmt,package->ProductCode,squished_pc); size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hkey,squished_pc,0,REG_SZ,(LPSTR)buffer,size); + RegSetValueExW(hkey,squished_pc,0,REG_SZ,(LPBYTE)buffer,size); RegCloseKey(hkey); - rc = MSIREG_OpenUserProductsKey(productcode,&hukey,TRUE); - if (rc == ERROR_SUCCESS) - { - HKEY hukey2; - LPWSTR buf; - RegCreateKeyW(hukey, szSourceList, &hukey2); - buf = load_dynamic_property(package,cszSourceDir,NULL); - size = strlenW(buf)*sizeof(WCHAR); - RegSetValueExW(hukey2,szLUS,0,REG_SZ,(LPSTR)buf,size); - HeapFree(GetProcessHeap(),0,buf); - - buf = strrchrW(package->PackagePath,'\\'); - if (buf) - { - buf++; - size = strlenW(buf)*sizeof(WCHAR); - RegSetValueExW(hukey2,szPackageName,0,REG_SZ,(LPSTR)buf,size); - } - - RegCloseKey(hukey2); - } - HeapFree(GetProcessHeap(),0,productcode); - return ERROR_INSTALL_SUSPEND; } @@ -3776,11 +3697,8 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package) { - static const WCHAR szProductID[]= - {'P','r','o','d','u','c','t','I','D',0}; HKEY hkey=0; LPWSTR buffer; - LPWSTR productcode; LPWSTR productid; UINT rc,i; DWORD size; @@ -3804,15 +3722,12 @@ if (!package) return ERROR_INVALID_HANDLE; - productid = load_dynamic_property(package,szProductID,&rc); + productid = load_dynamic_property(package,INSTALLPROPERTY_PRODUCTIDW, + &rc); if (!productid) return ERROR_SUCCESS; - productcode = load_dynamic_property(package,szProductCode,&rc); - if (!productcode) - return rc; - - rc = MSIREG_OpenUninstallKey(productcode,&hkey,TRUE); + rc = MSIREG_OpenUninstallKey(package->ProductCode,&hkey,TRUE); if (rc != ERROR_SUCCESS) goto end; @@ -3823,7 +3738,7 @@ if (rc == ERROR_SUCCESS) { size = strlenW(buffer)*sizeof(WCHAR); - RegSetValueExW(hkey,szRegKeys[i],0,REG_SZ,(LPSTR)buffer,size); + RegSetValueExW(hkey,szRegKeys[i],0,REG_SZ,(LPBYTE)buffer,size); } else RegSetValueExW(hkey,szRegKeys[i],0,REG_SZ,NULL,0); @@ -3831,7 +3746,6 @@ } end: - HeapFree(GetProcessHeap(),0,productcode); HeapFree(GetProcessHeap(),0,productid); RegCloseKey(hkey); @@ -3848,6 +3762,7 @@ level = load_dynamic_property(package,szUILevel,NULL); MSI_SetPropertyW(package,szUILevel,szTwo); + package->script->InWhatSequence |= SEQUENCE_EXEC; rc = ACTION_ProcessExecSequence(package,FALSE); MSI_SetPropertyW(package,szUILevel,level); HeapFree(GetProcessHeap(),0,level); _____ Modified: trunk/reactos/lib/msi/action.h --- trunk/reactos/lib/msi/action.h 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/action.h 2005-08-12 17:07:28 UTC (rev 17331) @@ -187,13 +187,19 @@ TOTAL_SCRIPTS = 3 }; +#define SEQUENCE_UI 0x1 +#define SEQUENCE_EXEC 0x2 +#define SEQUENCE_INSTALL 0x10 + typedef struct tagMSISCRIPT { LPWSTR *Actions[TOTAL_SCRIPTS]; UINT ActionCount[TOTAL_SCRIPTS]; BOOL ExecuteSequenceRun; - BOOL FindRelatedProductsRun; BOOL CurrentlyScripting; + UINT InWhatSequence; + LPWSTR *UniqueActions; + UINT UniqueActionsCount; }MSISCRIPT; @@ -234,6 +240,9 @@ void reduce_to_shortfilename(WCHAR*); LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR); void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature); +UINT register_unique_action(MSIPACKAGE *, LPCWSTR); +BOOL check_unique_action(MSIPACKAGE *, LPCWSTR); +WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... ); /* control event stuff */ _____ Modified: trunk/reactos/lib/msi/appsearch.c --- trunk/reactos/lib/msi/appsearch.c 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/appsearch.c 2005-08-12 17:07:28 UTC (rev 17331) @@ -334,6 +334,13 @@ goto end; } + /* bail out if the registry key is empty */ + if (sz == 0) + { + rc = ERROR_SUCCESS; + goto end; + } + switch (regType) { case REG_SZ: _____ Modified: trunk/reactos/lib/msi/custom.c --- trunk/reactos/lib/msi/custom.c 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/custom.c 2005-08-12 17:07:28 UTC (rev 17331) @@ -36,6 +36,7 @@ #include "wine/debug.h" #include "fdi.h" #include "msi.h" +#include "msidefs.h" #include "msiquery.h" #include "fcntl.h" #include "objbase.h" @@ -74,6 +75,45 @@ static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action); + +static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options) +{ + if (!package->script) + return TRUE; + + if ((options & msidbCustomActionTypeClientRepeat) == + msidbCustomActionTypeClientRepeat) + { + if (!(package->script->InWhatSequence & SEQUENCE_UI && + package->script->InWhatSequence & SEQUENCE_EXEC)) + { + TRACE("Skipping action due to dbCustomActionTypeClientRepeat option.\n"); + return FALSE; + } + } + else if (options & msidbCustomActionTypeFirstSequence) + { + if (package->script->InWhatSequence & SEQUENCE_UI && + package->script->InWhatSequence & SEQUENCE_EXEC ) + { + TRACE("Skipping action due to msidbCustomActionTypeFirstSequence option.\n"); + return FALSE; + } + } + else if (options & msidbCustomActionTypeOncePerProcess) + { + if (check_unique_action(package,action)) + { + TRACE("Skipping action due to msidbCustomActionTypeOncePerProcess option.\n"); + return FALSE; + } + else + register_unique_action(package,action); + } + + return TRUE; +} + UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute) { UINT rc = ERROR_SUCCESS; @@ -101,9 +141,15 @@ debugstr_w(source), debugstr_w(target)); /* handle some of the deferred actions */ - if (type & 0x400) + if (type & msidbCustomActionTypeTSAware) + FIXME("msidbCustomActionTypeTSAware not handled\n"); + + if (type & msidbCustomActionTypeInScript) { - if (type & 0x100) + if (type & msidbCustomActionTypeNoImpersonate) + FIXME("msidbCustomActionTypeNoImpersonate not handled\n"); + + if (type & msidbCustomActionTypeRollback) { FIXME("Rollback only action... rollbacks not supported yet\n"); schedule_action(package, ROLLBACK_SCRIPT, action); @@ -114,7 +160,7 @@ } if (!execute) { - if (type & 0x200) + if (type & msidbCustomActionTypeCommit) { TRACE("Deferring Commit Action!\n"); schedule_action(package, COMMIT_SCRIPT, action); @@ -136,11 +182,16 @@ static const WCHAR szActionData[] = { 'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0}; + static const WCHAR szBlank[] = {0}; LPWSTR actiondata = load_dynamic_property(package,action,NULL); if (actiondata) MSI_SetPropertyW(package,szActionData,actiondata); + else + MSI_SetPropertyW(package,szActionData,szBlank); } } + else if (!check_execution_scheduling_options(package,action,type)) + return ERROR_SUCCESS; switch (type & CUSTOM_ACTION_TYPE_MASK) { @@ -304,7 +355,7 @@ { UINT rc = ERROR_SUCCESS; - if (!(type & 0x80)) + if (!(type & msidbCustomActionTypeAsync)) { /* synchronous */ TRACE("Synchronous Execution of action %s\n",debugstr_w(Name)); @@ -313,7 +364,7 @@ else msi_dialog_check_messages(ThreadHandle); - if (!(type & 0x40)) + if (!(type & msidbCustomActionTypeContinue)) { if (ProcessHandle) rc = process_action_return_value(2,ProcessHandle); @@ -331,7 +382,7 @@ { TRACE("Asynchronous Execution of action %s\n",debugstr_w(Name)); /* asynchronous */ - if (type & 0x40) + if (type & msidbCustomActionTypeContinue) { if (ProcessHandle) { _____ Modified: trunk/reactos/lib/msi/dialog.c --- trunk/reactos/lib/msi/dialog.c 2005-08-12 16:59:41 UTC (rev 17330) +++ trunk/reactos/lib/msi/dialog.c 2005-08-12 17:07:28 UTC (rev 17331) @@ -53,8 +53,9 @@ msi_handler handler; LPWSTR property; LPWSTR value; - IPicture *pic; + HBITMAP hBitmap; HICON hIcon; + LPWSTR tabnext; WCHAR name[1]; }; @@ -76,6 +77,7 @@ LPWSTR default_font; msi_font *font_list; msi_control *control_list; + HWND hWndFocus; WCHAR name[1]; }; @@ -143,6 +145,8 @@ { msi_control *control; + if( !name ) + return NULL; for( control = dialog->control_list; control; control = control->next ) if( !strcmpW( control->name, name ) ) /* FIXME: case sensitive? */ break; @@ -297,8 +301,9 @@ control->handler = NULL; control->property = NULL; control->value = NULL; - control->pic = NULL; + control->hBitmap = NULL; control->hIcon = NULL; + control->tabnext = strdupW( MSI_RecordGetString( rec, 11) ); x = MSI_RecordGetInteger( rec, 4 ); y = MSI_RecordGetInteger( rec, 5 ); @@ -331,6 +336,97 @@ return control; } +static MSIRECORD *msi_get_binary_record( MSIDATABASE *db, LPCWSTR name ) +{ + const static WCHAR query[] = { + 's','e','l','e','c','t',' ','*',' ', + 'f','r','o','m',' ','B','i','n','a','r','y',' ', + 'w','h','e','r','e',' ', + '`','N','a','m','e','`',' ','=',' ','\'','%','s','\'',0 + }; + + return MSI_QueryGetRecord( db, query, name ); +} + +static LPWSTR msi_create_tmp_path(void) +{ + WCHAR tmp[MAX_PATH]; + LPWSTR path = NULL; + static const WCHAR prefix[] = { 'm','s','i',0 }; + DWORD len, r; + + r = GetTempPathW( MAX_PATH, tmp ); + if( !r ) + return path; + len = lstrlenW( tmp ) + 20; + path = HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); + if( path ) + { + r = GetTempFileNameW( tmp, prefix, 0, path ); + if (!r) + { + HeapFree( GetProcessHeap(), 0, path ); + path = NULL; + } + } + return path; +} + + +static HANDLE msi_load_image( MSIDATABASE *db, LPCWSTR name, UINT type, + UINT cx, UINT cy, UINT flags ) +{ + MSIRECORD *rec = NULL; + HANDLE himage = NULL; + LPWSTR tmp; + UINT r; + + TRACE("%p %s %u %u %08x\n", db, debugstr_w(name), cx, cy, flags); + + tmp = msi_create_tmp_path(); + if( !tmp ) + return himage; + + rec = msi_get_binary_record( db, name ); + if( rec ) + { + r = MSI_RecordStreamToFile( rec, 2, tmp ); + if( r == ERROR_SUCCESS ) + { + himage = LoadImageW( 0, tmp, type, cx, cy, flags ); + DeleteFileW( tmp ); + } + msiobj_release( &rec->hdr ); + } + + HeapFree( GetProcessHeap(), 0, tmp ); + return himage; +} + +static HICON msi_load_icon( MSIDATABASE *db, LPCWSTR text, UINT attributes ) +{ + DWORD cx = 0, cy = 0, flags; + + flags = LR_LOADFROMFILE | LR_DEFAULTSIZE; + if( attributes & msidbControlAttributesFixedSize ) + { + flags &= ~LR_DEFAULTSIZE; + if( attributes & msidbControlAttributesIconSize16 ) + { + cx += 16; + cy += 16; + } + if( attributes & msidbControlAttributesIconSize32 ) + { + cx += 32; + cy += 32; + } + /* msidbControlAttributesIconSize48 handled by above logic */ + } + return msi_load_image( db, text, IMAGE_ICON, cx, cy, flags ); +} + + /* called from the Control Event subscription code */ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control, LPCWSTR attribute, MSIRECORD *rec ) @@ -475,12 +571,28 @@ static UINT msi_dialog_button_control( msi_dialog *dialog, MSIRECORD *rec ) { msi_control *control; + UINT attributes, style; + LPCWSTR text; TRACE("%p %p\n", dialog, rec); - control = msi_dialog_add_control( dialog, rec, szButton, WS_TABSTOP ); [truncated at 1000 lines; 1702 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17330: Sync to Wine-20050725:
by gvg@svn.reactos.com
Sync to Wine-20050725: Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes (Reg* functions). Modified: trunk/reactos/lib/mpr/pwcache.c _____ Modified: trunk/reactos/lib/mpr/pwcache.c --- trunk/reactos/lib/mpr/pwcache.c 2005-08-12 16:53:07 UTC (rev 17329) +++ trunk/reactos/lib/mpr/pwcache.c 2005-08-12 16:59:41 UTC (rev 17330) @@ -108,7 +108,7 @@ if( valname ) { r = RegSetValueExA( hkey, valname, 0, REG_BINARY, - pbPassword, cbPassword ); + (LPBYTE)pbPassword, cbPassword ); if( r ) r = WN_CANCEL; else @@ -202,7 +202,7 @@ if( valname ) { sz = *pcbPassword; - r = RegQueryValueExA( hkey, valname, 0, &type, pbPassword, &sz ); + r = RegQueryValueExA( hkey, valname, 0, &type, (LPBYTE)pbPassword, &sz ); *pcbPassword = sz; if( r ) r = WN_CANCEL;
19 years, 4 months
1
0
0
0
[gvg] 17329: Forgotten vendor drop of Wine-20050628
by gvg@svn.reactos.com
Forgotten vendor drop of Wine-20050628 Deleted: vendor/wine/dlls/dinput8/Wine-20050524/ Added: vendor/wine/dlls/dinput8/Wine-20050628/ _____ Copied: vendor/wine/dlls/dinput8/Wine-20050628 (from rev 17041, vendor/wine/dlls/dinput8/current)
19 years, 4 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
67
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
Results per page:
10
25
50
100
200