2 * Win32 heap definitions
4 * Copyright 1996 Alexandre Julliard
14 #include "wine/unicode.h"
17 /* DO NOT USE THEM!! they will go away soon */
19 inline static LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str )
24 if (!str) return NULL;
25 len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
26 ret = HeapAlloc( heap, flags, len * sizeof(WCHAR) );
27 if (ret) MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
31 inline static LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str )
36 if (!str) return NULL;
37 len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
38 ret = HeapAlloc( heap, flags, len );
39 if(ret) WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
43 #endif /* __WINE_HEAP_H */