×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Question Error:When Exported function of dynamically loaded DLL is called

    HI,

    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;
    _LIT(STBtDriver,"stlc2500.dll");
    if (!lib.Load(STBtDriver))
    console->Printf(_L("STLC2500 loaded"));
    else
    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
    Chandru

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Posts
    463

    Re: Error:When Exported function of dynamically loaded DLL is called

    Well, you aren't checking if the return from RLibrary::Lookup is null, which probably doesn't help.

    Seriously, use ECOM. That's what it's for. If you used ECOM, your code would look like C++ rather than this horrendous mess...
    Edit: Also, don't post 3 copies of the same post, that isn't the way to ensure goodwill from other board members.
    Get Resolvr - The Zeroconf framework for Symbian OS free today. Make your IP networking applications fun and easy to use. http://www.novelinteractions.com/resolvr/
    Proud to be the only autorickshaw owner in Cambridge - http://blog.novelinteractions.com/images/tuktuk.jpg

Similar Threads

  1. Replies: 2
    Last Post: 2004-11-17, 00:46
  2. Lib file VS. DLL file
    By zhang_guoqing in forum Symbian C++
    Replies: 0
    Last Post: 2004-07-24, 13:09
  3. Replies: 1
    Last Post: 2004-04-15, 14:57
  4. Cannot compile SDK's examples for 7650 platform...
    By midletsoft in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-08-12, 19:11
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •