Global properties set in Server accessible by Clients 
Author Message
 Global properties set in Server accessible by Clients

I am having no luck trying to setup global, server wide properties that I
set in my server and then access in my clients without having an instance of
any interface pointers to server COM objects.

I tried using both the MODULE and GLOBAL techniques and was unsuccessful
with both. Everything looked OK in my server, but my clients could never get
access to these global properties that showed up in the Typelib under Global
when using VB's ObjectViewer.

Here is my interface definition from my idl file:
[
  uuid(87ED9628-BE58-4cc1-9CCD-6C59EA6119EE),
  dual,
  hidden,
  nonextensible,
  helpstring("_Global Interface"),
  helpcontext(Application_object),
  pointer_default(unique)
 ]
 interface _Global : IDispatch
 {
  [propget, id(1), helpstring("Property ActiveApplication"), helpcontext(0)]
HRESULT ActiveApplication([out, retval] IApplication* *pIApplication);
  [propput, id(1), helpstring("Property ActiveApplication"), restricted]
HRESULT ActiveApplication([in] IApplication* pIApplication);
 };

Here is my coclass definition from the Library section of the idl file:
[
  uuid(49DA7A61-14DE-4e4c-A837-BD5C7C15CCC0),
  helpstring("Global Class"),
  helpcontext(Worksheet_IO_Automation_objects),
  appobject,
  hidden
 ]
 coclass Global
 {
  [default] interface _Global;
 };

My questions are:

How and where do I create the Global COM object instance and where is it
held in the server?

Where can I find an example of the implementation of IDL like this for the
server side and the client side (VB or VC++)?

Thanks for any and all responses!

Kevin Regel



Mon, 13 Oct 2003 04:03:15 GMT  
 Global properties set in Server accessible by Clients
How and where do I create the Global COM object instance and where is it
held in the server?
[yhhuang] use COM singleton

Where can I find an example of the implementation of IDL like this for the
server side and the client side (VB or VC++)?
[yhhuang]  Q201321: HOWTO: Alternative Implementation of ATL Singleton

Hope it helps!

yhhuang
ICQ:91074870



Tue, 14 Oct 2003 13:35:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. COM Server global data storage accesable to client

2. Client Server problem: CLIENT printerDC not available on SERVER

3. How to make a global pointer accessible to all source files

4. Client Socket waiting for Server Connect and set main thread on hold

5. DCOM object accessible from VB6 client, but not C++

6. Help: Edit controls not accessible via mouse in Property Sheet

7. Global Properties (i.e. application properties) in C#

8. File io problems with NT Server + Win95 Client + MAC client

9. ActiveX Property Pages within client Property Sheet????

10. Server window disappeared during Client-server communicating

11. client/server and proxy server code???

12. EXE Server client in same image as server?

 

 
Powered by phpBB® Forum Software