Click here to Skip to main content
15,886,860 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Printing pdf files in batch using VB.net [modified] Pin
_Erik_16-Dec-10 6:12
_Erik_16-Dec-10 6:12 
QuestionDatagridview Pin
kindman_nb13-Dec-10 20:43
kindman_nb13-Dec-10 20:43 
AnswerRe: Datagridview Pin
dan!sh 13-Dec-10 21:18
professional dan!sh 13-Dec-10 21:18 
AnswerRe: Datagridview Pin
Ger Hayden17-Dec-10 11:16
Ger Hayden17-Dec-10 11:16 
AnswerRe: Datagridview Pin
Ger Hayden18-Dec-10 5:22
Ger Hayden18-Dec-10 5:22 
QuestionSystem.Diagnostics.Process.GetProcessesByName Question Pin
gmhanna13-Dec-10 10:10
gmhanna13-Dec-10 10:10 
AnswerRe: System.Diagnostics.Process.GetProcessesByName Question Pin
Not Active13-Dec-10 10:30
mentorNot Active13-Dec-10 10:30 
GeneralRe: System.Diagnostics.Process.GetProcessesByName Question Pin
Brian C Hart13-Dec-10 11:23
professionalBrian C Hart13-Dec-10 11:23 
Only problem is, even if you make sure and call System.InteropServics.Runtime.Marshal.ReleaseComObject() on each and every little object you access with the object model, and call all the cleanup functions of the object correctly, one still finds little EXCEL.EXE's hiding around when you open up Task Manager.

I think it's maybe a COM Subsystem thing, where the system likes to leave the server EXE hanging around when you use COM objects from it -- even if they're properly released -- so that there's less latency the next time you make COM method calls from that same EXE. However, if you're cleaning up Excel every time your application is run and you don't want to have these little orphan instances of EXCEL.EXE hanging around, well, then you want to add this little piece of code back in to your cleanup method:

C#
foreach(System.Diagnostics.Process proc in System.Diagnostics.Process.GetProcessesByName("excel.exe"))
    proc.Kill();


It's not immediately obvious what order the processes come out in. I guess you'll just have to think of a way you can inspect each entry. In the meantime, though, foreach does in a pinch.
Sincerely Yours,
Brian Hart

GeneralRe: System.Diagnostics.Process.GetProcessesByName Question Pin
Pete O'Hanlon13-Dec-10 11:28
mvePete O'Hanlon13-Dec-10 11:28 
AnswerRe: System.Diagnostics.Process.GetProcessesByName Question Pin
_Erik_13-Dec-10 12:55
_Erik_13-Dec-10 12:55 
GeneralRe: System.Diagnostics.Process.GetProcessesByName Question Pin
gmhanna14-Dec-10 3:30
gmhanna14-Dec-10 3:30 
QuestionData Transfer using MAC address [modified] Pin
ganesh_IT12-Dec-10 22:24
ganesh_IT12-Dec-10 22:24 
AnswerRe: Data Transfer using MAC address Pin
Luc Pattyn12-Dec-10 22:47
sitebuilderLuc Pattyn12-Dec-10 22:47 
AnswerRe: Data Transfer using MAC address Pin
Pete O'Hanlon13-Dec-10 1:08
mvePete O'Hanlon13-Dec-10 1:08 
AnswerRe: Data Transfer using MAC address Pin
Dave Kreskowiak13-Dec-10 9:03
mveDave Kreskowiak13-Dec-10 9:03 
GeneralRe: Data Transfer using MAC address Pin
ganesh_IT13-Dec-10 18:01
ganesh_IT13-Dec-10 18:01 
GeneralRe: Data Transfer using MAC address Pin
Dave Kreskowiak13-Dec-10 18:14
mveDave Kreskowiak13-Dec-10 18:14 
Questionapp.Config deployment Pin
Jassim Rahma12-Dec-10 2:39
Jassim Rahma12-Dec-10 2:39 
AnswerRe: app.Config deployment Pin
Estys12-Dec-10 3:04
Estys12-Dec-10 3:04 
AnswerRe: app.Config deployment Pin
Not Active12-Dec-10 3:38
mentorNot Active12-Dec-10 3:38 
Questionmultiple project assembly Pin
Jassim Rahma12-Dec-10 2:37
Jassim Rahma12-Dec-10 2:37 
AnswerRe: multiple project assembly Pin
Not Active12-Dec-10 3:32
mentorNot Active12-Dec-10 3:32 
GeneralRe: multiple project assembly Pin
Jassim Rahma13-Dec-10 2:42
Jassim Rahma13-Dec-10 2:42 
GeneralRe: multiple project assembly Pin
Not Active13-Dec-10 3:29
mentorNot Active13-Dec-10 3:29 
AnswerRe: multiple project assembly Pin
Abhinav S18-Dec-10 5:32
Abhinav S18-Dec-10 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.