Solved

rewrite dll as an activex dll

Posted on 2004-08-03
3
184 Views
Last Modified: 2012-05-05
Hi everyone!
I have a DLL that looks like this:

----------------------------------------------------------------------------------------------------------------------
library IFAll;

uses
  FastShareMem, PreDllDecl, Windows, Forms, Dialogs, SysUtils, Classes, ShlObj,.....

{$R *.res}

const
 ..............................

var
.....................

function ApplikasjonSti: ShortString; stdcall;
begin
........................
end;

exports
 ApplikasjonSti;

begin
end.
------------------------------------------------------------------------------------------------------------------------

I really want this dll to be available as an object in my aspx pages. But I have heard rumours that the DLLs must then be ActiveX dlls. How do I rewrite the DLL to be an activeX dll?
0
Comment
Question by:Darth_helge
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 500 total points
ID: 11706952
ASP and ASPX can use COM components in the code. Thus what you have to do is create a COM component that can be called from the scripting language. Binaries compiled this way are considered to be ActiveX components.

You need to start with a new ActiveX library project. Then add a new ActiveX control, Active Server Object, ActiveForm, Automation object, COM object, MTS object or even an MTS data module to it. (Other Delphi versions can offer different object types that you can add.) For ASP, the Active Server Object is the best solution.
Then you're in the type library editor. Here you add the methods that you want to use. ApplicasjonSti in your example and add the code to it in the editor.

But this process will require a complete redesign of your DLL and some knowledge about COM development...

Any other ways to call DLL methods from scripting? I'm not sure, but check out the webdevemlopment section of ExEx...
0
 
LVL 5

Author Comment

by:Darth_helge
ID: 11712718
ok. i've got started. But let's say that my dll uses 50 methods only internally in the dll and then there's one function that is public and exported. do i have to declare all the 50 internal methods in the type library? or can i just cut'n'paste these methods over to the new com component? can these private methods call other dll's?
0
 
LVL 5

Author Comment

by:Darth_helge
ID: 11809640
ok, I have figured it out...
i'll give you some points alex...
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 141
How to convert memory stream to PDF file 6 55
update joined tables 2 46
RESTRequest Parameter 4 30
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

770 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