Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

int AEEClsCreateInstance(AEECLSID clsID, IShell* pIShell, IModule* pIModule, void **ppobj)
{
if(clsID == AEECLSID_CHRISTMASAPP_MOTORZR_TATA)
{

if(!AEEApplet_New(sizeof(menu), clsID, pIShell, pIModule, (IApplet**)ppobj,(AEEHANDLER)menu::HandleEvent,
(PFNFREEAPPDATA)menu::freeAppData))
return EFAILED;

if (!menu::InitAppData((IApplet *)*ppobj))
return EFAILED;

return SUCCESS;
}
return EFAILED;

how we get this clsid from mif for check?

You mean how do you get the class id from the mif to compare to the class id passed to AEEClsCreateInstance? You don't. You put the class id there, you should already know what it is. I guess typically you #include the bid file and use the #define from there.
Technically you don't need to compare it, because the module will only be asked to create instances for classes it has advertised in the mif that it supports. So if there's only one class id in the mif, the class id passed to AEEClsCreateInstance will be it. (but double check that this is documented before you rely on it)

You mean how do you get the class id from the mif to compare to the class id passed to AEEClsCreateInstance? You don't. You put the class id there, you should already know what it is. I guess typically you #include the bid file and use the #define from there.
Technically you don't need to compare it, because the module will only be asked to create instances for classes it has advertised in the mif that it supports. So if there's only one class id in the mif, the class id passed to AEEClsCreateInstance will be it. (but double check that this is documented before you rely on it)