Debug (DLL MFC) -> Debug (Static MFC)

Discussion in 'C++' started by ringos75, Apr 14, 2005.

  1. ringos75

    ringos75 Guest

    hi,
    i've done an application that it have to link dynamically some my dll
    (plugin). In debug mode (Shared MFC DLL) i haven't any problem. If i
    try to compile the project in debug mode and link static MFC i've some
    problem when i try to call some plugin function. The plugin dll is
    compiled and linked at same mode (debug and Static MFC) of the Main
    Application. In the main application i load the plugin with this
    method:

    HINSTANCE _hDLL=LoadLibrary(PathNameDLL);
    loader=(LoaderType)GetProcAddress(_hDLL,"LoadEffect");


    eff=loader(InterfacePlug,this,Parent->GetParent());


    'eff' is a class and loader(...) create an instance of class. When i
    try to call this funcion of class:


    eff->SaveSetUp(tmp);

    i've an error. the function SaveSetUp(...) write some info in file
    tmp:



    void __stdcall FileWrite::SaveSetUp(FILE *SetUp) // Salva il SetUp!
    {
    if (SetUp!=0)
    {
    int lenfile=strlen(FileName2Write);

    fwrite(&lenfile,sizeof(int),1,SetUp); // The error fire here!!!!!
    fwrite(FileName2Write,sizeof(char),1024,SetUp);

    }
    }


    Any idea what is the problem?? In the debug mode (Shared MFC DLL) i
    haven't any problem... To compile the main application in debug mode
    (Static Link MFC DLL) to correct linking i use this microsoft
    indication:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;q148652

    Thanks in advance.


    PS: sorry for my bad english.
     
    ringos75, Apr 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,885
  2. Scott McPhillips
    Replies:
    0
    Views:
    391
    Scott McPhillips
    Jul 5, 2003
  3. barron
    Replies:
    1
    Views:
    1,558
    John Harrison
    Oct 20, 2004
  4. yopwojtek

    Derive from MFC DLL to MFC APP

    yopwojtek, Aug 6, 2005, in forum: C++
    Replies:
    1
    Views:
    392
    Alf P. Steinbach
    Aug 6, 2005
  5. H. Simpson
    Replies:
    4
    Views:
    312
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page