Solved

ActiveX component can't create object...

Posted on 2002-07-27
10
325 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
Comment Utility
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
Comment Utility
0
 
LVL 5

Expert Comment

by:jayeshshah
Comment Utility
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
 
LVL 2

Expert Comment

by:priya_pbk
Comment Utility
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
Comment Utility
Project Properties | Component choose remote server files

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

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
Hi BigBoss, any feedback please?
0
 

Author Comment

by:BigBoss
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now