mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:10:36 +00:00
hlink: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
af0e0d9b62
commit
b14dffa60c
|
@ -3,6 +3,8 @@ IMPORTLIB = hlink
|
|||
IMPORTS = uuid shell32 ole32 advapi32
|
||||
DELAYIMPORTS = urlmon
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
browse_ctx.c \
|
||||
extserv.c \
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,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;
|
||||
|
@ -40,7 +39,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);
|
||||
}
|
||||
|
@ -55,7 +54,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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue