BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OleAutomation Server creation failure (Run time error 429)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Levend Sener
Guest





PostPosted: Mon Sep 06, 2004 9:36 am    Post subject: OleAutomation Server creation failure (Run time error 429) Reply with 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
Levend Sener
Guest





PostPosted: Mon Sep 06, 2004 12:18 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote



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





PostPosted: Mon Sep 06, 2004 1:00 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote



< There's another strange thing
Quote:


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





PostPosted: Mon Sep 06, 2004 1:32 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote

"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 Sad
Are there any documented D7 bugs concerning creation of COM/automatisation
servers ?

Levend.



Back to top
Deborah Pate (TeamB)
Guest





PostPosted: Mon Sep 06, 2004 2:03 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote

< Are there any documented D7 bugs concerning creation of
COM/automatisation servers ?
Quote:


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





PostPosted: Mon Sep 06, 2004 9:00 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote

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...
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.

--
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
Deborah Pate (TeamB)
Guest





PostPosted: Mon Sep 06, 2004 9:33 pm    Post subject: Re: OleAutomation Server creation failure (Run time error 42 Reply with quote

< is there a way to keep the form hidden (where ?) ?
Quote:


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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.