Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

windows9x app problem

Intel_C_Intel
Employee
480 Views
I have this windows app which creates an EnhMetafile which it uses in request to the WM_PAINT message via a call to PlayEnhMetafile().
My problem is, on winNT and 2000 it works OK, however on win9x systemresources are gobbled up just by hiding and raising the window.
What might be the problem?
/Bjorn
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
480 Views
Windows 9x and NT GDIs work quite differently, one of differences being total available limit for resources (IIRC only 64K on 9x, much more on NT). That, however, does not change the fact that you have resource leaks in your metafile. My guess is that you don't DeleteObjects properly (at all?) when creating metafile -- that failure "passes through" PlayEnhMetaFile. You must DeleteObject for all GDI objects you create at the end.

www.systeminternals.com has useful tools to detect memory leaks. I think latest version of Process Explorer can do it (I'm not sure, but check other tools).
0 Kudos
Reply