Results 1 to 2 of 2

Thread: MFC .dll to a Mangaged .dll app

  1. #1

    Thread Starter
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256

    MFC .dll to a Mangaged .dll app

    before when i used vc 6.0, i had the following code....

    Code:
    CSample_appApp theApp;
    
    int StartCommand ( )
    {
        HINSTANCE rscHndl;
    
        // save a handle to InRoads's resource list
        rscHndl = AfxGetResourceHandle ( );
    
        // set resource handle to point to your application
        AfxSetResourceHandle ( GetModuleHandle ( "sample_app.dll"));
    
        SDK_FORM dlg;
        dlg.DoModal();
    
        // reset the resource handle back to InRoads's resource list
        AfxSetResourceHandle ( rscHndl );
    
        return ( 0 );
    }
    when i ran this .dll, my form was executed and then i could use the functions on the form. so my question is how can I do this with a managed .dll class, so that when i run my .dll, it's calls instead of the lines

    SDK_FORM dlg;
    dlg.DoModal();
    but

    Console::WriteLine(S"Forms Example");

    Is this not possible?

    thanks

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Um, no, not really. MSIL assemblies (the dlls that are created when compiling managed C++ or any .Net language) are quite different from normal DLLs. And you shouldn't use managed C++ together with MFC anyway.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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