heap: fix RtlHeapReAllocate()

Eric Pouech pouech-eric at wanadoo.fr
Fri Nov 21 14:21:27 CST 2003


> +static inline HANDLE ntdll_get_process_heap(void)
> +{
> +    return NtCurrentTeb()->Peb->ProcessHeap;
> +}
> +
> +static void test_realloc( void )
> +{
> +    void *mem = NULL;
> +
> +    mem = RtlReAllocateHeap(ntdll_get_process_heap(), 0, mem, 10);
> +    ok(mem == NULL, "memory allocated");
> +}
> +
> +START_TEST(heap)
> +{
> +    test_realloc();
> +}
> 
> 
this will not compile on Win9x. You have to take care of:
- ntdll not being present => dyn load ntdll & GetProcAddress
- ntdll's internals not being present => use GetProcessHeap

A+

-- 
Eric Pouech




More information about the wine-patches mailing list