Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

calling dlls from activex - ok to do?

Posted on 2000-02-27
2
Medium Priority
?
249 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 150 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

824 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