Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:28:08+00:00 2026-05-13T12:28:08+00:00

I know a (vc++) ocx is an ActiveX control, and a (vc++) dll is

  • 0

I know a (vc++) ocx is an ActiveX control, and a (vc++) dll is a collection of functions. I’ve found that being called from a vb.net application, the catching of some exceptions could behave differently if the exception is being thrown from inside the ocx or inside a function that comes in a dll.

So my question is:
From a point of view of a VB.net application, what are the main differences between using .ocx files and using .dll files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:28:08+00:00Added an answer on May 13, 2026 at 12:28 pm

    A DLL is a shared library. It’s an OS level object – any process can load a DLL and call functions defined in it.

    An ActiveX control is a COM object that implements specific interfaces that allows hosts to call its methods and embed it in their UI. There are certain minimum requirements on which interfaces an ActiveX control must implement to be embedded successfully in an application’s UI. Since COM objects are typically dynamically loaded by a process, they are implemented as a DLL. A single DLL may implement one COM class or more.

    Regarding exceptions – I’m not sure what differences you’ve observed, but a function is no different from a function implemented in your process’s main .EXE file. An exception thrown in it should propagate normally according to the rules defined by your programming language’s runtime environment.

    An ActiveX method is different. Typically, it’s called through something called an IDispatch interface. Rather than being a simple subroutine call, it’s invoked by calling a method in the IDispatch interface (IDispatch::Invoke), with its arguments marshaled in a specific way (essentially, they’re converted to standard types and packaged in a way that hides differences in calling conventions and data types between the implementation language of the main process and that of the ActiveX control.) IDispatch::Invoke interface then determines which method in the ActiveX the caller is trying to access, and routes it directly.

    Exceptions are generally not propagated through the IDispatch interface. How your runtime environment deals with the error codes returned by IDispatch::Invoke is up to the implementer to decide, really. So you can reasonably expect not to have your expectations met when dealing with runtime errors and exceptions thrown in an ActiveX control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an old VB6 application that depends on MSINET.OCX. I'd like to know
I know there are lots of tools on the net that can make our
I have several ActiveX components that needed to be accessed from a C# project.
I maintain a C++ application that uses flash ocx to play SWF file. When
Do you know any tutorial for creating MFC ActiveX objects that can be used
Is there any tool, commercial or freeware, that allows merging OCX files with .NET
I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I know that if port 443 is open that means the remote host supports
I created a ActiveX control using ATL, already package it with signature. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.