I am using Powershell to test a call to a COM object method. Due to poor design / coding / everything, this method of a COM object just hangs when it makes errors. My default instinct is to control + c, but this does not work. Should I kill Powershell in order to kill a call to a COM method labeled COM?
Thanks in advance.
Are you calling a method on a COM object that lives in the address space of a PowerShell process? If yes, then yes, you must kill PowerShell to cancel the call.
, AppDomains .
, . , COM- . , , COM , . , . .Abort() , .
pskill.
You may try:
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($obj)
Or move the process to Stop-Process, adding -Force can also help.
Source: https://habr.com/ru/post/1711588/More articles:my vs2008 addin for text formatting is awfully slow - code-formattingCan I use a column number instead of a column name in which the query selection condition in SQL Server 2005? - sqlhow to restart one instance winforms application - c #Visual Studio testing tools compared to third-party tools - unit-testingNHibernate mapping for System.Drawing.Color - nhibernate.NET: How to get ActiveCaptionText color at maximize window? - .netSignature text active color - change detection (in .Net) - user-interfaceOpening an Excel distribution sheet in .NET on x64 - .netHow to change / usr / bin / env? - ruby | fooobar.comStop ColdFusion from sorting my structures / arrays - coldfusionAll Articles