CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    China
    Posts
    12

    Explicit import class from dll

    I want to write a class derived from a class in a dll, but I don't want to use .lib file. So How to Explicit import class from dll?

    Thanks a lot!

  2. #2
    Join Date
    Jan 2003
    Location
    China
    Posts
    12
    HelpHelp

  3. #3
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    12
    Originally posted by Kyliny
    HelpHelp
    You can dynamically explicit load the dll in run time and no lib is needed.
    e.g


    typedef void (*PExportedFn)(int&, char*);

    HMODULE hMod = LoadLibrary("Lib1.dll");
    PExportedFn pfnEF = (PExportedFn)GetProcAddress(hMod, "ExportedFn");

    // pfnEF will be ur function method in the dll file.



    You can reference http://www.codeguru.com/forum/showth...209#post827209 for more information.

    Regards,
    JamesGoh

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured