This is way easier than you may think. Here is the basic steps:
Open Delphi.
Select File/New...
Select Active X/ActiveX Library.
Save the DLL project using some sensible name. This will be the name of
your 'server'.
Select File/New/ActiveX/Automation Object
Enter the name of the server class you want.
In the type libray editor, add properties and method required.
In the code editor, fill-in the stubs for the properties and methods you
jsut defined.
Compile.
Register using options on Run menu.
If you have Windows scripting host or some other VB Script host, create a
script to test. You can also test with a delphi app but a script is a lot
simpler.
Script something like this
dim obj
set obj = CreateObject('myserver.myobject')
obj.dosomething
Cheers
"Nic Wise" <[EMAIL PROTECTED]> on 04/12/98 14:39:34
Please respond to [EMAIL PROTECTED]
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
cc: (bcc: Peter Jones/Logistics&Information
Technology/Christchurch/Foodstuffs)
Subject: RE: [DUG]: Creating a DLL that can be called from VB Script
> The MS jargon of the day is COM object - who know what they will call it
> tommorrow..
COM+ I beleive. If they ever get it out.
> Sort of - I have written COM objects in D3 & D4 that talk to Access/SQL
> 6.5 DB's and are driven from VB & JavaScript ASP pages. Its pretty easy
> to create simple COM objects (see the Delphi help) that do the job. As
> for driving the COM objects from VBScript (shouldn't that be VBA?), that
> is outside of the scope of this mail list - perhaps ask MS...
Should be the same - they are all COM objects. If you are in Auckland, you
really should have gone to the inprise thing which was on in AK today
(dunno
if its on anymore - ie, in other places - it was CORBA day yesterday,
COM+MTS day today). Try www.esperanto.org.nz in a day or so when Richard
puts the material up - should have some info in there.,
> Sorry - left the source to my COM objects with my previous company...
:) I might be able to make some if I have time over the weekend (not too
likely). Look on the DSP as well, I think there is some there for doing
ASP-able activeX objects.
Nic.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz