Get the process id of the process started using CreateObject in .NET.

I am using VB.NET for a web application that starts some process using CreateObject, for example:

Dim AVObject = CreateObject("avwin.application")

After everything is done, everything is closed and stopped using the appropriate release functions, however, for some reason, the process remains.

Is there a way by which I can get the process id of the running process to explicitly kill it before terminating?

thank

+3
source share
2 answers

, ( , )

  • CreateObject, , CustomCreateObject (...)
  • , ,
  • Call System.Diagnostics.Process.GetProcessesByName(nameOfYourProcess)
  • CreateObject (...)
  • GetProcessesByName
  • , , , , . , .
+2

, , , - .

GC ReleaseCOMObject() ?

+1

Source: https://habr.com/ru/post/1736625/


All Articles