Solved

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

Posted on 2013-11-21
7
241 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 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
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 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 learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

932 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

10 Experts available now in Live!

Get 1:1 Help Now