1. Edgar Gorodetsky
  2. PowerBuilder
  3. Tuesday, 14 March 2023 17:30 PM UTC

We’re currently using PowerBuilder 2021 and I have a question about a possibility of executing functions within PowerBuilder that are part of external DLLs (generated within VS dot net environment).  I’d like to explore possible ways of achieving it.  Would you please advise me on that as soon as possible.

 Thank you

Edgar Gorodetsky Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 19:58 PM UTC
  2. PowerBuilder
  3. # 1

Thank you for your help.  I have another question. Where can I find necessary dlls to deploy this process.  I understand I have to store some dlls in the same folder where my application executable is?  The help section is not particularly clear on this.  Please advise.  Thank you.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 March 2023 20:13 PM UTC
Hi Edger;

In the PB Help, perform a keyword search on the value "runtime". Then follows the "List of runtime files" link . HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 17:45 PM UTC
  2. PowerBuilder
  3. # 2

Adding to what Chris said, there is good Elevate session recording about using the .NET DLL Importer: https://www.appeon.com/conference/elevate-2020/live?id=251

Also, we have further enhanced the .NET DLL Importer in PB 2022 so you might want to consider to upgrade: https://docs.appeon.com/pb/whats_new/Enhancements_to_calling_NET_assemblies.html

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 17:42 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Edgar -

I suggest you read the following chapter in the Application Techniques publication:

    https://docs.appeon.com/pb2021/application_techniques/Calling_C_Assembly_in_an_Application.html

Best regards, John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 17:41 PM UTC
  2. PowerBuilder
  3. # 4

Hi Edgar;

  Is this what you are looking for ... https://docs.appeon.com/pb/whats_new/ch04s01s03.html

Regards ... Chris

Comment
  1. Edgar Gorodetsky
  2. Monday, 10 July 2023 16:39 PM UTC
Hello again,



We're utilizing "https://docs.appeon.com/pb2021/application_techniques/Calling_C_Assembly_in_an_Application.html"; sample of the PowerScript code that calls the C# assembly after the import, without encapsulating the DotNetAssembly object. While it works on a particular machine where the powerbuilder is installed via executable located on a network drive, it crashes when that same executable of deployed application is accessed via laptop pc (via VPN). Would you please advise what can be done to correct this issue.



Thank you
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 11 July 2023 20:26 PM UTC
Hi Edgar;

1) Make sure that when you import the C# DLL that you do *not* specify any path to the assembly

2) Make sure that you deploy the DotNet PB runtime interface DLLs (PBDotNet.dll, PBDotNetFrameworkInvoker.dll, PBDotNetCoreInvoker.dll ) ...

https://docs.appeon.com/pb2021/application_techniques/Deploying_Applications_and_Components.html

HTH

Regards ... Chris

FYI: https://docs.appeon.com/pb2019r2/application_techniques/ch20s02.html
  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.