Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC ATL COM VC++
We have created an COM which will talk to some serial port.in order to simplify the clients work we created an dll which internally talks to the server.Clients will use the dll to access the server.now we are facining one problem in windows 7.
In Windows 7 some applications will open in admin mode and some in normal mode.At that time two instances of our servers are created.
But we require only one server has to be executed at any time.Also server does not require any admin rights.so is there any wat to open our server inits default security leveles irrespective of clents security levels.
I already made the server class as single tone.I am able to see if both the clients invokes the server in same mode(either both in admin or in normal mode).But problem is coming only both clients are in different mode.
Posted 4-Apr-13 6:35am
Edited 5-Apr-13 23:27pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You have several options.
 
1. Use COM+. If I remember right, there are instantiation options somewhere there (I don't have a Windows box available at the moment).
2. http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/224fc85f-f9f8-40a5-bd9a-92019d7c50b0/[^], or http://stackoverflow.com/questions/4960085/single-instance-of-atl-com-class[^], to make an ATL object a singleton.
 
Hope this helps,
Pablo.
  Permalink  
Comments
vasuvasanth at 6-Apr-13 6:43am
   
Thanks for the quick reply.
I already made the server class as single tone.I am able to see if both the clients invokes the server in same mode(either both in admin or in normal mode).But problem is coming only both clients are in different mode.
 
Posted yesterdayEdited 2
Pablo Aliskevicius at 7-Apr-13 1:51am
   
Did you try putting the server in COM+?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 6 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100