Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

windows9x app problem

Intel_C_Intel
Employee
694 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
694 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