1. Rajkumar Paramasivam
  2. PowerBuilder
  3. Monday, 28 August 2023 07:09 AM UTC

 

Our C# application needs to use a specific business feature within a PowerBuilder application. As advised by our technical team, the C# application will send instructions to the PowerBuilder application using commands. The PowerBuilder application will then carry out these instructions and send back results to the C# application.

This entire interaction takes place through a communication process facilitated by Windows API functions, such as CreateProcess. While I'm not very familiar with this Windows Process functionality, I'm seeking guidance on how to effectively incorporate and utilize this child process within the PowerBuilder application.

 

Rajkumar Paramasivam Accepted Answer Pending Moderation
  1. Friday, 27 October 2023 04:39 AM UTC
  2. PowerBuilder
  3. # 1

Thanks for your help on this. TO make it simple, i used ExitProcess function to return value to parent process.

 

ExitProcess( long exitcode ) Library "kernel32.dll"

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 28 August 2023 13:41 PM UTC
  2. PowerBuilder
  3. # 2
Comment
There are no comments made yet.
Rajkumar Paramasivam Accepted Answer Pending Moderation
  1. Monday, 28 August 2023 09:18 AM UTC
  2. PowerBuilder
  3. # 3

Thanks Miguel. Can this .Net assembly logic can be used in application that does not have .Net assembly Target?

Comment
  1. Andreas Mykonios
  2. Friday, 27 October 2023 06:00 AM UTC
.Net assumbly targets are obsolete. They aren't available in Powerbuilder 2022 R2. It would be useful to let us know what version of Powerbuilder you are using.

Andreas.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 27 October 2023 12:23 PM UTC
You can create a simple C# DLL in .Net using Visual Studio. Then use the DLL importer tool (or have the DLL made as an ActiveX wrapped DLL and then use OLE). Since you are on maybe an older version, the dll importer tool might not be there.

Your solution of using ExitProcess is a nice and simple one too.

regards.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 28 August 2023 07:53 AM UTC
  2. PowerBuilder
  3. # 4

If you are using PB 2022, you don't have to use the CreateProcess API: See https://docs.appeon.com/pb2022/application_techniques/Triggering_PowerScript_events_from_code.html

regards.

Comment
  1. Miguel Leeuwe
  2. Monday, 28 August 2023 08:15 AM UTC
(I've edited my answer as I wasn't sure about the other information that I was giving).
  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.