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.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,760 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 118K 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.