Solved

MFC Question

Posted on 1998-08-19
4
206 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 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