Dynamic link library for Symbian
2010-04-20 16:02:00 来源:WEB开发网核心提示:TInt RMyLoadLibrary::LoadLibrary(const TDesC &aFileName,const TDesC &aPath){if (NULL == iLibrary){iLibrary = new RLibrary();}if (iLibrary){return (iLibrary->
TInt RMyLoadLibrary::LoadLibrary(const TDesC &aFileName,const TDesC &aPath)
{
if (NULL == iLibrary)
{
iLibrary = new RLibrary();
}
if (iLibrary)
{
return (iLibrary->Load(aFileName,aPath));
}
else
{
return KErrNoMemory;
}
return KErrUnknown;
}
void RMyLoadLibrary::ReleaseLibrary()
{//Must not call DrawNow After call ReleaseLibrary.
if (iLibrary)
{
iLibrary->Close();
delete iLibrary;
iLibrary = NULL;
}
}
TLibraryFunction RMyLoadLibrary::GetFunctionAdrr(TInt aFunctionIndex)
{
return (iLibrary->Lookup(aFunctionIndex));
}
///////////////////////////////////////////////////////
更多精彩
赞助商链接