Click here to Skip to main content
13,087,941 members (62,936 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I've got a C++ client accessing some registry-free C++ COM DLLs.

I followed instructions here:

Registration-Free Activation of COM Components: A Walkthrough[^]

and got my client working almost OK.

However, my side-by-side DLL calls into many other COMs.
These internal COMs appear not to be working.

To clarify, I have COM A and COM B.
I do a CreateInstance inside my client to COM A and it works.
Inside COM A there is a CoCreateInstance to COM B and this appears not to work.

The manifest file describes all the COMs involved, and I have made sure the manifest file is being read (if I deliberately mess up the entry for COM A, the client says it can't find the specified module).

I've only ever managed to get this set of DLLs to work as registry-free COMs from a .NET C# application, where you stick all relevant DLLs in as references, register the COMs at build time, unregister at run time and they work.

However, in C++ I don't know what the equivalent of adding references is.

Any help, greatly appreciated!
Posted 10-Apr-13 23:16pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In C++ equivalent of adding reference is using #import "comserverdllname" ex:#import "test.dll"
PaulowniaK 15-Apr-13 2:51am
Thanks for the tip. That makes sense!
However, I have another problem. #import "mydll.dll" is fine, but the dll's name and the type library's name are different so causes a compilation error.

Basically, it can find mydll.dll but it can't find its type library which is mydllobject (although the actual file name is mydll.tlb).

When I do all this in C#, adding mydll.dll to references automatically lists up mydllobject.

Could you please help?


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 13 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100