1. Aniesh Nanu
  2. PowerBuilder
  3. Monday, 16 November 2020 03:17 AM UTC

We have a PB Application, say a LoginApp.
Users login to this application. Their username, password, access rights information validated/handled in this application.
There are other PB applications AppA, AppB, AppC, etc., which communicate to this LoginApp.
They get the information from the LoginApp, like who is the user logged in, which department, what's his role etc.,.
whenever user opens a window in AppA, it checks with LoginApp that this user has right to access this window.
based on the reply from LoginApp, AppA allows or denies to open the window for the user.
This whole communication is managed by DDE method (StartServerDDE, GetRemote, Remoterequest, SetDataDDE methods used).
Since DDE is deprecated by Microsoft, what is the best way to replace this DDE communication?
without affecting the nature of the applications and communication currently happens.

note: each app connects to different dbs. oracle 12c

We are using PB2017 R3, windows10 64 bit PCs. Also we use remote desktop services  windows 2016 OS.

 

Thanks.

Kevin Ridley Accepted Answer Pending Moderation
  1. Tuesday, 24 November 2020 21:18 PM UTC
  2. PowerBuilder
  3. # 1

You could also put the security info in the DB, and query the db instead of the other app.

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 24 November 2020 17:17 PM UTC
  2. PowerBuilder
  3. # 2

Try using Winsock. I have an example:

https://www.topwizprogramming.com/freecode_winsock.html

 

Comment
  1. Aniesh Nanu
  2. Wednesday, 25 November 2020 01:55 AM UTC
Hi Roland,

I have already tried it and it is working perfect. Thank you.

Only thing is when using Remote Desktop Services.

About 20 Users will be login to one RDS Server. Each User will be login to the app. So got to dedicate One Port number per User. Few users will use Virtual PCs and other few will use Physical PCs. I got to create a setup in db table, with username, hostname and port number.
  1. Helpful
  1. Roland Smith
  2. Wednesday, 25 November 2020 04:17 AM UTC
I hope that you are encrypting the data being sent back and forth and between the LoginApp and the system that it talks to when validating the user.
  1. Helpful
There are no comments made yet.
Aniesh Nanu Accepted Answer Pending Moderation
  1. Monday, 23 November 2020 02:47 AM UTC
  2. PowerBuilder
  3. # 3

Hi Chris,

Thanks for your reply.

Using FindWindow and Send method, how will the LoginApp identify, who is the caller and send him a reply?.

lets say, after get handle of LoginApp, App-A triggers pbm_custom01 event of LoginApp. how will LoginApp identify, who is the caller and send him a reply?.

I am puzzled. Appreciate your guidance. 

Thank you.

- Aniesh Nanu

Comment
  1. Chris Pollach @Appeon
  2. Monday, 23 November 2020 02:56 AM UTC
Hi Anish;

The Send() command is very basic. It can pass the handle of the sender so that the receiver can send a response. However the data passed is rudimentary. Your can use the Send API though and pass in a text string which you can parse out various values.

For more complex data passing & responses though, I would look at TCP/IP (WinSockets) instead.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 16 November 2020 03:30 AM UTC
  2. PowerBuilder
  3. # 4

Hi Anish;

   Probably the closest replacement that preserves your peer to peer current App design is to

A) move to a based TCP/IP based communication model

B) use App to App message model (ie using the Send Command)

   Whether to use A or B will depend on the complexity of your current DDE model.

Regards... Chris

Comment
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.