Commit 6664991f authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

shell32: Move strndupW to dde.c.

parent 2dcc5a70
......@@ -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))
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment