NO

Author Topic: How to best check if HeapAlloc() call was successful?  (Read 2916 times)

Snowman

  • Guest
How to best check if HeapAlloc() call was successful?
« on: April 24, 2015, 11:47:51 AM »
Hello, I am currently using HeapAlloc() in my program instead of malloc().
I need to check if the memory was correctly allocated. What should I do?
  • Check the return value of HeapAlloc()?
  • Use Structured Exception Handling (SEH)?
  • Use malloc() instead (and check its return value).

Sam Steele

  • Guest
Re: How to best check if HeapAlloc() call was successful?
« Reply #1 on: June 21, 2015, 04:37:11 PM »
Check the return value of HeapAlloc