Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

kill hidden process (excel)

Status
Not open for further replies.

DamerBullet

Programmer
Dec 13, 2001
4
US
Hi guys,
Just have a quick question. How do you kill a hidden process (i.e. OLE appllication [Excel] created during run-time.)?
I've been using the code below. But to no avail...
////////////////////////////////////////////////////////////
// Check if Excel instance in already running
boolean lb_rtn
ulong ll_handle, lul_class
// hex value of wm_quit is 0x0012. Converted dec value is 18.
UInt lui_quit = 18

SetNull(lul_class)

//ll_handle = FindWindowA( "XLMAIN", "Microsoft Excel" )
ll_handle = FindWindowA( lul_class, "Microsoft Excel" )
//ll_handle = GetModuleHandleA("EXCEL.EXE")
DO WHILE ll_handle <> 0
gnv_app.Of_GetFrame().SetMicrohelp( &quot;Excel instance found in memory. Trying to clear instance... &quot; )
// lb_rtn = CloseHandle(ll_handle)
PostMessageA( ll_handle, lui_quit, 0, 0 );
gnv_app.Of_GetFrame().SetMicrohelp( &quot;Excel instance was in memory...now cleared&quot; )
LOOP
////////////////////////////////////////////////////////////
TIA
 
Hi Tia

Did u try this
execremote(&quot;[quit()]&quot;,&quot;excel&quot;,&quot;system&quot;)

Bkamalesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top