57 DWORD dw = GetLastError();
58 sprintf(szBuf,
"%s failed: GetLastError returned %i\n",
59 (
char*)plugin_file, (
int)dw);
67 farp = GetProcAddress(handle,
"DestroyPostEffectFactory");
75 if(this->CreatePostEffectFactory!=NULL)
76 m_factory = this->CreatePostEffectFactory();
82 if (DestroyPostEffectFactory) this->DestroyPostEffectFactory();
84 CreatePostEffectFactory = NULL;
85 DestroyPostEffectFactory = NULL;
98 if(pfx==NULL)
return NULL;
104 for(
int i=0;i<n;i++) narray[i] = array[i];
121 if(m_factory!=NULL) {
124 if(array[j]==PostEfecto) {
126 m_factory->Destroy(PostEfecto);
132 for(i=0;i<j;i++) narray[i] = array[i];
133 for(i=j;i<(n-1);i++) narray[i] = array[i+1];
152 if(!stricmp(effect_name,
"nil"))
return NULL;
157 complete_name+=
moText(
"_d");
159 complete_name +=
moText(
".dll");
163 complete_name+=
moText(
"_d");
165 complete_name += moPluginExtension;
173 for(
MOuint i = 0; i < plugins.Count(); i++)
174 if(!stricmp(plugins[i]->GetName(), complete_name))
184 plg_index = plugins.Count();
186 plugins.Add( pplugin );
190 if(plugins[plg_index]->m_factory!=NULL)
191 return plugins[plg_index]->Create();
202 if(!stricmp(posteffect->
GetName(),
""))
return false;
207 complete_name+=
moText(
"_d");
209 complete_name +=
moText(
".dll");
213 complete_name+=
moText(
"_d");
215 complete_name += moPluginExtension;
222 for(
MOuint i = 0; i < plugins.Count(); i++)
223 if(!stricmp(plugins[i]->GetName(), complete_name))
234 bool res = plugins[plg_index]->Destroy(posteffect);
237 if (res && plugins[plg_index]->n == 0) {
238 plugins[plg_index]->Unload();
239 plugins.Remove(plg_index);
static void Error(moText p_text)
Anuncia un error.
moDefineDynamicArray(moPostPluginsArray) moPostEffectFactory
LIBMOLDEO_API bool moDeletePostEffect(moPostEffect *posteffect, moPostPluginsArray &plugins)
void Load(moText plugin_file)
clase de para manejar textos
moPostEffectFactory *(MO_PLG_ENTRY * CreatePostEffectFactoryFunction)()
void moUnloadPlugin(MOpluginHandle &handle)
static const moText & GetModulesDir()
bool Destroy(moPostEffect *posteffect)
LIBMOLDEO_API moPostEffect * moNewPostEffect(moText effect_name, moPostPluginsArray &plugins)
void(MO_PLG_ENTRY * DestroyPostEffectFactoryFunction)()
virtual ~moPostEffectFactory()
const moText & GetName() const
MOpluginHandle moLoadPlugin(moText fn)