1. jean-louis cantin
  2. PowerBuilder
  3. Friday, 28 June 2024 08:00 AM UTC

Good morning,
I launch an application in a TSE session. This application is in PowerBuilder 19 R3.
In this session, I need to retrieve the name of the remote machine that started the TSE session.
For this I use the following function:

Function ulong GetEnvironmentVariableW (ref string lpName, &
ref string lpBuffer, &
ulong nSize &
) library "kernel32.dll" alias for "GetEnvironmentVariableW;"

This function does not return the expected name.

Can you help me solve this problem?

Thank you for your help

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 28 June 2024 13:37 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Jean-Louis -

Unsure of what "TSE" is, I had to resort to doing a search and it came back with 68 possible meanings. I'm guessing you are referring to Terminal Server Edition and not Tokyo Stock Exchange nor Treated Sewage Effluent?

What specific Windows environment variable did you request via the WinAPI function call?

Best regards, John

Comment
There are no comments made yet.
jean-louis cantin Accepted Answer Pending Moderation
  1. Friday, 28 June 2024 14:00 PM UTC
  2. PowerBuilder
  3. # 1

Good morning,
Thank you for your feedback.
Indeed TSE is Terminal Server Edition:)

The parameter sent to the function is CLIENTNAME
Maybe I should use the USERNAME parameter

I’ll try

Comment
  1. John Fauss
  2. Friday, 28 June 2024 18:45 PM UTC
I'm very glad to learn that your issue has been resolved, Jean-Louis. Good luck with your project!
  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.