exception thrown. Access violation reading Location

Misbah 21 Reputation points
2021-03-24T08:26:00.147+00:00

After running for almost half an hour my program throws an exception.

  1. dadc = GetDC();
  2. dadc->FillRgn();

It throws exception at line 2. How to handle it??

Regards.

Developer technologies C++
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 122.5K Reputation points
    2021-03-24T08:34:13.063+00:00

    Maybe GedDC returned NULL due to insufficient resources, because you did not free or did not manage correctly some GDI objects.

    Check if dadc is valid and show more details.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.