Re: heap: fix RtlHeapReAllocate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+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



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux