[fpc-pascal] help with synapse mime routines...

waldo kitty wkitty42 at windstream.net
Wed Feb 16 16:11:15 CET 2011


i'm trying to work with the synapse mime library but am running into a bit of a 
problem... i'm an old procedural type coder from the TP3 to TP6 days... it has 
been a long time since i've done much of anything with objects and i've 
forgotten a lot more than i remember... i've not done any delphi coding at all...

so, i'm starting with source\demo\FreePascal\testmime.pas because it reads an 
email message from a text file, processes it a bit and then saves a new copy to 
another text file... what i'm trying to add to this, so as to understand how the 
library works and can be used, is how to step thru the parts of a multipart 
message and work with each individual part...

currently i have something that determines that we are working with a multipart 
message and branches to another routine... in this other routine, we create 
another object for the part, process it just like in the main part, then destroy 
the object as we loop back for the next part... i'm able to see what each part 
is (text, html, etc) and display some info on them BUT when we drop back out of 
the multipart routine and get back to the main section, we get an access 
violation on destroying the initial object at the end of the program 
execution... if i do not destroy the secondary objects in the multipart routine, 
this access violation does not occur...

attached is the mess i'm working with... yes, it is peppered with writeln's so 
as to try to see what's going on where and when since there is no debugger 
support in the fpc i'm working with so i cannot see the contents of the 
variables like i'm so extremely used to doing in the TP/BP IDEs...


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testmime.pas
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110216/3bb86716/attachment.ksh>


More information about the fpc-pascal mailing list