Unable to create ISignalCBFactory instance | developer.brewmp.com Unable to create ISignalCBFactory instance | developer.brewmp.com

Developer

Unable to create ISignalCBFactory instance

Forums:

Hi,

I am trying to create ISignalCBFactory instance using ISHELL_CreateInstance(shell,AEEIID_ISignalCBFactory,factoryInstance) . But I am getting ECLASSNOTSUPPORT error. Is there anything else i need to do to create the instance. Please advice.

regards,
Pradip.B

i am able to create an instance of ISignal using ISHELL_CreateInstance(shell,AEEIID_ISignal,signal_ptr) but i cannot create an instance of ISignalCBFactory . Please advice

i am able to create an instance of ISignal using ISHELL_CreateInstance(shell,AEEIID_ISignal,signal_ptr) but i cannot create an instance of ISignalCBFactory . Please advice

Use class id AEECLSID_SignalCBFactory and not interface id. Here is how you can do it:
//Create an instance of pMe->pIsignalCBF using class id AEECLSID_SignalCBFactory
nRetVal = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_SignalCBFactory, (void**)(&pMe->pIsignalCBF ));
if(SUCCESS != nRetVal)
return FALSE;
if(pMe->pIsignalCBF)
{
//This function creates the signal using ISignalCBFactory. SignalCBFunction_notify is an asynchronous callback event which will be intiated when the signal is set.
nRetVal = ISignalCBFactory_CreateSignal(pMe->pIsignalCBF,(PFNNOTIFY)SignalCBFactory_Textnotify, pMe, (ISignal **)NULL,(ISignalCtl **) &pMe->pUIsignalCtl );
}

Use class id AEECLSID_SignalCBFactory and not interface id. Here is how you can do it:
//Create an instance of pMe->pIsignalCBF using class id AEECLSID_SignalCBFactory
nRetVal = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_SignalCBFactory, (void**)(&pMe->pIsignalCBF ));
if(SUCCESS != nRetVal)
return FALSE;
if(pMe->pIsignalCBF)
{
//This function creates the signal using ISignalCBFactory. SignalCBFunction_notify is an asynchronous callback event which will be intiated when the signal is set.
nRetVal = ISignalCBFactory_CreateSignal(pMe->pIsignalCBF,(PFNNOTIFY)SignalCBFactory_Textnotify, pMe, (ISignal **)NULL,(ISignalCtl **) &pMe->pUIsignalCtl );
}