?
Solved

rewrite dll as an activex dll

Posted on 2004-08-03
3
Medium Priority
?
188 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
[X]
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
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 1500 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

764 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