Solved

calling dlls from activex - ok to do?

Posted on 2000-02-27
2
216 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
ID: 2563287
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
ID: 2563386
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

770 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