DLLs problem...

Login to reply to this topic.
Fri, 2005-12-16 15:44
Joined: 2003-11-28
Forum posts: 35
Hello,

I need to load multiple DLLs from a folder. I don't know exactly what are the DLLs so I need to check all the files from the folder and see if they are DLLs libraries( some one can change the extension of a simple text file to .dll ) and then I need to check if they are DLLs of my application. I used this code to do that:

RLibrary lib;

if(KErrNone == lib.Load(fullName))
{
if (lib.Type()[1] == KLibraryUID)
{
iLibArray->AppendL(lib);

TLibraryFunction entry=(*iLibArray)[i].Lookup(1);

iDllEntryArray->AppendL((CStandardPlugin*) entry());
(*iDllEntryArray)[i]->InitPlugin(NULL,0);
}
}

My problem is that the code is working for some DLLs , but not for all. Why's that ? if the DLLs first UID isn't the same as my UID constant KLibraryUID, shouldn't the app ignore my "if" code ?

In my .mmp project file I have something like this:

UID 0x17704264 0x10994263

Isn't lib.Type()[1] = 0x17704264 and lib.Type()[2] = 0x10994263 ?

How to modify the code in order to recognize a type of DLLs , in my case only plugins of my application?

Thanks.
  • Login to reply to this topic.