I need to develop a COM object DLL that could replace an old one. I need this, because I don't wan't to develop an application that uses the old COM DLL. I'll make a new COM object with the same properties and methods. The main difficulty I see is UUID publication. I don't understand the importance of some of them and where they are used, which of them I must duplicate and which might be left as different? I found out that the program which calls the COM object (in my case Navision) uses a UUID that describes the library and typelibrary. It would be nice if anyone could share experience in such a task.

有帮助吗?

解决方案

The guids are very important, that's what COM uses to find interfaces, classes and type libraries. Instead of names, humans are not very good at picking guaranteed unique names.

They must exactly match or the client code won't work correctly. You must furthermore ensure that the interfaces have the exact same methods with the exact same signatures and the exact same order. While getting a guid wrong tends to produce a reasonable error message, getting the interface wrong almost always causes undiagnosable runtime behavior, an access violation only when you're lucky.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top