默认的ATL EXE服务器使用REGCLS_MULTIPLEUSE标志,从而使得一个服务器可以同时为不同的客户端提供服务。当针对每个客户端需要在服务器上保留一定的状态信息时,必须提供某种方法来保存客户端的信息。请问一般使用什么方法来表示客户端?

解决方案 »

  1.   

    there are following ways to maintain the object state in DCOM or COM+:1.State maintained by the client and passed to objects as parameters 2.Per-object transient state, maintained in object member variables 3.Shared transient state, maintained in shared memory 4.Persisted state, maintained in a persistent data store and retrieved using a key value passed as a parameter to an object
      

  2.   

    and normally,passing the state to the client is the simple way, and when next invoking,you can pass the state as paramters.