Jump to content
  • Advertisement
Sign in to follow this  
giugio

c++ and com api

This topic is 2475 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.
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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!