Open topic with navigation
WTSupported in traditional Synergy on Windows
object = new DotNetObject(assembly, type[, arg ...]])
The returned object instance (@DotNetObject).
The assembly in which this component is found.
An alphanumeric fully qualified type name, which includes the type’s namespace but not its assembly name.
(optional) One or more constructor arguments.
A constructor for the specified type will be invoked based upon the arg arguments passed. See DotNetObject.Call for a description of how arguments are converted to .NET types.
To directly load a System type (for example, System.String) using this API, the corresponding .NET assembly must be loaded in order to retrieve a DotNetAssembly object that corresponds to it, even though this system assembly was already loaded automatically when the CLR was loaded. The search for type is case‑sensitive.
If the type cannot be found in the specified assembly or it is not public, an $ERR_MISSFLD error will occur.
The example below initializes a new instance of System.Windows.Forms.Form. See Sample programs for an example in the context of a complete program.
form = new DotNetObject(asm, "System.Windows.Forms.Form")