views:

59

answers:

1

I am working on a project which uses an import

#import "progid:Blah.blah.retrieve" rename_namespace("Blah")

but I would really perfer not to register the dll which is I believe what is missing to allow this to work. I don't want to register the dll because our build system will not be able to build multiple instances at a time. Is there some easy way to convert this import into some other form? I have the source for the progid it is importing.

As you can probably tell I don't understand this #import function very well, does anybody know of a good primer on it?

+2  A: 

#import brings in the typelib registered against the prog id you've specified. It does this by looking it up in the registry and following the trail it finds there.

You can also just use #import on the dll directly by filename, and avoid the need to have it registered at all. You can even specify the tlb file directly if you have access to it. See the documentation for the #import directive.

If you need more control on specifying the resource that represents the typelib then there is a relevant knowledge base article.

Rob Walker