Solved

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

Posted on 2013-11-21
7
238 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
  • 2
  • 2
7 Comments
 

Author Comment

by:BrianDumas
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now