Solved

rewrite dll as an activex dll

Posted on 2004-08-03
3
186 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 124
Correct Component for Shopping Cart. 2 133
MS Access from Delphi 31 98
Broadcast a message using ICS 2 50
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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