[HLINK] Sync with Wine Staging 4.18. CORE-16441

This commit is contained in:
Amine Khaldi 2019-11-02 18:30:25 +01:00
parent a63678c9a9
commit 61d79795bd
5 changed files with 13 additions and 15 deletions

View file

@ -19,7 +19,6 @@
#include "hlink_private.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(hlink);
@ -243,7 +242,7 @@ static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR
if (!pwzAdditionalHeaders)
return S_OK;
len = strlenW(pwzAdditionalHeaders);
len = lstrlenW(pwzAdditionalHeaders);
if(len && pwzAdditionalHeaders[len-1] != '\n' && pwzAdditionalHeaders[len-1] != '\r') {
static const WCHAR endlW[] = {'\r','\n',0};

View file

@ -119,7 +119,7 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
if (pwzTarget)
{
hash = strchrW(pwzTarget, '#');
hash = wcschr(pwzTarget, '#');
if (hash)
{
if (hash == pwzTarget)
@ -280,11 +280,11 @@ HRESULT WINAPI HlinkIsShortcut(LPCWSTR pwzFileName)
if(!pwzFileName)
return E_INVALIDARG;
len = strlenW(pwzFileName)-4;
len = lstrlenW(pwzFileName)-4;
if(len < 0)
return S_FALSE;
return strcmpiW(pwzFileName+len, url_ext) ? S_FALSE : S_OK;
return wcsicmp(pwzFileName+len, url_ext) ? S_FALSE : S_OK;
}
/***********************************************************************
@ -389,7 +389,7 @@ HRESULT WINAPI HlinkParseDisplayName(LPBC pibc, LPCWSTR pwzDisplayName, BOOL fNo
if(fNoForceAbs)
FIXME("Unsupported fNoForceAbs\n");
if(!strncmpiW(pwzDisplayName, file_colonW, ARRAY_SIZE(file_colonW))) {
if(!_wcsnicmp(pwzDisplayName, file_colonW, ARRAY_SIZE(file_colonW))) {
pwzDisplayName += ARRAY_SIZE(file_colonW);
eaten += ARRAY_SIZE(file_colonW);
@ -409,7 +409,7 @@ HRESULT WINAPI HlinkParseDisplayName(LPBC pibc, LPCWSTR pwzDisplayName, BOOL fNo
hres = CreateFileMoniker(pwzDisplayName, ppimk);
if(SUCCEEDED(hres))
*pcchEaten = eaten + strlenW(pwzDisplayName);
*pcchEaten = eaten + lstrlenW(pwzDisplayName);
return hres;
}

View file

@ -30,7 +30,6 @@
#include "hlink.h"
#include "wine/heap.h"
#include "wine/unicode.h"
extern HRESULT HLink_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
extern HRESULT HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
@ -42,7 +41,7 @@ static inline LPWSTR hlink_strdupW(LPCWSTR str)
if(str) {
DWORD size;
size = (strlenW(str)+1)*sizeof(WCHAR);
size = (lstrlenW(str)+1)*sizeof(WCHAR);
ret = heap_alloc(size);
memcpy(ret, str, size);
}
@ -57,7 +56,7 @@ static inline LPWSTR hlink_co_strdupW(LPCWSTR str)
if(str) {
DWORD size;
size = (strlenW(str)+1)*sizeof(WCHAR);
size = (lstrlenW(str)+1)*sizeof(WCHAR);
ret = CoTaskMemAlloc(size);
memcpy(ret, str, size);
}

View file

@ -242,7 +242,7 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface,
CreateBindCtx( 0, &pbc);
IMoniker_GetDisplayName(This->Moniker, pbc, NULL, &display_name);
IBindCtx_Release(pbc);
This->absolute = display_name && strchrW(display_name, ':');
This->absolute = display_name && wcschr(display_name, ':');
CoTaskMemFree(display_name);
}
}
@ -290,7 +290,7 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface,
if (FAILED(r))
{
LPCWSTR p = strchrW(pwzTarget, ':');
LPCWSTR p = wcschr(pwzTarget, ':');
if (p && (p - pwzTarget > 1))
r = CreateURLMoniker(NULL, pwzTarget, &pMon);
else
@ -739,7 +739,7 @@ static HRESULT write_hlink_string(IStream *pStm, LPCWSTR str)
TRACE("(%p, %s)\n", pStm, debugstr_w(str));
len = strlenW(str) + 1;
len = lstrlenW(str) + 1;
hr = IStream_Write(pStm, &len, sizeof(len), NULL);
if (FAILED(hr)) return hr;
@ -752,7 +752,7 @@ static HRESULT write_hlink_string(IStream *pStm, LPCWSTR str)
static inline ULONG size_hlink_string(LPCWSTR str)
{
return sizeof(DWORD) + (strlenW(str) + 1) * sizeof(WCHAR);
return sizeof(DWORD) + (lstrlenW(str) + 1) * sizeof(WCHAR);
}
static HRESULT read_hlink_string(IStream *pStm, LPWSTR *out_str)

View file

@ -71,7 +71,7 @@ dll/win32/fontsub # Synced to WineStaging-2.9
dll/win32/fusion # Synced to WineStaging-4.18
dll/win32/gdiplus # Synced to WineStaging-4.0
dll/win32/hhctrl.ocx # Synced to WineStaging-4.18
dll/win32/hlink # Synced to WineStaging-4.0
dll/win32/hlink # Synced to WineStaging-4.18
dll/win32/hnetcfg # Synced to WineStaging-4.18
dll/win32/httpapi # Synced to WineStaging-3.3
dll/win32/iccvid # Synced to WineStaging-4.0