Link to home
Start Free TrialLog in
Avatar of BigBoss
BigBoss

asked on

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.
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

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.

Avatar of ariell
ariell

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

Project Properties | Component choose remote server files

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

Hi BigBoss, any feedback please?
Avatar of BigBoss

ASKER

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.
just before u leaving, have u read the following KB?

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

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
ASKER CERTIFIED SOLUTION
Avatar of SpideyMod
SpideyMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial