?
Solved

ActiveX component can't create object...

Posted on 2002-07-27
10
Medium Priority
?
347 Views
Last Modified: 2013-11-13
Hello,
I have 2 PCs on a LAN, both running Win98.
I wrote a samll server test application (ActiveX EXE) which contains one function that just shows a message box.
I wrote a client that calls the server above (with CreateObject("ServerApp.ClassName",ServerName)) and it works just fine on the same PC.
I put the server application on the 2nd PC (opened it inside VB on the 2nd PC and compiled it), and I called it from the 1st PC. I always get the error message "ActiveX component can't creat object" or "Remote server machine does not exist..."!!!
Does anybody know how can I solve this problem?
I tried both the machine name as well as the IP address but I always get the same error message.

Thank you in advance.
0
Comment
Question by:BigBoss
10 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7183105
why you use late binding in first place?
CreateObject is not a magic thing.
Maybe is not your component which has trouble. Check for any missing dll.
You could replace intrinsic CreateObject with this to see "which" object cannot be created:


When working on a large VB application that uses hundreds of COM objects, the "429 can’t create object" error doesn’t give you much help in determining which object could not be created. You can get around this limitation by writing a function to wrap the VB runtime CreateObject function:

Public Function CreateObject(sProgID as string) _
as object
On Error Goto CreateErr
' Call the VB runtime CreateObject function
Set CreateObject = VBA.CreateObject(sProgId)
Exit Function
CreateErr:
' return the error with the name of the object
'that could not be created
Err.Raise Err.Number, _
"CreateObject Wrapper", Err.Description & _
": '" & sProgID & "'"
End Function
With this wrapper function, you get the 429 error and the name of the object that could not be created.

0
 
LVL 1

Expert Comment

by:ariell
ID: 7183111
0
 
LVL 5

Expert Comment

by:jayeshshah
ID: 7183155
for this you would have to register the ActiveX Server of the 1st PC on the second PC. go to references & then select the ActiveX exe from the 1st PC & run the 2nd Application on the second PC.
This shall work.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 2

Expert Comment

by:priya_pbk
ID: 7184450
hi BigBoss,

Both Richie and jayesh are right. First of all you dont have to late bind it and secondly, you have to register the dll/exe if you are using it in an vb application in the 2nd machine and not while opening the appllication.

This is how you should be using it:

If you have created a Active dll/Active exe, by say make dll/exe, then register it in a particular machine which shall be used my different client applications.

You have to register it this way:
Go to start-> ie (ctrl+esc)
and select "RUN"
and write/browse to the path where you have mad the .dll/exe file, for example like this..

regsvr32.exe C:\winnt\system32\myutil.exe

-----------------------------------

Then in you client application you should just reference it by going to Project->References> and selecting that dll in system32 (this is early binding)

Therefore when you use it across you network machines, you have to just register in that pc, by simply going to start menu-> run and writing the above line.ie

regsvr32.exe C:\winnt\system32\myutil.exe

Now if you early bind it then your functions and other procdeures will be automatically be exposed in the appliation and you won't get the error.

Hope this helps!

-priya

0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7185135
Project Properties | Component choose remote server files

You have to compile for remote activation and configure the server for remote activation

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7185212
Hi BigBoss, any feedback please?
0
 

Author Comment

by:BigBoss
ID: 7738972
Hi everybody,
I have requested my old *unanswered* questions to be deleted. So I just wanted to comment the questions.

Regarding this one, I have tried to fix the problem by following what have been proposed by ariell (because everything else I have already done before even asking the question)...but to no avail!
So, I have changed the logic and used winsock to exchange data between the two applications.

Thanks to everybody for trying to help.
0
 
LVL 1

Expert Comment

by:ariell
ID: 7739418
just before u leaving, have u read the following KB?

http://support.microsoft.com/default.aspx?scid=kb;en-us;161837

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8049024
Hi BigBoss,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

BigBoss, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8095962
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question