Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Combobox help please... Pin
Duane21-Jun-02 16:29
Duane21-Jun-02 16:29 
GeneralConverting from Borland to Visual C++ Pin
21-Jun-02 12:31
suss21-Jun-02 12:31 
GeneralRe: Converting from Borland to Visual C++ Pin
JohnnyG22-Jun-02 3:48
JohnnyG22-Jun-02 3:48 
QuestionIs it possible to have a Docking Tool Bar on Dialog?? Pin
Speedy21-Jun-02 11:44
Speedy21-Jun-02 11:44 
GeneralSome coding questions Pin
Alan Chambers21-Jun-02 10:52
Alan Chambers21-Jun-02 10:52 
GeneralRe: Some coding questions Pin
Chris Losinger21-Jun-02 11:00
professionalChris Losinger21-Jun-02 11:00 
GeneralRe: Some coding questions Pin
Alan Chambers22-Jun-02 0:11
Alan Chambers22-Jun-02 0:11 
QuestionHow to keep my server alive Pin
Bill Wilson21-Jun-02 8:52
Bill Wilson21-Jun-02 8:52 
I have a local COM server that wraps a 3rd party API. The API contains open and close calls that require significant time. Any number of interactive processes will create and instance of the COM object. So, I set up the local server to perform the open when the app starts and close when the app exits.

This allows users to connect, perform calcualtions and disconnect from the COM object without the overhead of the open and close calls. This produced a performance improvment of about 4000:1.

This solution is only effective if the users connect to the same local server. This is my registration code:
hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
    REGCLS_MULTI_SEPARATE | REGCLS_SUSPENDED);


From my reading of MSDN, this looks like I should get one and only one .exe running. What seems to happen is somewhat different. I created a test harness to try it out. I can run many instances of the test harness, while only one instance of the .exe is launched. So far, so good. This is exactly what I want. If I then run the production application while the test harness is running, I get a second instance of the local . I can run multiple instances of the production program without any more instances being launched. The production app
uses CoCreateInstance to acquire and interface and releases it when finished.

Ideally, I would like to start the local server independentaly of the any application that uses it and have client apps use the already running .exe. I tried creating an instance of the COM object in the _twinMain of the local server, but that had no effect.

Any ideas? Suggestions? Solutions? Bad advice?

Thanks in advance for any responses.
AnswerRe: How to keep my server alive Pin
Ramu Pulipati21-Jun-02 10:18
Ramu Pulipati21-Jun-02 10:18 
AnswerRe: How to keep my server alive Pin
A.A.21-Jun-02 10:26
A.A.21-Jun-02 10:26 
GeneralRe: How to keep my server alive Pin
Bill Wilson24-Jun-02 6:20
Bill Wilson24-Jun-02 6:20 
GeneralMultimedia netwok Pin
21-Jun-02 8:32
suss21-Jun-02 8:32 
GeneralRe: Multimedia netwok Pin
dazinith21-Jun-02 8:36
dazinith21-Jun-02 8:36 
GeneralRe: Multimedia netwok Pin
Anonymous10-Oct-02 6:06
Anonymous10-Oct-02 6:06 
GeneralTemplate Troubles (Solved) Pin
Raskolnikov21-Jun-02 8:32
Raskolnikov21-Jun-02 8:32 
GeneralRe: Template Troubles Pin
sultan_of_6string21-Jun-02 9:04
sultan_of_6string21-Jun-02 9:04 
GeneralRe: Template Troubles Pin
redeemer21-Jun-02 12:57
redeemer21-Jun-02 12:57 
GeneralRe: Template Troubles Pin
sultan_of_6string21-Jun-02 15:51
sultan_of_6string21-Jun-02 15:51 
GeneralRe: Template Troubles Pin
jbarton21-Jun-02 10:36
jbarton21-Jun-02 10:36 
GeneralRe: Template Troubles (Solved) Pin
Raskolnikov21-Jun-02 13:27
Raskolnikov21-Jun-02 13:27 
GeneralRe: Template Troubles (Solved) Pin
Paul M Watt21-Jun-02 18:30
mentorPaul M Watt21-Jun-02 18:30 
GeneralRe: Template Troubles (Solved) Pin
Tim Smith22-Jun-02 4:56
Tim Smith22-Jun-02 4:56 
GeneralRe: Template Troubles (Solved) Pin
Raskolnikov22-Jun-02 10:09
Raskolnikov22-Jun-02 10:09 
Generalimage copying problem Pin
SilentWarrior21-Jun-02 8:12
SilentWarrior21-Jun-02 8:12 
GeneralRe: image copying problem Pin
Speedy21-Jun-02 11:33
Speedy21-Jun-02 11:33 

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.