Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Pass5107 Absent Member.
Absent Member.
1932 views

Retrieving Windows user name and Computer name in Thin CLient

Using Thin Client I want to get the Windows users name and computer name from the client side, I am getting the user name and computer name from the server, I know I can get information using dll's such as Kernel GDI32 this particular dll is ADVAPI32.DLL and then I am calling GetUserNameA,  GetComputerNameA this works just file if the connection is a mapped drive to the server. I used one of the sample programs GETUSERNAMEANDOS.cbl to get the logic and into one of our standard programs. I have been able to get the other information from the kernel.dll in thin client but not the ADVAPI32.DLL, any ideas?

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: Retrieving Windows user name and Computer name in Thin CLient

ACCEPT TERMINAL-ABILITIES FROM TERMINAL-INFO. Move CLIENT-MACHINE-NAME to some-ws-value
ACCEPT SYSTEM-INFORMATION FROM SYSTEM-INFO. MOVE USER-ID to some-other-ws-value
0 Likes
Pass5107 Absent Member.
Absent Member.

RE: Retrieving Windows user name and Computer name in Thin CLient

There is an issue with this in Thin Client it adds garbage to the end of the computer name and I reported it back to MF, also, these fields are left blank when running the software as a mapped networked drive, the cleanest solution was calling the advapi32.dll (which by the way must be lower case) and kernel.dll to get the necessary information, but thank you answering the posted question
0 Likes
aw_muench Respected Contributor.
Respected Contributor.

RE: Retrieving Windows user name and Computer name in Thin CLient

Just an additional information:
Thinclient adds a minus sign plus the system pid in hex to the machine name.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.