| UtilMarshalHelperGetActiveObject Method |
Obtains a running instance of the specified object from the running object table (ROT).
Namespace: QsInformatica.UtilsAssembly: QsInformatica.Utils (in QsInformatica.Utils.dll) Version: 27.2.0
Syntax public static Object GetActiveObject(
string progId,
bool throwOnError = false
)
Public Shared Function GetActiveObject (
progId As String,
Optional throwOnError As Boolean = false
) As Object
public:
static Object^ GetActiveObject(
String^ progId,
bool throwOnError = false
)
static member GetActiveObject :
progId : string *
?throwOnError : bool
(* Defaults:
let _throwOnError = defaultArg throwOnError false
*)
-> Object
Parameters
- progId String
- The programmatic identifier (ProgID) of the object that was requested.
- throwOnError Boolean (Optional)
[Missing <param name="throwOnError"/> documentation for "M:QsInformatica.Utils.Util.MarshalHelper.GetActiveObject(System.String,System.Boolean)"]
Return Value
ObjectThe object that was requested; otherwise null.
Exceptions Remarks
Implementation of [Marshal.GetActiveObject](https://learn.microsoft.com/it-it/dotnet/api/system.runtime.interopservices.marshal.getactiveobject?view=netframework-4.8#system-runtime-interopservices-marshal-getactiveobject(system-string))
that works for .NET core 3.1+ on Windows.
Source: https://stackoverflow.com/a/64826127
See Also