hlink: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-05 08:37:02 +02:00
parent af0e0d9b62
commit b14dffa60c
5 changed files with 14 additions and 14 deletions

View File

@ -3,6 +3,8 @@ IMPORTLIB = hlink
IMPORTS = uuid shell32 ole32 advapi32 IMPORTS = uuid shell32 ole32 advapi32
DELAYIMPORTS = urlmon DELAYIMPORTS = urlmon
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
browse_ctx.c \ browse_ctx.c \
extserv.c \ extserv.c \

View File

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

View File

@ -119,7 +119,7 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
if (pwzTarget) if (pwzTarget)
{ {
hash = strchrW(pwzTarget, '#'); hash = wcschr(pwzTarget, '#');
if (hash) if (hash)
{ {
if (hash == pwzTarget) if (hash == pwzTarget)
@ -280,11 +280,11 @@ HRESULT WINAPI HlinkIsShortcut(LPCWSTR pwzFileName)
if(!pwzFileName) if(!pwzFileName)
return E_INVALIDARG; return E_INVALIDARG;
len = strlenW(pwzFileName)-4; len = lstrlenW(pwzFileName)-4;
if(len < 0) if(len < 0)
return S_FALSE; 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) if(fNoForceAbs)
FIXME("Unsupported fNoForceAbs\n"); 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); pwzDisplayName += ARRAY_SIZE(file_colonW);
eaten += 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); hres = CreateFileMoniker(pwzDisplayName, ppimk);
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
*pcchEaten = eaten + strlenW(pwzDisplayName); *pcchEaten = eaten + lstrlenW(pwzDisplayName);
return hres; return hres;
} }

View File

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

View File

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