We have couple of existing PB applications in version PB12.5.2 which are of .NET win forms target.
We noticed that this target is no longer available in PowerBuilder 2017 R3.
What is the workaround to migrate these applications to the new version. We need this application as a .NET target since we are referencing a COM Visible .NET DLL to call the methods inside the DLL.
We also tried to use the appeon_workaround.pbl but it is not returning back the result from the DLL method. The code looks like below. We also deployed the application and tried to run from the EXE. It didn’t work either. The return argument – iResult is NULL. There is no error however when we call the function.
Appreciate if you could address this and let us know how we can migrate this application to the new version.
long lRet
string iResult
string strError
string ls_cipher_string = ‘TEST’
appeondotnetcomponent comcaller
any paramlist[]
comcaller = create appeondotnetcomponent
comcaller.componenttype = '1'
comcaller.typelib = 'HelloWorld.dll'
comcaller.classdescript = 'Program'
// invoke component method
paramlist[1] = ls_cipher_string
lRet = comcaller.of_execinterface( "SayHello", paramlist)
if lRet = 0 then
iResult = string(comcaller.ReturnValue)
messagebox('Hi', iResult)
else
strError = comcaller.ErrorText
end if
I tried doing this by making the DLL COM Visible / COM Invisible. Both failed. I am able to recompile the app, but when i run it, it gives me an error saying 'Error accessing external function'.
Why is it so damn hard just because I am trying to upgrade to a newer version of PB? If something is removed, then shouldnt there be an easy way to migrate existing apps?