newsgroups-index (beta)

Current group: dbase.programming

dbase = oleautoserver

dbase = oleautoserver  
Marc VdB
 Re: dbase = oleautoserver  
David Stone
 Re: dbase = oleautoserver  
Marc VdB
 Re: dbase = oleautoserver  
*Lysander*
 Re: dbase = oleautoserver  
Marc VdB
 Re: dbase = oleautoserver  
Jan Hoelterling
 Re: dbase = oleautoserver  
Marc VdB
 Re: dbase = oleautoserver  
Roland Wingerter
 Re: dbase = oleautoserver  
Marc VdB
 Re: dbase = oleautoserver  
Roland Wingerter
From:Marc VdB
Subject:dbase = oleautoserver
Date:Mon, 17 Jan 2005 02:51:09 +0100
Hi Folks,

not so long ago, Rich from Autotraker.Inc posted a question about dbase and
COM. COM (Component Object Model) is the base technology for Microsofts
activex, OLE and automation server objects.
Every registered automation server can be accessed in dbase with the
oleautoclient-object. What a great feature !. We can use the possibilities
of all kind of programs ... Word, Excel, IE and a whole lot of other third
party tools. But dbase itself is no automation server, and therefor all
applications written in dbase can't be used as servers for other languages.
It is not really a big problem, but i found it a challenging task to change
that (and i wanted to proove myself, that it can be done).

For those who are interested, i posted a Demo in the binaries
(oleprovider.zip), it contains a DLL called provider.dll , a dbase form
called Serverform another one called Clientform and a small Delphi
application called dbaseole.exe.

Before you read further, please register the dll like a normal
activex-object by running : regsvr32 [filepath to provider.dll]

If you look at the code in the serverform, you can see, that i use an
external function startup... this function transforms the dbase form into an
automation server, every other application, that can use these servers has
now access to this serverform.

If you run the serverform, it creates a small table and shows this table in
a grid.

To show the server in action, start a second instance of dbase itself and
launch the clientform. If you look at the code of the clientform, you see an
oleautoclient object, that connects to the server. The Serverform is now an
oleautomation-provider. I have surfaced the next() and first() methods of
the rowset and the value of the character-field in the rowset (if you do an
inspect on the oleautoclient, you will see this methods/properties). The
methods and the property can be used by the client the same way you would
control Excel or Word. The clientform can navigate the serverform and
retrieve data from the serverform...(keep in mind, that the client and the
server are totally different applications, they run in different instances
of dbase)

To show, that it is possible from within every application, that can use
automation providers, i included a small Delphi exe. Launch it and see the
Delphi.exe control the dbase form...

Enjoy the flexibility of dBase :-)

Kind regards, Marc


------
www.vdblogic.de/dbl/homee.htm
------
From:David Stone
Subject:Re: dbase = oleautoserver
Date:Mon, 17 Jan 2005 12:09:30 -0800
Hi Marc,

Amazing piece of work--dunno what you're gonna do for an encore!! ;-)

David
From:Marc VdB
Subject:Re: dbase = oleautoserver
Date:Tue, 18 Jan 2005 13:49:43 +0100
Hey David,

> Amazing piece of work--dunno what you're gonna do for an encore!! ;-)

thank you!
You won't believe it, but i have another thing in mind
To soon to talk about it though...

KR, Marc

--
------
www.vdblogic.de/dbl/homee.htm
------
From:*Lysander*
Subject:Re: dbase = oleautoserver
Date:Mon, 17 Jan 2005 08:08:51 +0100
In article , vdbsoft@web.de says...
> For those who are interested, i posted a Demo in the binaries
> (oleprovider.zip), it contains a DLL called provider.dll , a dbase form
> called Serverform another one called Clientform and a small Delphi
> application called dbaseole.exe.

Ack!
This comes in VERRRRRY handy, thank you very much.
I was not too long ago playing with this myself, but did not finish it.=20
Reality forces me more and more to write new modules in delphi, but I=20
still have and plan to maintain a huge dBase-App.

I will test it as soon as possible, but something tells me that you=20
would not post it if it wouldn't work :)

ciao,
Andr=E9
From:Marc VdB
Subject:Re: dbase = oleautoserver
Date:Tue, 18 Jan 2005 13:31:48 +0100
Hi André,

it could be handy for you, you could work with both worlds, the Delphi and
the dbase-world.
Please be aware, that the demo i posted just surface two methods and one
property, if one want to do something mare sophisticated, the DLL has to be
enhanced, to surface more of the dbase part.

Looking forward to your comments,
KR,
Marc

--
------
www.vdblogic.de/dbl/homee.htm
------
From:Jan Hoelterling
Subject:Re: dbase = oleautoserver
Date:Mon, 17 Jan 2005 09:31:22 -0600
Hi Marc,

this is awesome, thank you. Could something like this be used to control a
second instance? I have a situation where I essentially need to multi-thread
(was going to use a table to try to have the two threads communicate,
yuck!), if I could use this to control a second instance of a dBase program,
that would be very handy!

Jan
From:Marc VdB
Subject:Re: dbase = oleautoserver
Date:Tue, 18 Jan 2005 13:47:39 +0100
Hi Jan,

> this is awesome, thank you.

thank _you_

> Could something like this be used to control a
> second instance? I have a situation where I essentially need to
multi-thread
> (was going to use a table to try to have the two threads communicate,
> yuck!), if I could use this to control a second instance of a dBase
program,
> that would be very handy!

Yes, that can be done. I had not the courage to implement an event-system in
the DLL (in the COM-world this is a science of its own), so you would have
to use another system to do a synchronisation beetween the two threads, but
this should not be to complicated
(What comes to mind, is that the second thread is started as an
oleautoclient , the first thread passes the handle of a control to the
second thread, then the second thread starts working and as soon as it
terminates, it sends a direct message to the control of the first thread,
which will in consequence fire the event and can react accordingly)

If you need any help, just shout

CU, Marc

--
------
www.vdblogic.de/dbl/homee.htm
------
From:Roland Wingerter
Subject:Re: dbase = oleautoserver
Date:Mon, 17 Jan 2005 10:58:22 +0100
Hello Marc,

Marc VdB wrote:
>
> not so long ago, Rich from Autotraker.Inc posted a question about
> dbase and COM.
> [...]
> For those who are interested, i posted a Demo in the binaries
> (oleprovider.zip), it contains a DLL called provider.dll , a dbase
> form called Serverform another one called Clientform and a small
> Delphi application called dbaseole.exe.
-----
I followed your instructions and everything works as described. This is
really great and you make it look so easy. I can imagine a lot of work went
into that clever dll. I will stay tuned to see what more knowledgeable
people have to say but I believe this is a real breakthrough that opens up
new possibilities for dbase developers.

Many many thanks! And keep up the good work ;-)

Roland
From:Marc VdB
Subject:Re: dbase = oleautoserver
Date:Tue, 18 Jan 2005 13:39:37 +0100
> I followed your instructions and everything works as described.

Thanks for the testing, i did it only on my XP machine, and you never
know... ;-)

> I can imagine a lot of work went into that clever dll.

A lot of frustration too there is a lot of information about the COM
technology, but nothing is realy clear

> I will stay tuned to see what more knowledgeable
> people have to say but I believe this is a real breakthrough that opens up
> new possibilities for dbase developers.

I'm curious too, no one ever complained (except Rich but he is a special
case ) not to have the possibility to serve as automation - provider.
On the other hand it could be handy as a marketing tool for applications.
Proposing an application that can be accessed by Word or Access (not the
other way around ) could be interesting


> Many many thanks! And keep up the good work ;-)

Thanks Roland
KR, Marc


--
------
www.vdblogic.de/dbl/homee.htm
------
From:Roland Wingerter
Subject:Re: dbase = oleautoserver
Date:Wed, 19 Jan 2005 12:20:59 +0100
Marc VdB wrote:
>> I followed your instructions and everything works as described.
>
> Thanks for the testing, i did it only on my XP machine, and you never
> know...
-----
I did not say so, but you're right, I was testing on Win 2000 Pro. On my
main machine I have Win XP Home, but that was busy running a dbase program
doing some lengthy stuff.

> I'm curious too, no one ever complained (except Rich but he is a
> special case ) not to have the possibility to serve as
> automation - provider.
-----
I would have thought this is a wishlist item.

> On the other hand it could be handy as a
> marketing tool for applications. Proposing an application that can be
> accessed by Word or Access (not the other way around ) could be
> interesting
-----
Perhaps even help to sell dBASE licenses, if this functionality was part of
the core product?

Thanks again

Roland


begin 666 wink.gif
M1TE&.#EA#P`/`+,``````+^_O___````````````````````````````````
M`````````````````````"'Y! $```$`+ `````/``\```0T,$@):ITX5,'Y
MQ4 G>E,XC@`EF.MJIJSEQ>PI;C9:YZYGOQK?C12`
end

begin 666 smile.gif
M1TE&.#EA#P`/`)$!`````+^_O___`````"'Y! $```$`+ `````/``\```(N
MC V9QY$"X6(@6GGJO0!)+3RA$XDA:&Y6JGXMIX$K%G,8^2EE]G:4?&ID%+Y#
#`0`[
`
end

begin 666 biggrin.gif
M1TE&.#EA#P`/`*(``/___[V]O5G_R&.$_P```````````````"'Y! D```$`
M+ `````/``\`0 A=``,(%$B@8,&!! 40``!@(4.'!!0&B!A1H46+! 96-%A0
M@$2-'D.*S#A1(<>3%$LN=-BPX4>$)Q'"K!CR($B3-3>6%,DSI\*'#%NZ[ @Q
1*$2)&UEV?#F1ID>;`0("`#L`
`
end
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum