0

Actually I want to know the dll version of 4 numbers of the com object, which is created via CoCreateInstance from kind of dll file. By this answer, How do I programmatically get the version of a DLL or EXE file?, the normal dll can be extracted the 4 version stamp numbers through this filepath based API. But the location of my com object is maintained in the manifest of Application. The dll file location is hidden from me.

Is anyway to retrieve such version from my com object or indirectly way to know its location?

Community
  • 1
  • 1
Chen OT
  • 3,486
  • 2
  • 24
  • 46
  • 3
    That this is not possible is very much a COM feature. The actual server can exist half-way around the world, completely out of reach from your program. Technically you can dig through the registry to find it back but covering all possible corner cases is not practical (like surrogates and DCOM). Proper way to do this is to add an interface so the server can simply tell you. And a new version requires the author to change the UUIDs, in itself a reliable version check. But that isn't done correctly often enough and begets a question like this. – Hans Passant Mar 22 '17 at 10:27
  • @HansPassant your comment is actually an answer. :) – Vada Poché Mar 22 '17 at 10:30
  • 1
    I decided a while ago to only ever post happy answers, the kind that SO users find helpful and don't hate. This is not happy. – Hans Passant Mar 22 '17 at 10:38

0 Answers0