?
Solved

ActiveX component can't create object...

Posted on 2002-07-27
10
Medium Priority
?
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

777 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