1. Noel Hibbard
  2. PowerBuilder
  3. Wednesday, 3 February 2021 20:41 PM UTC

I wrote a utility in C# which calls pborc190.dll to import/export source from PBLs. As of 2019 R3 this utility no longer works. I noticed that in R3, most of the DLLs have been renamed from pb*190.dll to pb*.dll. So pborc190.dll became pborc.dll. No problem, let me update my program to reference the new dll name. Well my program still isn't working. I would assume this new naming convention will cause issues for anyone calling Orca, for example PowerGen.

Has anyone else had issues calling orca on 2019 R3? My program says it can't find pborc.dll even though the dll exists and is in my path.

Who is viewing this page
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 02:01 AM UTC
  2. PowerBuilder
  3. # 1

Hi Noel,

 

The cause of the issue is that the PB Runtime Dlls are extracted into one separate folder since PB 2019 R3, so when you load the PBORC.DLL, there are no related dependent DLLs found in the same directory. We suggest you work it around as below:

BOOL AddEnvironmentPath(LPCTSTR lpAddPath)
{
   TCHAR szSysPath[1024 * 8] = { 0 };
   TCHAR szNewPath[1024 * 8] = { 0 };
 
   if(0 == GetEnvironmentVariable(_T("path"), szSysPath, 1024 * 8))
      return FALSE;
 
   _tcscpy_s(szNewPath, lpAddPath);
   _tcscat_s(szNewPath, _T(";"));
   _tcscat_s(szNewPath, szSysPath);
 
   if(0 == SetEnvironmentVariable(_T("path"), szNewPath))
      return FALSE;
 
   return TRUE;
}
 
//add the below to the front of the code to load the PBORC.dll file   
  AddEnvironmentPath(_T("C:\\Program Files (x86)\\Appeon\\Common\\PowerBuilder\\Runtime 19.2.0.2670"));
  AddEnvironmentPath(_T("C:\\Program Files (x86)\\Appeon\\PowerBuilder 19.0\\IDE\\"));
(hORCALibrary = AfxLoadLibrary("PBORC.dll")

You can also refer to the following links for details:

https://docs.appeon.com/pb2019r3/whats_new/ch01s01s02.html 

https://docs.appeon.com/pb2019r3/whats_new/code_example_in2019r3.html 

 

Regards,

Comment
  1. Noel Hibbard
  2. Thursday, 4 February 2021 18:38 PM UTC
I guess I should add a disclaimer for others who may read this thread. Hardcoding the runtime path in the user path is a BAD idea. I could see it causing issues with the IDE picking up the wrong runtimes later down the road after applying an update. I only used this method as a proof of concept and a short term band aid. You definitely want to do this in code so that the altered path only impacts the current process.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 4 February 2021 18:52 PM UTC
Thanks for clarifying this important advice for others!
  1. Helpful
  1. Mark Lee @Appeon
  2. Friday, 5 February 2021 09:04 AM UTC
Thanks for the reminder. We will add some related clarification in the documentation.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.