Jump to content
  • Advertisement
Sign in to follow this  

c++ and com api

This topic is 2647 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

I have a C + + MFC project that reads from a program through a COM API.
The problem is that this program has changed and is passed to the next version.

I interface with the server through this sample code :

IUnknown * punk;

CLSIDFromProgID hr = (L "PippoXXX.XXXObject", & clsid);
hr = CoCreateInstance (clsid, NULL, CLSCTX_LOCAL_SERVER, IID_IUnknown, (void **) & punk);
hr = punk-> QueryInterface (id, (void **) & m_pPippo);
[/ code]

How do I know the CLSID of the COM server (which in my case is a .Exe) or otherwise the string to pass to the CLSIDFromProgID function(in a distribution optic)?
And if there are more than one version of the program, how I interface with the program rather than another?

Com is still a valid way to create an API for exporting data or access to functions?
there are some good books on the subject.
Thank you.

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!