My global objective is to create a COM-based application, where client part is C++ code and server part - C#. It looks simple.
I try to use the sample from MSDN: http://msdn.microsoft.com/en-us/library/aa645738(v=vs.71).aspx
I make a solution with two projects (using VisualStudio2008) and compile. well.
I register component manually. (ref1)
But when I run a client application, CoCreateInstance returns HRESULT "Class not registred".
on the step (ref1) I try to use:
1) regasm server.dll /tlb:server.tlb (file names in cpp source now are compatible, of cause)(from MSDN)
2) regasm server.dll /tlb:server.tlb gacutil /i server.dll
3) regasm /codebase /tlb server.dll
In the registry a see my class, but "default value" of InprocServer is mscore.dll. Comparing with another registry notes, it looks like mistake. I tryed to edit this value manually - no result.
But I'm shure, this sample works! once I've done many many different actions without change GUIDs and... It WORKS! But I Change GUID's, try to register - no result. And i can't repeat this situation. Magic...
Help me, please! I need an exact alhoritm without change source (optionnal) and without manual work in the registry (totally impossible in my case).
//sorry, mb my english isn't perfect.