[SHLWAPI] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-04 13:17:11 +01:00
parent 9d1dc9bee9
commit d3fd5bdd97
17 changed files with 248 additions and 87 deletions

View file

@ -17,8 +17,21 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <assert.h>
#include "precomp.h"
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "objbase.h"
#include "shlguid.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Default IQueryAssociations::Init() flags */
#define SHLWAPI_DEF_ASSOCF (ASSOCF_INIT_BYEXENAME|ASSOCF_INIT_DEFAULTTOSTAR| \
@ -89,7 +102,6 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
return SHCoCreateInstance( NULL, &clsid, NULL, refiid, lpInterface );
}
#ifdef __REACTOS__
struct AssocPerceivedInfo
{
@ -257,8 +269,6 @@ static const struct AssocPerceivedInfo* AssocFindByType(LPCWSTR pszType)
return NULL;
}
#endif
/*************************************************************************
* AssocGetPerceivedType [SHLWAPI.@]
@ -281,26 +291,10 @@ static const struct AssocPerceivedInfo* AssocFindByType(LPCWSTR pszType)
* lppszType is optional and it can be NULL.
* if lpType or lpFlag are NULL, the function will crash.
* if lpszExt is NULL, an error is returned.
*
#ifndef __REACTOS__
* BUGS
* Unimplemented.
#endif
*/
HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType,
INT *lpFlag, LPWSTR *lppszType)
{
#ifndef __REACTOS__
FIXME("(%s, %p, %p, %p) not supported\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType);
if (lpszExt == NULL)
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
return E_NOTIMPL;
#else
static const WCHAR PerceivedTypeKey[] = {'P','e','r','c','e','i','v','e','d','T','y','p','e',0};
static const WCHAR SystemFileAssociationsKey[] = {'S','y','s','t','e','m','F','i','l','e',
'A','s','s','o','c','i','a','t','i','o','n','s','\\','%','s',0};
@ -355,8 +349,6 @@ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType,
*lpFlag = 0;
}
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
#endif
}
/*************************************************************************

View file

@ -17,8 +17,19 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#include "precomp.h"
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "objbase.h"
#include "shlobj.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* dwSignature for contained DATABLOCK_HEADER items */
#define CLIST_ID_CONTAINER (~0U)
@ -45,13 +56,8 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
* lpNewItem [I] The new item to add to the list
*
* RETURNS
#ifndef __REACTOS__
* Success: S_OK. The item is added to the list.
* Failure: An HRESULT error code.
#else
* Success: TRUE. The item is added to the list.
* Failure: FALSE.
#endif
*
* NOTES
* If the size of the element to be inserted is less than the size of a
@ -59,32 +65,19 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
* the call returns S_OK but does not actually add the element.
* See SHWriteDataBlockList.
*/
#ifndef __REACTOS__
HRESULT
#else
BOOL
#endif
WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
BOOL WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
{
LPDATABLOCK_HEADER lpInsertAt = NULL;
ULONG ulSize;
TRACE("(%p,%p)\n", lppList, lpNewItem);
if(!lppList || !lpNewItem )
#ifndef __REACTOS__
return E_INVALIDARG;
#else
if(!lppList || !lpNewItem)
return FALSE;
#endif
if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) ||
lpNewItem->dwSignature == CLIST_ID_CONTAINER)
#ifndef __REACTOS__
return S_OK;
#else
return FALSE;
#endif
ulSize = lpNewItem->cbSize;
@ -141,17 +134,9 @@ WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem)
lpInsertAt = NextItem(lpInsertAt);
lpInsertAt->cbSize = 0;
#ifndef __REACTOS__
return lpNewItem->cbSize;
#else
return TRUE;
#endif
}
#ifndef __REACTOS__
return S_OK;
#else
return FALSE;
#endif
}
/*************************************************************************
@ -369,11 +354,7 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList)
*/
BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature)
{
#ifndef __REACTOS__
LPDATABLOCK_HEADER lpList = 0;
#else
LPDATABLOCK_HEADER lpList = NULL;
#endif
LPDATABLOCK_HEADER lpItem = NULL;
LPDATABLOCK_HEADER lpNext;
ULONG ulNewSize;

View file

@ -17,8 +17,22 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#include "precomp.h"
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_PATH
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
#define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f)
#define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0)

View file

@ -18,7 +18,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
extern HINSTANCE shlwapi_hInstance; /* in shlwapi_main.c */

View file

@ -20,18 +20,38 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <winver.h>
#include <winnetwk.h>
#include <mmsystem.h>
#include <shdeprecated.h>
#include <shellapi.h>
#include <commdlg.h>
#include <mlang.h>
#include <mshtmhst.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "wingdi.h"
#include "winuser.h"
#include "winver.h"
#include "winnetwk.h"
#include "mmsystem.h"
#include "objbase.h"
#include "exdisp.h"
#include "shdeprecated.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "shellapi.h"
#include "commdlg.h"
#include "mlang.h"
#include "mshtmhst.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* DLL handles for late bound calls */
extern HINSTANCE shlwapi_hInstance;
@ -78,6 +98,12 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId,
TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
dwAccess, dwOptions);
if (!hShared)
{
TRACE("Returning handle NULL\n");
return NULL;
}
/* Get dest process handle */
if (dwDstProcId == dwMyProcId)
hDst = GetCurrentProcess();

View file

@ -19,7 +19,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winternl.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
#ifdef __REACTOS__
int WINAPI IsNetDrive(int drive);

View file

@ -1,3 +1,4 @@
#ifndef _SHLWAPI_PCH_
#define _SHLWAPI_PCH_
@ -29,6 +30,4 @@
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
#endif /* _SHLWAPI_PCH_ */
#endif /* !_SHLWAPI_PCH_ */

View file

@ -19,7 +19,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "wine/debug.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Key/Value names for MIME content types */
static const char lpszContentTypeA[] = "Content Type";

View file

@ -19,7 +19,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef struct
{

View file

@ -17,10 +17,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef WINE_SHLWAPI_RESOURCE_H
#define WINE_SHLWAPI_RESOURCE_H
#include <windef.h>
#include <winuser.h>
#define IDS_BYTES_FORMAT 64
#define IDS_TIME_INTERVAL_HOURS 65
#define IDS_TIME_INTERVAL_MINUTES 66

View file

@ -19,7 +19,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
DECLSPEC_HIDDEN HINSTANCE shlwapi_hInstance = 0;
DECLSPEC_HIDDEN DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;

View file

@ -23,7 +23,22 @@
* B) Want to use a substandard API to tune its performance.
*/
#include "precomp.h"
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/*************************************************************************
* @ [SHLWAPI.241]

View file

@ -19,11 +19,32 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include "config.h"
#include "wine/port.h"
#include <math.h>
#include <mlang.h>
#include <ddeml.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wingdi.h"
#include "winuser.h"
#include "shlobj.h"
#include "mlang.h"
#include "ddeml.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
extern HINSTANCE shlwapi_hInstance;

View file

@ -18,8 +18,25 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#include "precomp.h"
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#define NO_SHLWAPI_REG
#define NO_SHLWAPI_PATH
#define NO_SHLWAPI_GDI
#define NO_SHLWAPI_STREAM
#define NO_SHLWAPI_USER
#include "shlwapi.h"
#include "shlobj.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */

View file

@ -18,15 +18,30 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <wininet.h>
#include <intshcut.h>
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "wininet.h"
#include "winreg.h"
#include "winternl.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "intshcut.h"
#include "wine/debug.h"
HMODULE WINAPI MLLoadLibraryW(LPCWSTR,HMODULE,DWORD);
BOOL WINAPI MLFreeLibrary(HMODULE);
HRESULT WINAPI MLBuildResURLW(LPCWSTR,HMODULE,DWORD,LPCWSTR,LPWSTR,DWORD);
WINE_DEFAULT_DEBUG_CHANNEL(shell);
static inline WCHAR *heap_strdupAtoW(const char *str)
{
LPWSTR ret = NULL;
@ -902,7 +917,10 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
work = preliminary + base.cchProtocol+1+base.cchSuffix - 1;
if (*work++ != '/')
*(work++) = '/';
strcpyW(work, relative.pszSuffix);
if (relative.pszSuffix[0] == '.' && relative.pszSuffix[1] == 0)
*work = 0;
else
strcpyW(work, relative.pszSuffix);
break;
default:

View file

@ -22,8 +22,16 @@
* to change it in user32 too.
*/
#define WIN32_NO_STATUS
#include <wine/debug.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(string);

View file

@ -174,7 +174,7 @@ reactos/dll/win32/shdoclc # Synced to WineStaging-2.9
reactos/dll/win32/shdocvw # Synced to Wine-3.0
reactos/dll/win32/shell32 # Forked at Wine-20071011
reactos/dll/win32/shfolder # Synced to WineStaging-2.9
reactos/dll/win32/shlwapi # Synced to Wine-3.0
reactos/dll/win32/shlwapi # Synced to WineStaging-3.3
reactos/dll/win32/slbcsp # Synced to WineStaging-2.9
reactos/dll/win32/snmpapi # Synced to WineStaging-2.9
reactos/dll/win32/softpub # Synced to WineStaging-2.9