I'm writing a C application and in my code I'm calling the constructor GdipCreateBitmapFromHBITMAP
.
I know the constructor should not be called from C, but I used a "hack" from here "How can I take a screenshot and save it as JPEG on Windows?"
I'm not sure how to release resources that were allocated during the call to GdipCreateBitmapFromHBITMAP
.
I tried finding help in the documentation but found nothing.
ULONG *pBitmap = NULL;
lGdipCreateBitmapFromHBITMAP = (pGdipCreateBitmapFromHBITMAP)GetProcAddress(hModuleThread, "GdipCreateBitmapFromHBITMAP");
lGdipCreateBitmapFromHBITMAP(hBmp, NULL, &pBitmap);
How to I release pBitmap
?
Thanks a lot.