shell32: Move strndupW to dde.c.

This commit is contained in:
Alex Henrie 2022-10-14 09:51:08 -06:00 committed by Alexandre Julliard
parent 2dcc5a7026
commit 6664991f24
2 changed files with 13 additions and 13 deletions

View file

@ -54,6 +54,19 @@ static const char *debugstr_hsz( HSZ hsz )
return debugstr_w( buffer );
}
static WCHAR *strndupW(const WCHAR *src, DWORD len)
{
WCHAR *dest;
if (!src) return NULL;
dest = heap_alloc((len + 1) * sizeof(*dest));
if (dest)
{
memcpy(dest, src, len * sizeof(WCHAR));
dest[len] = '\0';
}
return dest;
}
static inline BOOL Dde_OnConnect(HSZ hszTopic, HSZ hszService)
{
if ((hszTopic == hszProgmanTopic) && (hszService == hszProgmanService))

View file

@ -241,19 +241,6 @@ static inline WCHAR *strdupW(const WCHAR *src)
return dest;
}
static inline WCHAR *strndupW(const WCHAR *src, DWORD len)
{
WCHAR *dest;
if (!src) return NULL;
dest = heap_alloc((len + 1) * sizeof(*dest));
if (dest)
{
memcpy(dest, src, len * sizeof(WCHAR));
dest[len] = '\0';
}
return dest;
}
static inline WCHAR *strdupAtoW(const char *str)
{
WCHAR *ret;