Waldo,

You are assigning an OnWalkPart hook procedure to the m1 mimepart you
have created,  not the mimepart you actually end up freeing. It does
not look like the tc.ph procedure is called from the m1 mimeparts
(which is what I would expect). If you do need to use the tc.ph on the
individual m1 parts, it will need to be setup after m1 :=
m.GetSubPart(MyPart - 1);

The code does not actually use the first m1 so it could be removed
including the try finally and the free code. You will also need to
remove the m1 := m.GetSubPart(MyPart - 1) line too.

The reason that it works the first time is that when you enter the
loop m1 is valid. you then set the hook proc up even though this is
not the m1 you actually end up using. You then assign a new mimepart
to m1, use it and free it at the end of the loop. Second time through,
m1 refers to the mimepart for the first sub part which you just freed
at the end of the loop and you attempt to use that mimpart to set the
hook again but as it has already been freed you get the exception.

I think I have that right. I am working from memory now as I do not
have the code before me.

Regards

Kevin Jesshope - In Touch Computer Support




>>> can anyone assist with the reason for the exception?? i'm using the last
>>> release code of synapse (download zip archive) with FPC 2.4.3...
>>> currently
>>> on win32...
>>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to