Solved

calling dlls from activex - ok to do?

Posted on 2000-02-27
2
204 Views
Last Modified: 2010-04-02
Is it OK to call a dll from within an activeX (built with vc++).  Is there anything to watch out for, or anything unusual that I need to watch out for?  Is it exactly the same as calling a dll from a regular window app?

PS. I plan to build my dll using delphi 4 and declare the functions 'stdcall' calling convention.  And I plan to use LoadLibrary and GetProcAddress from within the VC++ active X.

e.g.
    HINSTANCE hDLL;
    FARPROC ProcAdd;

    hDLL = LoadLibrary("a1.dll");
    ProcAdd = GetProcAddress(hDLL,"ANDY0");
    if (ProcAdd == NULL) return 0;
    ProcAdd;    // call to dll

0
Comment
Question by:abulka
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
Comment Utility
It is perfectly acceptable to use a dll, either implicitly (via an import lib) or explicitly via LoadLibrary.

It's exactly the same as using a dll from a regular windows app.  In fact, I'd question your implied assertion that an ActiveX component is _NOT_ a regular Windows app.  What makes an app "regular" vs. "irregular"??
0
 

Author Comment

by:abulka
Comment Utility
Ok thanks - I just thought that there might be some complications due to memory movement / address spaces etc.  Good to hear its ok.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

762 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

10 Experts available now in Live!

Get 1:1 Help Now