Solved

MFC Question

Posted on 1998-08-19
4
202 Views
Last Modified: 2013-11-25
Can I use MFC40.dll in Visual Basic like any other Dll ?
0
Comment
Question by:labrego
  • 2
4 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1429913
I don't think so. The functions of the mfc40.dll are stored as 'classes' - which means that the
exported names are not (at least in the usual way) accessible by any other application.
One cause is that c++ classes pass a 'virtual function table pointer'(vftbl), which as far as
i know is almost impossible to create without knowing the whole internal structure.
To make it short: I think the effort to make mfc40.dll work with visual basic is much harder as
simply simulate its functionality. Perhaps you could write a 'wrapper' dll which exports its
functions in the usual way.
0
 

Author Comment

by:labrego
ID: 1429914
That means that the functionality in MFC40 is not available in VB 5.0? I'm looking for a way to implement a docking function

0
 
LVL 2

Accepted Solution

by:
polygon earned 200 total points
ID: 1429915
No, you definitely can't use this DLL in a VB program. This is a kind of extension DLL and VB can't access it. You may try to write another DLL in C++ which links MFC40.dll and exports some function (but not classes) as "stdcall" and then you will be able to use this functions.
0
 

Author Comment

by:labrego
ID: 1429916
Can you help to build a DLL in C++ which links MFC40.dll?
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now