Excel.exe is not getting killed implicitly
-
Hi, I am working on Excel automation using VC++(unmanaged). imports: #import "libid:00020813-0000-0000-C000-000000000046" auto_search no_dual_interfaces \ rename("DialogBox", "excelDialogBox") \ rename("RGB", "excelRGB") \ rename("DocumentProperties", "excelDocumentProperties") \ rename("SearchPath", "excelSearchPath") \ rename("CopyFile", "excelCopyFile") \ rename("ReplaceText", "excelReplaceText") Following are the two issues: 1. Whenever Excel is closed , Excel.EXE is not getting closed. My application should track opening and closing of Excel. I released application pointer(Excel::_ApplicationPtr) but same problem. I googled and got few solutions, but nothing worked. I tried : Excel::_ApplicationPtr XL. And getting the active object of excel using GetActiveObject. XL->Quit(); XL->Release(); XL = NULL; but none of these worked. Is there any similar method like Marshal.ReleaseComObject in UNmanaged VC++? 2. Is there any callback which tracks excel.exe is closed? Please give me clue to solve these issues. Regards, KTTransfer.
-
Hi, I am working on Excel automation using VC++(unmanaged). imports: #import "libid:00020813-0000-0000-C000-000000000046" auto_search no_dual_interfaces \ rename("DialogBox", "excelDialogBox") \ rename("RGB", "excelRGB") \ rename("DocumentProperties", "excelDocumentProperties") \ rename("SearchPath", "excelSearchPath") \ rename("CopyFile", "excelCopyFile") \ rename("ReplaceText", "excelReplaceText") Following are the two issues: 1. Whenever Excel is closed , Excel.EXE is not getting closed. My application should track opening and closing of Excel. I released application pointer(Excel::_ApplicationPtr) but same problem. I googled and got few solutions, but nothing worked. I tried : Excel::_ApplicationPtr XL. And getting the active object of excel using GetActiveObject. XL->Quit(); XL->Release(); XL = NULL; but none of these worked. Is there any similar method like Marshal.ReleaseComObject in UNmanaged VC++? 2. Is there any callback which tracks excel.exe is closed? Please give me clue to solve these issues. Regards, KTTransfer.