The host application will handle your Plug-In something like this (some code is Windows-specific!):
HMODULE hModule = LoadLibrary ("SomePlugin.dll");
if(hModule)
{
GetFactoryProc proc = (GetFactoryProc)GetProcAddress (hModule, "GetPluginFactory");
IPluginFactory* factory = proc ? proc () : 0;
if(factory)
{
for(long 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);
}