🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: microsoft.public.vc.activex.templatelib
1 messages
1 total messages Started by Johan Slottner Fri, 09 Nov 2001 13:02
Exporting ActiveX functions from VC++ to Delphi
#1
Author: Johan Slottner
Date: Fri, 09 Nov 2001 13:02
22 lines
1708 bytes
I have an application exporting two functions, each returning an
interface based on IUnknown. The application is written in Borland
C++, and the functions are executed from a Delphi application. Now
there is a need to port the application to a Visual C++ MFC ActiveX
application. How to write these functions so they can still be
executed from the same Delphi application?

In the application, the definitions of the functions looks as follows
(C++ Builder)

extern "C"
{
  _di_IUnknown __stdcall __declspec(dllexport) GetOneInterface()
  {
    return (IOneInterface*) &g_InterfacesImplementer;
  }

  _di_IUnknown __stdcall __declspec(dllexport) GetAnotherInterface()
  {
    return (IAnotherInterface*) &g_InterfacesImplementer;
  }
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads