Re: MFC Support in DLL's

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ok, thanks for that info guys. I now have another(though related) question.

What type of MFC Dll should I use to get access to the DllMain function? I
want to be able to create my own DllMain

ed

"Ajay Kalra" wrote:

> "ed" <ed@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:03A4326E-E360-4FAF-B6DF-31D0063DC05A@xxxxxxxxxxxxxxxx
> > I realize this is probably an old and often repeated question, but I have
> > been unable to find any articles that have been able to help me.
> >
> > I have a DLL written in plain win32 that I want to add MFC support to.
> I'm
> > having trouble with the DllMain function. I've tried just removing the
> > entire DllMain function, yet I'm still getting the compiler error that
> > DllMain is already defined.
> >
> > What Do I need to add to make my DLL support MFC?
> >
>
> To simplify it, I would create a new MFC DLL and then add all the files in
> your current DLL to it. That way you would get the settings right.
>
> However, you need to decided what sort of DLL do you want, MFC Extension or
> a Regular DLL. MFC Extension DLL can be used only by MFC clients, while a
> Regular DLL is like a traditional dll (with export symbols etc).
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@xxxxxxxxx
>
>
>
>
.



Relevant Pages

  • Re: Simple Input In a MFC application
    ... other MFC programmers have followed parallel lines to augment the MFC in a ... either distributing an extra dll or having to include resources in calling ... which is why I'd use a DLL ... Place an edit control on the dialog ...
    (microsoft.public.vc.mfc)
  • Re: Soft Input Panel SIP
    ... is without MFC support. ... I tried to setup a new projekt Win32 Smart Device Projekt -- DLL add ... // DllGetClassObject - Exported function called to get pointer to ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ...
    (microsoft.public.windowsce.app.development)
  • Re: Soft Input Panel SIP
    ... It looks like you are trying to create a dll with MFC statically linked. ... If you are you should start with the MFC wizard and create an "MFC DLL" project, instead of trying to paste MFC into a working non-MFC project. ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ... IsEqualIID ) { ...
    (microsoft.public.windowsce.app.development)
  • Re: Soft Input Panel SIP
    ... Does your device have the MFC DLL installed? ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ... IsEqualIID ) { ...
    (microsoft.public.windowsce.app.development)
  • Re: heap shared with DLL
    ... You may be able to make your own determination as you should have access to MFC source to analyze. ... It looks like theese MFC versions used there own allocators. ... In any case, in WinNT/2K/XP and in WinCE heaps are process-owned, and the heap manger (not the EXE or DLL) maintains alloc/free states of blocks. ...
    (microsoft.public.windowsce.embedded)