3 #undef WIN32_LEAN_AND_MEAN
8 // global variables in a dll are process-global
9 HANDLE hProcessHeap = NULL;
12 HEAP_alloc ( DWORD len )
14 /* make sure hProcessHeap gets initialized by GdiProcessSetup before we get here */
16 return RtlAllocateHeap ( hProcessHeap, 0, len );
20 HEAP_strdupA2W ( LPWSTR* ppszW, LPCSTR lpszA )
27 return STATUS_SUCCESS;
28 len = lstrlenA(lpszA);
30 *ppszW = HEAP_alloc ( (len+1) * sizeof(WCHAR) );
32 return STATUS_NO_MEMORY;
33 Status = RtlMultiByteToUnicodeN ( *ppszW, len*sizeof(WCHAR), NULL, (PCHAR)lpszA, len );
34 (*ppszW)[len] = L'\0';
40 HEAP_free ( LPVOID memory )
42 /* make sure hProcessHeap gets initialized by GdiProcessSetup before we get here */
45 RtlFreeHeap ( hProcessHeap, 0, memory );