How to make sure that the same thread will invoke the com + component in the server machine

I have a COM COM library open inside a COM + application on a remote machine.

There are two functionalities exposed by this component,

  • Initialization
  • ProcessCommand.

This COM component has the rule that a request for a ProcessCommand should always be called from the same thread, which is called the Initialise method (this actually initializes several internal components). Thus, from a remote perspective, how can I make sure that the same thread will be used to call both methods on the server when called from the client computer. Any configurations in the server component help me achieve this?

+4
source share
1 answer

The way to do this is to use the same client instance for the COM + component. In other words, do not instantiate, do not call Initialization, do not drop, and then reinstall, call ProcessCommand, drop. Each "instance" on the client side corresponds to a stream on the server side.

0
source

Source: https://habr.com/ru/post/1432490/


All Articles