[shell32]

- Fix some compilation issues with msc

svn path=/branches/cmake-bringup/; revision=50708
This commit is contained in:
Giannis Adamopoulos 2011-02-15 16:01:02 +00:00
parent 0020a48e12
commit 6fb6b3dc44

View file

@ -187,9 +187,13 @@ static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWor
/* strdup on the process heap */ /* strdup on the process heap */
static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
{ {
INT len;
LPWSTR p;
assert(str); assert(str);
INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) ); len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
p = HeapAlloc( heap, flags, len*sizeof (WCHAR) );
if( !p ) if( !p )
return p; return p;
MultiByteToWideChar( CP_ACP, 0, str, -1, p, len ); MultiByteToWideChar( CP_ACP, 0, str, -1, p, len );