I am loading a DLL dynamically using Rlibrary::Load() API in a console application. DLL gets loaded without error.
I got the pointer of the NewL() present in DLL using RLibrary::LookUp().

But When I call that function, application is exiting with error " Exit type 2,3, KERN-EXEC".

PLease provide any work around for this probelm.

DLL has ALL capability, application has Local Services capability

Code is as follows:

RLibrary lib;
RBusDevComm idevcom; //dummy
CSTLC2500 *icstlc2500;
if (!lib.Load(STBtDriver))
console->Printf(_L("STLC2500 loaded"));
console->Printf(_L("STLC2500 not loaded"));
TLibraryFunction entry=lib.Lookup(4);
typedef CSTLC2500* (*Tstlc2500newl) (RBusDevComm&);
Tstlc2500newl newl = reinterpret_cast<Tstlc2500newl>(entry);
icstlc2500 = newl(idevcom);
console->Printf(_L("Newl returned"));

Thanks in Advance