in reply to Fork in Win32 environment

I don't fully grasp why your code fails. I think as fork is emulated by threading, both child and parent attempt to hang on to the same object, and free it when they are finished, so the problems start as soon as one of them (the child) exits. Yet the child makes no use of the OLE object, so it really is a pity. Ideally, you ought to be able to relinquish the OLE object without actually freeing it.

If this is about all that your child does, perhaps you should think of using Win32::Process to run the child with the messagebox in a completely independent process. You can use They didn't give me a fork so I have to eat with a spawn. as sample code for the setup.

You may have to add extra code to resynchronize parent and child after both have finished with their respective tasks, but there's a lot of methods available in Win32::Process to that effect for use in the parent, most notably Wait; so the parent will not go on beyond your loop before the button on the messagebox is pushed.