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 

Starting an exe server via VBScript

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





PostPosted: Mon Sep 11, 2006 6:36 am    Post subject: Starting an exe server via VBScript Reply with quote



Hi,

I'm experimenting with COM at the moment, and have what as far as I can tell
is a completely standard implementation with a coclass and a
TAutoObjectFactory created on initialization etc, and it works great if my
program is already running when I try to use it via a script:

Dim evo
Set evo = CreateObject("MyProgram.MyApplication")
evo.SayHello

which promptly makes a little Hello dialog appear in my app. Which is good.

The problem is that if my program is not already running and I run this
script then nothing happens for a minute or so and then I get the following
error:
"Error: ActiveX component can't create object:
'MyProgram.MyApplication'; Code: 800A01AD"
which is the same error I would get if the application isn't registered.
What I want to happen is that if the program isn't running, trying to run
this script would start the program and then continue as normal. From what
I've read I thought this would happen automatically. (I've run the program
with /regserver, and as I said it works fine when it's already running.)

So what am I doing wrong?

Any help will be much appreciated :)

Cheers,

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