HMODULE hModule = LoadLibrary ("SomePlugin.dll"); if (hModule) { GetFactoryProc proc = (GetFactoryProc)GetProcAddress (hModule, "GetPluginFactory"); IPluginFactory* factory = proc ? proc () : 0; if (factory) { for (int32 i = 0; i < factory->countClasses (); i++) { PClassInfo ci; factory->getClassInfo (i, &ci); FUnknown* obj; factory->createInstance (ci.cid, FUnknown::iid, (void**)&obj); ... obj->release (); } factory->release (); } FreeLibrary (hModule); }