Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

calling dlls from activex - ok to do?

Posted on 2000-02-27
2
222 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

792 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