From: "David Botton" <David@Botton.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Re: gnat ada DLL and VB
Date: Wed, 15 Aug 2001 09:42:31 -0400
Date: 2001-08-15T09:42:31-04:00 [thread overview]
Message-ID: <mailman.997883844.22445.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 7i_d7.276991$qc.33250428@news1.rdc1.va.home.com
Thanks to CreateCOM there is no need to understand COM. Just fill in the
blanks and your Ada code will be instantly usable to VB, Delphi, MSVC++ and
on the CLR easier then with a DLL.
For example in VB after creating your Ada COM object. Register the DLL by
typing:
regsvr32 /r NameOfYourCOMObject
then in VB choose the references Object menu option and pick your object.
Use the Ada code as you would any other VB object. If this was a DLL, you
would have to writing a binding to each method in VB as well.
In MSVC++, do:
#import "Path\NameOfYourCOMObject.dll"
the just start working
MyInterfacePtr ABC;
ABC.CreateInstance (__uuidof (MyObject));
etc.
On top of that, say you wanted to do a little remote computing :-) Don't try
this with your DLL.
Go to a remote machine, run the CreateCOM generate program
NameOfYourCOMObject-Remote.exe on a remote machine and then run the _exact
same_ client code on that machine an be accessing your object accross the
network.
David Botton
----- Original Message -----
From: "R. Srinivasan" <rajasrinivasan@home.com>
> Many of us -- well speaking for myself, COM/DCOM/DCOM+ etc. etc. are not
the
> easiest to understand. These are comprehensive technologies that addresses
a
> broad range of issues. Even with supposedly "friendly" environments (to
each
> other I mean) like VC++ and VB, both the development, troubleshooting is
> quite challenging to put it mildly -- particularly when it comes to
> interoperation between VB/VC++.
>
> Afterall one of the central theme of VS.NET namely the "much touted" CLR
is
> a testament to the issues involved.
>
>
> "David Botton" <David@Botton.com> wrote in message
> news:mailman.997714164.3020.comp.lang.ada@ada.eu.org...
> > Why would any one write a DLL on windows to work with VB or for that
> matter
> > with any language? Particularly when there are excellent COM/DCOM tools
> that
> > make creating COM objects with Ada 95 easier then perhaps even VB itself
> :-)
> >
> > Step 1 - Write IDL and compile with MIDL to a TypeLibrary (or use a GUI
> type
> > library creation tool)
> > Step 2 - Run CreateCOM on TLB file
> > Step 3 - Fill in the blanks :-)
> >
> > DONE
> >
> > DLL's these days are only being developed for use with inferior
languages
> > like C/C++ where the average programmer is too lazy to write/use
COM/DCOM
> > objects since their tools and/or skills are not as well developed on the
> > Windows platform.
> >
> > http://www.adapower.com/gnatcom
> >
> > David Botton
> >
> >
> >
> > ----- Original Message -----
> > From: "isaac buchwald" <isaac.buchwald@velenje.cx>
> >
> >
> > > Does anybody tryed to build a simple dll in gnat ada (v 3.13p)
> > that
> > > was
> > > able to reference it in a visual basic (v 6.0) project - and it
> was
> > > working?
> > >
> > > If there is such a mighty ada programmer , please share your
> demo
> > > code
> > > with the community.
> >
> >
>
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
prev parent reply other threads:[~2001-08-15 13:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-09 8:29 gnat ada DLL and VB isaac buchwald
2001-08-09 10:01 ` Pascal Obry
2001-08-09 12:53 ` Ted Dennison
2001-08-09 21:33 ` Pascal Obry
2001-08-10 6:06 ` isaac buchwald
2001-08-10 21:31 ` Tony Gair
2001-08-11 16:35 ` isaac buchwald
2001-08-12 22:12 ` R. Srinivasan
2001-08-13 14:50 ` David Botton
2001-08-13 18:42 ` isaac buchwald
2001-08-13 19:12 ` David Botton
2001-08-14 0:29 ` R. Srinivasan
2001-08-14 17:17 ` isaac buchwald
2001-08-15 13:53 ` David Botton
2001-08-15 16:32 ` isaac buchwald
2001-08-15 13:42 ` David Botton [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox