Click here to Skip to main content
15,881,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 5-Apr-13 22:27pm
v2

1 solution

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.
 
Share this answer
 
Comments
vasuvasanth 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900