Click here to Skip to main content
15,899,314 members
Home / Discussions / COM
   

COM

 
GeneralRe: Multiple processes in single window Pin
Umair Ahmad khan6-Jul-05 12:04
Umair Ahmad khan6-Jul-05 12:04 
Generalcontext menu handler Pin
_kane_29-Jun-05 19:47
_kane_29-Jun-05 19:47 
GeneralRemotely accessing COM from ASP.NET APPLICATION Pin
29-Jun-05 17:13
suss29-Jun-05 17:13 
GeneralCode wont compile Pin
Anonymous29-Jun-05 12:55
Anonymous29-Jun-05 12:55 
GeneralRe: Code wont compile Pin
odiesback29-Jun-05 13:03
odiesback29-Jun-05 13:03 
GeneralActiveX client/server architecture Pin
VKatti29-Jun-05 5:31
VKatti29-Jun-05 5:31 
GeneralRe: ActiveX client/server architecture Pin
onlyfish30-Jun-05 22:45
onlyfish30-Jun-05 22:45 
GeneralRe: ActiveX client/server architecture Pin
rwestgraham1-Jul-05 16:35
rwestgraham1-Jul-05 16:35 
Not sure if this answers your question exactly, but here is some generalk information.

ActiveX DLLs and OCXs (which are nothing more than DLLs with a special wrapper) are always loaded into each process that calls them, so you cannot enforce a single instance of a server using either. you need to use an ActiveX EXE instead.

An ActiveX EXE component runs as a single instance by design with no special development on your part. In other words, the first time any client calls an ActiveX EXE, one instance of the server will be created. All additional calls by any number of clients will be handled by the one instance of the ActiveX EXE server that is already running.

The above only applies to the server component itself.

Suppose for example, you have 10 ClientA instances that call Server.EXE and request some class MyServerClass. The first ClientA that calls the Server.EXE will cause a single running instance of Server.EXE to be instantiated. When the remaining 9 ClientA components request a MyServerClass object, ALL of those requests will be serviced by the single instance of Server.EXE already running. BUT you will still have 10 instances of MyServerClass - one for each ClientA request - all being provided by the SINGLE instance of Server.EXE.

Assuming that what you really want is 10 ClientA components that all have a reference to a SINGLE instance of MyServerClass, provided by a SINGLE Server.EXE, then you need to also implement MyServerClass as a Singleton. This is easy to do in C++, a little harder to do (but still possible) in VB.

Do a web search on Singleton and ActiveX EXE and you should find plenty of examples.

Hope this helps.

Robert




GeneralShell Extension: how to hook to directory Pin
chenfred29-Jun-05 5:31
chenfred29-Jun-05 5:31 
GeneralRe: got answer Pin
chenfred29-Jun-05 7:33
chenfred29-Jun-05 7:33 
GeneralRe: Shell Extension: how to hook to directory Pin
alex__b4-Jul-05 6:41
professionalalex__b4-Jul-05 6:41 
GeneralOutlook application object - Calendar Pin
Brigg Thorp29-Jun-05 3:04
Brigg Thorp29-Jun-05 3:04 
Generaladding visual studio 6 dll to c# app Pin
johniboy28-Jun-05 23:14
sussjohniboy28-Jun-05 23:14 
GeneralRe: adding visual studio 6 dll to c# app Pin
stonewall_20001-Jul-05 0:08
stonewall_20001-Jul-05 0:08 
General7000vDatabase COM Threads Pin
FJK28-Jun-05 19:25
FJK28-Jun-05 19:25 
GeneralRe: 7000vDatabase COM Threads Pin
rwestgraham1-Jul-05 17:01
rwestgraham1-Jul-05 17:01 
GeneralRe: 7000vDatabase COM Threads Pin
FJK3-Jul-05 18:45
FJK3-Jul-05 18:45 
GeneralXMLDOMDocument across processes Pin
Alex_Y28-Jun-05 6:28
Alex_Y28-Jun-05 6:28 
GeneralRe: XMLDOMDocument across processes Pin
Alex_Y28-Jun-05 9:23
Alex_Y28-Jun-05 9:23 
GeneralRe: XMLDOMDocument across processes Pin
Lim Bio Liong28-Jun-05 14:27
Lim Bio Liong28-Jun-05 14:27 
GeneralBrowser Helper Object - replace HTML page Pin
Tomek.Sergey28-Jun-05 3:04
Tomek.Sergey28-Jun-05 3:04 
Generalenum in COM Pin
Logan from Singapore26-Jun-05 22:31
Logan from Singapore26-Jun-05 22:31 
GeneralRe: enum in COM Pin
GuimaSun27-Jun-05 5:42
GuimaSun27-Jun-05 5:42 
GeneralInternet Explorer hooks Pin
Ryan333326-Jun-05 9:52
Ryan333326-Jun-05 9:52 
GeneralWebBrowser Control used as a FileManager Pin
intripoon26-Jun-05 8:39
intripoon26-Jun-05 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.