soptest's code should be working in most cases, but first check if the object supports IPersist, IProvideClassInfo or IProvideClassInfo2. You can then obtain the class ID in a very simple way through: IPersist::GetClassID() IProvideClassInfo2::GetGUID() gertjan