Article View: borland.public.cppbuilder.nativeapi
Article #16945Re: Metafile parsing
From: Adam Versteegen
Date: Wed, 16 Apr 2003 03:02
Date: Wed, 16 Apr 2003 03:02
29 lines
2300 bytes
2300 bytes
Joe C. Hecht wrote: > We tried using EnumEnhMetaFile (and the non-enhanced version) for a simple > metafile that would lock up 95/98 and ME machines. Turned out the even loading > the metafile (without eenumerating) using Windows functions would result in severe > memory leaks. > > We feel it is best to read the file raw, and enumerate them yourself (although the docs are > often incomplete or totally incorrect). > > Joe I'd actually check the metafile you're using as opposed to the metafile functions.... I've had no problems with the functions (and use them quite heavily) provided that the metafiles i'm using are ok. Adobe Illustrator is one application that produces bodgy files. Unless you get down to the nitty gritty and make sure that it is freeing all it creates, if you try repeatedly drawing these metafiles using any of the API calls you will notice GDI resources vanishing before your eyes (which will lead to lockups). I've found that metafiles that I create myself (using VCL components) are fine and do follow all the proper rules. If you do an enum on an illustrator file, you can see from the records it spits out that they fail to clean up after themselves... Other programs may do the same. Vesty.
Technical Details
Message-ID:
<3e9cc7e0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3E99E8E7.9023C1E0@aol.com> <3e99f91c@newsgroups.borland.com> <3e9cc69a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6812a614b7c2d50b X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-15 20:07:07 PST From: "Adam Versteegen" <no@email.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3E99E8E7.9023C1E0@aol.com> <3e99f91c@newsgroups.borland.com> <3e9cc69a$1@newsgroups.borland.com> Subject: Re: Metafile parsing Date: Wed, 16 Apr 2003 13:02:45 +1000 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 202.44.163.45 Message-ID: <3e9cc7e0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1050462176 202.44.163.45 (15 Apr 2003 20:02:56 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail