0

I am working on project where i am connecting dot net dll in powerbuilder . In dll project at dot net i am referencing two more dlls . My project dll is made COM type and it has been registered successfully using regasm.exe "mydll.dll" in dot net version directory. I can see the registry entry in my windows registry but when I test on other machine, it throws exception of connecting to com object failed return -3.

I am stuck badly and unable to figure out the solution.

Here in my code for powerbuilder:

dw_data.accepttext()
oleobject obj
obj= create oleobject
ll_obj= obj.connecttonewobject("classname")
IF ll_obj < 0 THEN
    DESTROY obj
    MessageBox("Verify","Connecting to COM Object Failed Error: " + String(ll_obj))
    Return
END IF

ll_obj returns -3 in other machines .

Any helping hand around ?

Muhammad Saeed
  • 81
  • 3
  • 10

1 Answers1

0

From a quick Google search on 'connecttonewobject' I found this suggestion:

Have all classes a strong name?

Are all classes installed in the GAC?

Bruce Armstrong also suggests using Dependency Walker to assist in determining that all objects are deployed on the machine running the code.

Matt Balent
  • 2,337
  • 2
  • 20
  • 23