• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

ActiveX component can't create object...

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
BigBoss
Asked:
BigBoss
1 Solution
 
Richie_SimonettiIT OperationsCommented:
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
 
jayeshshahCommented:
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
priya_pbkCommented:
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
 
corvanderlindenCommented:
Project Properties | Component choose remote server files

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

0
 
Richie_SimonettiIT OperationsCommented:
Hi BigBoss, any feedback please?
0
 
BigBossAuthor Commented:
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
 
ariellCommented:
just before u leaving, have u read the following KB?

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

0
 
DanRollinsCommented:
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
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now