Re: COM object data persistence

From: Kim Gräsman (kim_at_mvps.org)
Date: 04/21/04


Date: Wed, 21 Apr 2004 19:12:28 +0200

Hi Frank,

> But when I tried to use my Window Service COM client to access that
> common data, I found the common data is not the same as the VB, MFC
> clients accessed. Also when I looked at Task Manager, I found my EXE
> was running in two copies(two processes). So why would this happen? I
> guess it related to Terminal/Desktop or User account context problem.
> But my service is running in the same account as my VB, MFC client.
>
> I don't understand that in what situation the system will load the
> COM exe again while there is already one copy running in the system?

It sounds like your service isn't configured as a service.

ATL services have the somewhat weird option of being registered either as
regular out-of-process COM servers (with /regserver) or as services (with
/service) - which did you do?

Also, I believe you need to register your class objects with the
REGCLS_MULTIPLEUSE flag (see call to _Module.RegisterClassObjects)

-- 
Best regards,
Kim Gräsman


Relevant Pages

  • Registering a CLSID in MFC application
    ... My project is a MFC multidoc application. ... interfaces so that the application can cater the needs of the clients ... Where I should and what code must i add to register it. ...
    (microsoft.public.vc.mfc)
  • Registering a CLSID in MFC application
    ... My project is a MFC multidoc application. ... interfaces so that the application can cater the needs of the clients ... Where I should and what code must i add to register it. ...
    (microsoft.public.vc.atl)
  • Re: connect my MFC application to some web interfaces
    ... yes, I want the MFC app on my server, and the clients just have a simple web form to enter some parameters and read some messages.I need the MFC app to have some low level operations. ... I can call my internal MFC functions through the web interface? ...
    (microsoft.public.vc.mfc)
  • Re: COM object data persistence
    ... COM Class member, it works well while I used several MFC, VB clients to ... access that common data. ... Also when I looked at Task Manager, I found my EXE was running in ... >> As long as your service process doesn't terminate, ...
    (microsoft.public.vc.atl)
  • Re: is MFC
    ... If you are writing server code then you probably should use the .Net ... MFC is best for clients, especially clients that need to run efficiently on ... MFC is not outdated for people who care about performance and efficiency, ...
    (microsoft.public.vc.mfc)

Loading