Skip to Content
Former Member
Jun 24, 2015 at 07:31 PM

ConnectToNewObject returns -3


I have a .NET COM object and i registered it by checking the "Register for COM Interop" in the project properties. I used the following code in PowerBuilder

OleObject example

int return_code

string test

example = CREATE OleObject

return_code = example.ConnectToNewObject("ComExample.Class1")

IF (return_code = 0) THEN



destroy example

In my local machine everything works but if i move it to the test server, connecttonewobject returns -3. In the test server, i used REGASM to register the COM and i did find the CLSID and ProgId in the registry. I used

"REGASM.exe application.dll /codebase /tlb:application.tlb"

But still the connecttonewobject returns -3 and i am not sure why.

I have signed the project with the strong name in Visual Studio .NET and do i have to do anything while registering the dll in the server?