Click to See Complete Forum and Search --> : Load Win32's DLL in MFC


Chia Pin
April 30th, 1999, 05:05 PM
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.

Alex Black
April 30th, 1999, 11:07 PM
Hi, I've never used OpenLibrary. I use LoadLibrary it works well in MFC and Win32.

- ALex