Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFp, WP8
Message
From
26/08/1998 11:45:20
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00129837
Message ID:
00130111
Views:
34
>>Still doesn't work.. What abour processes? I think rather than threads it's leaving processes open. I went through the Word Perfect OLE commands and it didn't have one(that I could find) for destroying other processes/threads. This situation is becoming a rather large annoyance. The way some of my customers use the app, it winds up with 8 or 9 processes left open. Word behaves fine in this instance (but not as well as WP in others ; ) ) I'm lost here. Anyboody have any ideas?
>
>Hi Joe,
>
>You can call me a dunce if you like on this. I'll even put on the cap <:-). Anyway, please bear with me on this, and, if you don't mind, answer a couple of questions.
>
>1. What's spawning the additional threads? Interaction with WP's OLE commands, or are they created by multiple calls to CREATEOBJECT()? The reason I ask is that it is WP's job to clean up after itself. If it's one CREATEOBJECT() then subsequent calls to the interface, then when that object is destroyed WP should close everthing up.
>
>2. If there's any sort of consistency to the additional title bars, have you tried using Is_Run32 to get the window handle, then sending a WM_QUIT or other message to them via SendMessage()?


Here's my code with explanation

objWP = CreateObject("WordPerfect.PerfectScript")
rc=objWP.AppRestore
rc=objWP.type(checkme)
rc=objWP.Display(1)
rc=objWP.WPSpeller
wc=messagebox("Click OK when spell check complete",64,"Click when finished")
rc=objWP.Display(0)
rc=objWP.SelectAll
rc=objWP.EditCut
stash=_CLIPTEXT
rc=objWP.CloseNoSave
rc=objWP.ExitWordPerfect() &&this doesn't release WP or close it, but is
* necessary
rc=objWP.Quit &&threads and both must be released
rc=objWP.Quit &&just in case
rc=objWP.Quit &&just in case
rc=objWP.Quit &&just in case
objWP="" &&remove the Object from memory

As you can see I only do one createobject(). Word Perfect doesn't always leave threads open, but when it does it leaves a wpwin8 and a ps80. wpwin8 is a Word Perfect process/thread and ps80 is Perfect Script. It does replicate every time, even though the same code is run and I do the exact same sequences while in WP. This is the code before I tried is_run32. Is_Run32 found one of the 2 threads(ps80) but not the other. Also the objWP.quit statement does destroy the perfectscript(ps80) thread/process. The ExitWordPerfect() statement is _susposed_ to close WP but it doesn't. Also quit is not listed as a valid WP OLE command, but it does close it _sometimes_. IS this what you wanted?

Haven't tried Sendmessage yet.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform