Article View: borland.public.cppbuilder.nativeapi
Article #8409Re: How should a COM server decline COM requests
From: Bob Gonder
Date: Fri, 29 Oct 2004 16:47
Date: Fri, 29 Oct 2004 16:47
29 lines
2421 bytes
2421 bytes
Andrue Cope [TeamB] wrote: >We have an application that can also be a COM server. The way it is >coded means that it must be one or the other. IOW if someone has >launched the application independantly it should be able to tell any >potential clients to get lost and start another copy. I'm sorry, Andrue, maybe if I knew anything at all about COM Servers, this would make sense.... Are you saying.... You have an exe, that when launched as instance 1 (i1), it does what? Does it behave as an application, or a COM Server, or a self-contained application that uses COM services? When instance 2 is launched, what then? I assume from your question that you want one and only one Com Server running. From your first sentence, if the exe can only be one thing, either an application or a Com Server, then how about using standard instance controls (mutex,etc.)? When the exe starts, it checks, and if it is (i1), it becomes a Com Server, and relaunches itself (i2) to be the application. Then if the user launches again, (i3) sees the flag and becomes an application too. Or, re-reading your Q a 6th time.... Do you want the second user-started exe to inform the first that another application window is requested, and then terminate? You could do that a couple ways, use the mutex, or maybe a pipe, that (i1) sets up, to send the request. Or fire off an event and then terminate.
Technical Details
Message-ID:
<lir4o05if39rf158mf6lk7m9t1pfufnc0u@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<418206c0@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,91cd7a0a7f21d9df X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How should a COM server decline COM requests Date: Fri, 29 Oct 2004 09:47:43 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <lir4o05if39rf158mf6lk7m9t1pfufnc0u@4ax.com> References: <418206c0@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.147.176 X-Trace: newsgroups.borland.com 1099068463 67.77.147.176 (29 Oct 2004 09:47:43 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail