Search code examples
windows-7vb6windows-server-2008com+dcom

How to work with DCOM using VB6 app? I get 462 error


We have a VB6 application that uses some DLLs on local machine. Now we want to distibute the DLLs on a remote COM+ Server.

I have registred a COM application on the server and exported it as a proxy .msi installer, installed it to my local machine.

when starting the application it shows an error saying "Runtime error '462' The remote server machine does not exist or is unavailable".

When I tried debuging I have found that it fails calling one of my distributed DLLs.

Question : What I am doing wrong ? and what can I do to solve it?

Dim oRefE As UtilitairesClientMal.Erreurs
Dim oRefTR As UtilitairesClientMal.TablesReference

Set oRefE = New UtilitairesClientMal.Erreurs 'it fails here and jumps to next hilighted line

g_sNomMachine = oRefE.NomMachineConnecte
g_sNomUtilisateur = oRefE.NomUtilisateurConnecte
Set oRefE = Nothing

........

Dim MonErreur As ALWErreur.Erreur

Set MonErreur = New ALWErreur.Erreur
  • The local machine is W7 ( 32 bits )
  • The server is Windows Server 2008 ( 32 bits )

Please be kind :) if anyone needs clarification that may help just comment ( I am not very experienced with VB6 nor with COM+ so excuse my ignorance :( )


Solution

  • The exacte problem was related to the fact that my server have two Network Adapters.

    I fixed it by using the IP Address instead of server name :

    On my clinet machine > dcomcnfg > MYAPP Properties > Activation > Remote Server Name

    Then I got a securtiy error saying "Permission denied (70)", I fixed it by changing security limits :

    On the Server > dcomcnfg > Computers > Properties > COM Sercurity > checked : Remote execution for "EVERYONE"

    I hope it helps someone, one day. If anyone needs explanation I'd be happy.

    Thanks to jac he gave me an idea about the problem.