Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
7.0 DLL vs 6.0 DLL
Message
General information
Forum:
Visual C++
Category:
Other
Title:
7.0 DLL vs 6.0 DLL
Miscellaneous
Thread ID:
00664473
Message ID:
00664473
Views:
59
I've created a MFC DLL inside of Visual C++ 7.0 (VS.NET) and I'm trying to export some of the functions to be used inside of VFP. This is pretty easy to do inside of version 6.0 and I've had no problems making it work. However, a DLL inside of version 7.0 is a different matter. I can get my DLL to compile, but when I attempt to call a function VFP throws a "Cannot load 32-bit DLL" error. The two main differences I see between the DLL's is that version 7.0 won't let me put in a DllMain entry - if I do, it fails when I compile with a LNK2005: _DllMain@12 already defined error. If I take it out, it compiles just fine (but it doesn't work in VFP). I think the default project inside of VS 7.0 is adding it somehow, but I don't know where. The other difference is the addition of a header file for the .c file. It adds the commands:
#pragma once

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"	
The project won't compile without these.

Obviously, the two versions don't create the same type of DLL anymore. Can anyone explain the differences and what I'd need to do to make this work under VS 7?
-Paul

RCS Solutions, Inc.
Blog
Twitter
Reply
Map
View

Click here to load this message in the networking platform