views:

28

answers:

1

Hello,

Is there any attribute or property or method available in type library which tells that whether given type library is in proc COM server or Out of proc COM server.

Regards Usman

+1  A: 

No there's not. The type library merely describes the interfaces, it is used by a compiler.

Whether an oop or inproc server is used is a runtime detail, determined by the dwClsContext argument for CoCreateInstance(). A COM server can support both, although that's not exactly common. You'd always know enough about the server to know what CLSCTX value to pass. If you really want to find out you can always read it back from the registry by opening the CLSID key. Look for LocalServer32 vs InprocServer32.

Hans Passant