Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mixing in-process and out-of-process COM servers

Posted on 2013-11-21
7
Medium Priority
?
268 Views
Last Modified: 2013-12-17
Hi all. Please tell me if this is possible. I want to create an executable (I'll call it HostExe) that will be used by other executables to obtain some COM interfaces. The COM interfaces will be built as we need them and thus I would like the interfaces to be inside a DLL. I would then like to have my HostExe 'see' the DLLs (look in a particular folder) and then load the dlls into the HostExeaddress space. Then the other executables would get the interface (object) from the HostExe. Is this possible? (I'm not sure it is even clear non-the-less possible :) ). If it is possible, can you give me example (psuedo code is fine) code? Or send me to an article/document?


Thanks, Brian
0
Comment
Question by:BrianDumas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 

Author Comment

by:BrianDumas
ID: 39667332
Another bit of information. I don't want to recompile the HostExe each time a  new interface comes out. I would like it to be dynamic. That is, I would like the HostExe to realize that there is a new DLL, load it, and register the interface as if the HostExe is the owner.
0
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 39667490
This should be possible - just the DLLs that implement the interfaces strictly speaking are not COM DLLs (i.e. no 'DllRegisterServer()' etc.), but plain Windows DLLs, the only hold the code.  So, basically the executable loads the DLL, the DLL provides some entry points that e.g. get the CLSID they implement, return an interface pointer, and all the stuff you need. Well, you could also add  'DllRegisterServer()' if you want them to be able to act standalone. If they are just not registered with COM and allow the executable to obtain the required information, that should work.
0
 

Author Comment

by:BrianDumas
ID: 39668786
Thanks jkr. I'll check this out and come back with either more questions or to accept the solution.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 39721509
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 86

Expert Comment

by:jkr
ID: 39721510
Since "Delete" is the only option that LeeTutor knows in the cleanup process, that would be reason enough to object. Yet I have to add that "Not enough information to confirm an answer." simply is incorrect, even when stated by a non-programmer. Thus, I object.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question