CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    Load Win32's DLL in MFC

    Hi:
    I am trying to load a DLL using MFC, the DLL was successfully loaded in the WinMain (win32) program.

    In WinMain(){
    .......
    // It works just load the dll by two lines
    OpenLibrary(pxc, .....);
    pxc.AllocateFG(..);
    // Load the dll , and allocate the memory successfully
    .......
    }

    But where should I put these two lines in MFC?
    I tried put in 1. MainFrm.PreCreateWindow(cs) or 2.CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
    The results: OpenLibrary looks OK ,but Allocate failed.


  2. #2
    Join Date
    May 1999
    Location
    St-Petersburg (Russia)
    Posts
    32

    Re: Load Win32's DLL in MFC

    Hi, I've never used OpenLibrary. I use LoadLibrary it works well in MFC and Win32.

    - ALex


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