>I have a VFP MTDLL, and I am instancing MSXML2.FreeThreadedDOMDocument in places to format my CursorToXML() output. I think I am getting a speed penalty because I am creating/destroying it all the time. My MTDLL is living inside a discrete COM+ package and I have it set to stay in memory "forever". Is there a way inside VFP to do the same thing, so I only have to instance the DOM object once?
>
>Thanks.
Steve,
If you don't call SetComplete/SetAbort then your object has state and remains in memory until you release it. If that is the case, then you may be able to create an instance of the MSXML2.FreeThreadedDOMDocument and store it to a property of the VFP object in the Init or a mthod called from the Init. You could then reference it anywhere in your object. It wouldn't be released until your object was released and you performed the cleanup.
If you are calling SetComplete/SetAbort in your VFP object to provide for statelessness then you are out of luck. The proxy object may remain in COM+ forever, but the actual VFP object is continually created and destroyed (thereby creatig and destroying the XML object).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao