Jump to content
  • Advertisement
Sign in to follow this  
Plerion

COM Local Server in loaded DLL

This topic is 3039 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello!

While experimenting with COM i've seen the CLSCTX_LOCAL_SERVER. This is as i could see used for applications. Now what i was thinking about is:
Is it possible to make a DLL with all the COM-related stuff for a local server and load that DLL in an exe and tell Windows somehow, that this is happening like that?

Or asked otherwise:
I have an application and all what that application "wants" to do is calling LoadLibrary and after that exported functions. The application itself cannot handle any COM-related things. Thats all in the DLL. The DLL is an interface for realtime configuration of the application. Now from outside it should be possible to connect to that DLL which is loaded in the application via COM and receive an instance of a class. What would be the best approach for that?

In an image:


Hopefully someone can help me!

Greetings
Plerion

Share this post


Link to post
Share on other sites
Advertisement
Are you trying to get the two applications to communicate with each other through the com dll? Have you read this: How does COM activation work anyway? "If the user specified CLSCTX_LOCAL_SERVER, it means that the client wants to contact an out-of-proc COM server. For an out-of-proc object, there are a gain two possible choices – the COM server could be implemented by an NT service, or it could be implemented by a local executable." ...

Share this post


Link to post
Share on other sites
From what i've read in that article i think it may be possible somewhat like that:
Application loads the DLL and calls the exported "Init"-function. There it uses CoRegisterClassObject to register the factory. In the registry i write the path to my executable. As the COM-activator sees that the executable is already running it contacts the DCOM-service which already has got the factory for the CLSID and calls CreateInstance there. I may test that today!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!