Hi,
I created a test PB app calling a single custom C# DLL function 'getName(jsonstring)' using OleObject and ConnectToNewObject( classname ) approach.
I had the app compiled as 32 bit.
The compiled exe is able to succesfully create/instantiate the OleObject, connect, call the function and get the return value.
But when i go into IDE debug and track thru the code, PB is not able to connectonewobject. It's returning -3 error: Object could not be created.
Here's the code...
long ll_return
string ls_return, ls_json = 'xyz'
OleObject lole_sm
lole_sm = Create OleObject
ll_return = lole_sm.ConnectToNewObject(is_className )
choose case ll_return
case 0
try
ls_return = lole_sm.GetName(ls_json)
catch(RunTimeError re)
ls_return ="Error "+string(ll_return)+ ": Failed secret call. " + re.text
end try
case -1
ls_return = 'Error -1: Invalid Call: the argument is the Object property of a control.'
case -2
ls_return = 'Error -2: Class name '+is_className+' not found'
case -3
ls_return = 'Error -3: Object could not be created'
case -4
ls_return = 'Error -4: Could not connect to object'
case -9
ls_return = 'Error -9: Other error'
case -15
ls_return = 'Error -15: COM+ is not loaded on this computer'
case -16
ls_return = 'Invalid Call: This function not applicable'
case else
ls_return = 'Unknown error'
end choose
destroy lole_sm
return ls_return
PB Version: 2017 R3 Build 1915
C# .Net registered using regasm.exe
Need help to understand why in IDE debug mode am getting an error while in exe compiled mode there is no error.
Thanks,
Edmundo
Regards ... Chris