Header menu logo Xanthos

ComClientFactory Module

Functions and values

Function or value Description

isComAvailable ()

Full Usage: isComAvailable ()

Parameters:
    () : unit

Returns: bool

Checks if COM is available by attempting to create and immediately dispose a client.

This function properly releases the COM reference after checking availability to prevent RCW (Runtime Callable Wrapper) leaks.

() : unit
Returns: bool

tryCreate useJvGets

Full Usage: tryCreate useJvGets

Parameters:
    useJvGets : bool option - Optional flag to use JVGets API instead of JVRead. When None, falls back to environment variables (XANTHOS_USE_JVREAD opt-out, XANTHOS_USE_JVGETS legacy).

Returns: Result<IJvLinkClient, ComFault> Ok with the client on success, or Error with details on failure.

Attempts to create a COM-backed JV-Link client.

Important: JV-Link COM server only runs in 32-bit (x86) processes. Attempting to create a client from a 64-bit process will fail with REGDB_E_CLASSNOTREG because the COM server is not registered for 64-bit.

Ensure your application targets x86 or AnyCPU with "Prefer 32-bit" enabled.

useJvGets : bool option

Optional flag to use JVGets API instead of JVRead. When None, falls back to environment variables (XANTHOS_USE_JVREAD opt-out, XANTHOS_USE_JVGETS legacy).

Returns: Result<IJvLinkClient, ComFault>

Ok with the client on success, or Error with details on failure.

Type something to start searching.