Interprocess Communications

The CBFS Shell native proxy DLL ("client") and the CBFS Shell .NET server ("server") communicate using the local-Windows-only RPC "ncalrpc" protocol.

This CBFS Shell RPC channel uses, by default, an endpoint that is common on both sides but specific to the current user desktop. This means that by default, communication is possible only between a "client" and the "server" within the same desktop.

Note: The desktop associated with a given process can be determined by the SessionId property of the .NET's standard System.Diagnostics.Process class.

RPC Endpoint

If you want to deploy the "server" as a Windows service or as server process shared between multiple clients, you should define a fixed or stable endpoint and use that endpoint instead of the default one. For a client, a custom endpoint may be set only when installing the native proxy DLL. This is done by specifying the endpoint name via the configuration settings using the Config method of the CBShellBoost component:

using (var Initializer = new callback.CBFSShell.CBShellBoost())
{
    Config("IpcFormat=MyFixedEndPoint");
    Install(...);
    ...
}

This defines the "client" endpoint.

Now, to make sure the "server" answers to the same endpoint, you should configure it at startup with a .NET code like this:

using (var server = new OverviewShellFolderServer())
{
    var config = new ShellFolderConfiguration();
    config.IpcFormat = "MyFixedEndPoint";
    ...
    server.Start(config);
    ...
}

Multi-User Per-Machine Scenarios

If you want to support multiple users per machine, two scenarios exist.

Scenario 1: The first possibility is one-to-one communication as shown in the following image:


Key points:

  • Each user runs their own CBFS Shell .NET server process. This server process runs in the same desktop session in which both (1) the Explorer processes run and (2) other applications that may open Common Dialogs also run.
  • The CBFS Shell .NET server binary location can be shared by all users (e.g., the server may be installed in Program Files) or may be individual to each user (the server may be installed in a user's private directory, such as %localappdata%), but each user will have to launch the server process, for example, at login time.
There's nothing to configure for this scenario.

Scenario 2: The second possibility is shown in the following image:


Key points:

  • A common CBFS Shell .NET server process must be started independently from users logging in or logging out. It probably will be a Windows service. See the Security Considerations chapter for more on this.
  • A common RPC endpoint must be configured. See the previous "RPC Endpoint" chapter for more information.
  • Custom UI is not supported in this mode.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Shell 2022 .NET Edition - Version 22.0 [Build 8172]