question

Misbah avatar image
0 Votes"
Misbah asked Viorel-1 edited

exception thrown. Access violation reading Location

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++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered Viorel-1 edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.