|
Prev: thank you very much,Joseph M. Newcomer
Next: CDaoDatabase ::unable to initialize dao/jet db engine.
From: Kjell Arne Johansen on 27 Feb 2005 08:55 Hi How to integrate an MFC 7.0 DLL into a standard C++ application. I'm going to use an OPC Toolkit for C++ and have to interface my MFC DLLs. How do I do this? Any recommendations? Links? Regards Kjell Arne Johansen
From: Tom Alter on 27 Feb 2005 16:20 Hello, You have just said MFC 7 DLL, but which DLL, Extension, Regular with MFC Statically Link, or Regular with MFC Dynamically link ? If you could compile your MFC DLL then link it with /MAP option or say generate MAP file. This file will have all the decorated functions, use these names to create the .DEF file. Now, if your problem is just how to link the existing DLL then use the linker options, and give the path and file name of your .LIB file that you have with your DLL, and put the DLL in to your execution path. "Kjell Arne Johansen" <KjellArneJohansen(a)discussions.microsoft.com> wrote in message news:BC433F02-4700-4016-8EFB-E1E82F022124(a)microsoft.com... > Hi > How to integrate an MFC 7.0 DLL into a standard C++ application. > > I'm going to use an OPC Toolkit for C++ and have to interface my MFC DLLs. > How do I do this? > Any recommendations? Links? > > Regards > Kjell Arne Johansen >
From: Joseph M. Newcomer on 27 Feb 2005 17:46 One way is to generate a dummy console app that uses MFC. It will contain the appropriate MFC initialization calls in it. For example, I just created a console application, went to the configuration, selected the MFC support option, and got // mfcconsole.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "mfcconsole.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // The one and only application object CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; // initialize MFC and print and error on failure if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) { // TODO: change error code to suit your needs _tprintf(_T("Fatal Error: MFC initialization failed\n")); nRetCode = 1; } else { // TODO: code your application's behavior here. } return nRetCode; } This was using VS7.1 (VS .NET 2003) joe On Sun, 27 Feb 2005 05:55:01 -0800, "Kjell Arne Johansen" <KjellArneJohansen(a)discussions.microsoft.com> wrote: >Hi >How to integrate an MFC 7.0 DLL into a standard C++ application. > >I'm going to use an OPC Toolkit for C++ and have to interface my MFC DLLs. >How do I do this? >Any recommendations? Links? > >Regards >Kjell Arne Johansen Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Pages: 1 Prev: thank you very much,Joseph M. Newcomer Next: CDaoDatabase ::unable to initialize dao/jet db engine. |