Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-11-21
7
Medium Priority
?
277 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

971 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