DamerBullet
Programmer
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( "Excel instance found in memory. Trying to clear instance... " )
// lb_rtn = CloseHandle(ll_handle)
PostMessageA( ll_handle, lui_quit, 0, 0 );
gnv_app.Of_GetFrame().SetMicrohelp( "Excel instance was in memory...now cleared" )
LOOP
////////////////////////////////////////////////////////////
TIA
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( "Excel instance found in memory. Trying to clear instance... " )
// lb_rtn = CloseHandle(ll_handle)
PostMessageA( ll_handle, lui_quit, 0, 0 );
gnv_app.Of_GetFrame().SetMicrohelp( "Excel instance was in memory...now cleared" )
LOOP
////////////////////////////////////////////////////////////
TIA