Board index » delphi » Late binding with a In-process server doesn't work

Late binding with a In-process server doesn't work

Is anyone familiar with the following problem:

I have made a Automation server in Delphi. It's a DLL and is an in-processs
server.
It's meant to be used with Visual Basic (Early binding + Late binding ) and
Powerbuilder (late binding)

When I use late binding in either of the languages, I get an access
violation and CPU debug window
shows me a line in the machinecode of the call TAutoObjects.GetIdsofnames
which is called before
IDispatch.Invoke. Although Visual BAsic has an alternative for late binding,
I need this to work in Powerbuilder also ?

Does anyone have a solution ?
(SOurce code available if need be )

Thanks in advance,
Frank van den Thillart
CMG

 

Re:Late binding with a In-process server doesn't work


<<Frank van den Thillart:
Does anyone have a solution ?
(SOurce code available if need be )

Quote

The lines in *your* source code just before
the AV would be helpful. All latebound
calls go through GetIDsOfNames, so that
doesn't tell us much.

--
Deborah Pate

Re:Late binding with a In-process server doesn't work


I get the access violation before any of my sourcecode is touched. With the
first method call
, it blows up. I haven't implemented a GetIdsofnames procedure but according
to my documentation
(Delphi 5 eveloper's guide: The authoritative solution, Authors: Steve
Teizeira and Xavier PAcheco )
Delphi takes care of that messy implementation detail

"Frank van den Thillart" <Enigma...@hotmail.com> schreef in bericht
news:39583305@dnews...

Quote
> Is anyone familiar with the following problem:

> I have made a Automation server in Delphi. It's a DLL and is an
in-processs
> server.
> It's meant to be used with Visual Basic (Early binding + Late binding )
and
> Powerbuilder (late binding)

> When I use late binding in either of the languages, I get an access
> violation and CPU debug window
> shows me a line in the machinecode of the call TAutoObjects.GetIdsofnames
> which is called before
> IDispatch.Invoke. Although Visual BAsic has an alternative for late
binding,
> I need this to work in Powerbuilder also ?

> Does anyone have a solution ?
> (SOurce code available if need be )

> Thanks in advance,
> Frank van den Thillart
> CMG

Re:Late binding with a In-process server doesn't work


<<Frank van den Thillart:
I get the access violation before any of my
sourcecode is touched. With the first method
call, it blows up. I haven't implemented a
GetIdsofnames procedure
Quote

You don't need to, it is already implemented and called for
you whenever you call a method by late binding. So it is
the first method call that is the problem, either because
there is something wrong with it, or because there is
something wrong with your object: perhaps that it hasn't
been created at all. Show us your source and we might be
able to help.

--
Deborah Pate

Re:Late binding with a In-process server doesn't work


Hoi Frank,

I don't know if this is the cause of your problem, but you
forget to call  "inherited initialize" inside your "tcomtrace.initialize"

--
Arthur Hoornweg
(To answer me, please remove the ".net" from my e-mail address)

Re:Late binding with a In-process server doesn't work


Well, don't I feel sheepish

In other words, Arthur thanks. That was the solution. My face reddened when
I saw the mistaken

Thanks to ne1 who devoted time to this

Frank van den Thillart

"Arthur Hoornweg" <arthur.hoorn...@planet.nl.net> schreef in bericht
news:8juskg$6141@bornews.borland.com...

Quote
> Hoi Frank,

> I don't know if this is the cause of your problem, but you
> forget to call  "inherited initialize" inside your "tcomtrace.initialize"

> --
> Arthur Hoornweg
> (To answer me, please remove the ".net" from my e-mail address)

Re:Late binding with a In-process server doesn't work


You're welcome! I'm new to activeX myself and exactly the
same thing kept me awake a couple of weeks ago...

--
Arthur Hoornweg
(To answer me, please remove the ".net" from my e-mail address)

Other Threads