Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Bisyork

@Bisyork
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Calling classes from DLLs
    B Bisyork

    Thank you very much. It works now.

    C / C++ / MFC help question

  • Calling classes from DLLs
    B Bisyork

    Somefunc is in the EXE.

    ///EXE code
    class CDervDlg : public CDialog
    {
    void TestLoad();
    void SomeFunc(CString, CString);

    BOOL m\_SomeVar;
    

    };

    typedef int (*SCGptr)(CDervDlg *);
    void TestLoad()
    {
    HINSTANCE inst = AfxLoadLibrary("testlib.dll");
    SCGptr Startfunc = (SCGptr)GetProcAddress(inst, "?Start@@YAHPAVCDervDlg@@@Z");
    if (Startfunc != NULL)
    Startfunc(this);
    }

    ///DLL code
    #include "DervDlg.h"

    __declspec(dllexport) int Start(CDervDlg *dlg)
    {
    dlg->m_SomeVar = TRUE; //Works fine
    dlg->SomeFunc("Blah", "Blah"); //Link error: unresolved external symbol.
    }

    Thank you for helping.

    C / C++ / MFC help question

  • Calling classes from DLLs
    B Bisyork

    I have been having problems trying to set up a plugin for my program. The program loads a DLL dynamically, and then calls a member function:

    __declspec(dllexport) int Start(CDervDlg *dlg)
    {
    dlg->m_SomeVar = TRUE; //Works fine
    dlg->SomeFunc("Blah", "Blah"); //Link error: unresolved external symbol.
    }

    I've tried using both regular DLLs and Extension DLLs, but neither work. This is probably just something obvious that I just can't see, but can anyone help?

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups