Calling a DLL from MFC ActiveX VS2008

Posted on 2011-05-02
Last Modified: 2013-11-20

is there anyway i can call local (client) dll's from an MFC ActiveX project? VS2008.

pls include an example! i guess it would be in javascript? c#?

Question by:mehmer
    LVL 7

    Expert Comment


    If you are writing an MFC ActiveX project, then you are already in the "native" language of Windows.  If you want to call a Windows DLL, then just make the call. You probably don't have to do anything special except for add the correct .lib to your project.

    If you want to call a 3rd party DLL, you need to use LoadLibrary/GetProcAddress. Lots of examples available with Google.

    LVL 43

    Accepted Solution

    I agree.  MFC is a set of C++ classes.  No problems to call a dll from that.

    If you type in GetProcAdress (in your code) then put the cursor on it and press the F1 key the help should start.  There you see details about it and a link to example code in the help file.

    Author Comment

    Thanks guys!


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
    If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    745 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

    18 Experts available now in Live!

    Get 1:1 Help Now