| View previous topic :: View next topic |
| Author |
Message |
Levend Sener Guest
|
Posted: Mon Sep 06, 2004 9:36 am Post subject: OleAutomation Server creation failure (Run time error 429) |
|
|
Hi everybody,
I tried to develop a very simple OleAutomation server (just to get into the
stuff).
Did all steps as described in the D7 help, i.e. created a new project, added
a new automation object etc.
The only function of this object was a routine to return a long value called
'test'.
Registration of the object was successfull, could see the object in the list
of available automation objects. Setting reference in VBA editor was also
ok.
Now I wrote a test routine to call the object:
sub test
dim x as new MyObj.Object
debug.print x.test
end sub
At the debug.print ... line always an error 429 occurs, saying that the
object creation by the ActiveX component failed.
Curiously the demo application 'memoedit' works perfectly ... although I
couldn't find any differences ?!
TIA,
Levend.
|
|
| Back to top |
|
 |
Levend Sener Guest
|
Posted: Mon Sep 06, 2004 12:18 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
There's another strange thing: if I take the demo project (memoedit in
demosActiveX directory), add a third COM class to the existing two and
compile®ister the automation server, I can use both Memo classes without
any problems - but not my new third class ?!
Even stranger: the third class is a copy of MemoApp !
TIA,
Levend.
"Levend Sener" <Levend.Sener (AT) NOSPAM_think-factory (DOT) de> schrieb im Newsbeitrag
news:413c2f01 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi everybody,
I tried to develop a very simple OleAutomation server (just to get into
the
stuff).
Did all steps as described in the D7 help, i.e. created a new project,
added
a new automation object etc.
The only function of this object was a routine to return a long value
called
'test'.
Registration of the object was successfull, could see the object in the
list
of available automation objects. Setting reference in VBA editor was also
ok.
Now I wrote a test routine to call the object:
sub test
dim x as new MyObj.Object
debug.print x.test
end sub
At the debug.print ... line always an error 429 occurs, saying that the
object creation by the ActiveX component failed.
Curiously the demo application 'memoedit' works perfectly ... although I
couldn't find any differences ?!
TIA,
Levend.
|
|
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Mon Sep 06, 2004 1:00 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
<
There's another strange thing
Aha. I've seen reports of a problem that can arise with
three or more coclasses in a type library.
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html
|
|
| Back to top |
|
 |
Levend Sener Guest
|
Posted: Mon Sep 06, 2004 1:32 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
"Deborah Pate (TeamB)" <d.pate (AT) blueyonder (DOT) co.not-this-bit.uk> schrieb im
Newsbeitrag news:VA.00001edc.04a09cec (AT) blueyonder (DOT) co.not-this-bit.uk...
| Quote: | Levend Sener:
There's another strange thing
Aha. I've seen reports of a problem that can arise with
three or more coclasses in a type library.
|
I don't know if this is the core problem ... however the whole behaviour is
strange
Are there any documented D7 bugs concerning creation of COM/automatisation
servers ?
Levend.
|
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Mon Sep 06, 2004 2:03 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
<
Are there any documented D7 bugs concerning creation of
COM/automatisation servers ?
I can't think of a relevant one offhand, but have you
looked in Quality Central?
http://qc.borland.com/
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html
|
|
| Back to top |
|
 |
Levend Sener Guest
|
Posted: Mon Sep 06, 2004 9:00 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
Found the solution: the project needs a form which must be created at
startup ... but why does a COM server needs a UI ?
BTW: to get rid of a visible form I move it outside screen area at creation
time, is there a way to keep the form hidden (where ?) ?
Levend.
"Deborah Pate (TeamB)" <d.pate (AT) blueyonder (DOT) co.not-this-bit.uk> schrieb im
Newsbeitrag news:VA.00001edc.04a09cec (AT) blueyonder (DOT) co.not-this-bit.uk...
|
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Mon Sep 06, 2004 9:33 pm Post subject: Re: OleAutomation Server creation failure (Run time error 42 |
|
|
<
is there a way to keep the form hidden (where ?) ?
Put
Application.ShowMainForm := False;
before the call to Run in your project (dpr) file.
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html
|
|
| Back to top |
|
 |
|