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 6937007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:18:30+00:00 2026-05-27T12:18:30+00:00

I have a C++ DLL with 100+ exported functions which I want to transform

  • 0

I have a C++ DLL with 100+ exported functions which I want to transform into an OCX file. However, I only know how to export functions from an OCX which reside in the main class (called CmyCtrl by the Visual Studio 10 ActiveX control wizard) … by doing this:

BEGIN_DISPATCH_MAP(CmyCtrl, COleControl)
    DISP_FUNCTION_ID(CmyCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()

and using appropriate IDL definitions.

I’m not really keen on restructuring the whole large project and moving every single function definition (which are spread out across 20 or so files) into the class. Can I export functions from an OCX (with full support for Intellisense etc. in VB6, where the control will be used) which are not in the class? How do I do that and what do I have to keep in mind?

  • 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-27T12:18:31+00:00Added an answer on May 27, 2026 at 12:18 pm

    You should have a wizard somewhere to add a new “ATlObject” that mean create a ne class instantiable via COM. With this you can split your function in different classes. Supposing you have an ATLproject, when adding a new class this wizard should appear:
    enter image description here

    By creating a new ATL simple object you have another class with exported function in the classical COM way. If you want you can always export a function with dllexport, but in this case you cannot use COM to interface with your component. You can even call function exported with the dll ( ocx ) the regular way by using the strategy:

    Private Declare Function MyFuncName Lib "yourocx.ocx" ([.. parameters]) As [Return type]
    

    but it is probably not the way to go in your case.

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

Sidebar

Related Questions

I have a third party c dll which I want to use in my
Possible Duplicate: Determine framework (CLR) version of assembly I have a library/DLL file which
I have a DLL that I want to profile.. I tried to use Very
I have a dll. That dll is uploaded on a server. I want that
I have a batch file which starts multiple instances of simple console application (Hello
I have created several websites that run from ISAPI dll's, which runs smoothly in
I want to send my C# string to a C++ DLL function. I have
I have these files: foo.dll foo.lib foo.exp bar.il bar.netmodule foo defines functions in its
I have a DLL which takes care of custom drawing for some special glass
I have a basic question. 1- I want to use Science.dll provided at http://www.sciencecode.com/

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.