• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Workstation ID From TSE Client

Dear List

Hi , this is my first time on the list.
I need to trap the local TSE Client Computer ID. I am using BSFN B9800181(GetLocalComputerId) and it works fine for FAT CLIENTS. However when I run the application on a TSE client the ID I get is the TSE Server ID.
Any help would be appreciated. Thanks .

One World Xe SP 14.2 .......Sun Solaris 7.2
Oracle 8.1.6.3.0........Deployment NT4 SP6
TSE CLIENT : WINDOWS 98 & NT
TSE SERVER: WINDOWS NT 4.0 SP6



REGARDS
Preggi.Naidoo@Smiths.CO.ZA
PHONE: +27317194056
MOBILE:+27829035857
 

David Robertson

Reputable Poster
Seeing as this is your first post, I hope you get better replies than mine, but welcome to the list anyway.

I don't know of any way that you can tell the client machine ID from within OneWorld, as you've already noted you will only get the actual TSE machines ID. If you can get it from the TSE somehow, then it may be possible to write a business function that would retrieve it and pass it back to your OneWorld APPL.

I know this probably doesn't help much, but I hated to see someone new to the list go unanswered and unwelcomed, and a good question also.

Regards,
David
 

tom_brown

Active Member
the TSE server ID is the workstation id when running on TSE. There is no
other computer ID available.

Sorry for the negative answer!

cheers

tom brown
 
The client name is available as a DOS environment variable called CLIENTNAME. Not sure if there is a Oneworld BSFN that can return dos variables.

XE SP15, Oracle 8.1.6 on W2K,Citrix/W2K, NT 4.0
 
Before I get dinged, CLIENTNAME may only exist under Citrix Metaframe. I don't run TSE without Citrix so I'm not sure.

XE SP15, Oracle 8.1.6 on W2K,Citrix/W2K, NT 4.0
 

Zoltan_Gyimesi

Legendary Poster
Hi Preggi,

First of all, You are welcome on the Forum List!

Have your problem already resolved? If yes then please, let us know how. I am also curious to it. If not then:

1.) Try to use B9800182 Get Local ClientMachine ID (I haven't tried yet!)

2.) Try to use the parameter szWorkstation_UserId of B980010 Get Audit Information. Although it pass back a 10 char long name though machine name could be 15 char long (at least on NT).

Excuse me, I can not try any of these tips because I haven't access to a TSE environment.

The second tip is especcially interesting that does it work or dos not becasue this BSFN is used widely in OW to place Audit Informations into records of many-many OW tables.

Please, update your thread to let us know your results! Thanks in advance!

You are welcome!

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
I have used both BSFN B9800182 and BSFN B980010 . Both these functions return the ID of the TSE Server. I have yet to come across a solution for this problem but when I do I will keep the list updated.
Thanks for the input.

One World Xe SP 14.2 .......Sun Solaris 7.2
Oracle 8.1.6.3.0........Deployment NT4 SP6
TSE CLIENT : WINDOWS 98 & NT
TSE SERVER: WINDOWS NT 4.0 SP6

REGARDS
Preggi.Naidoo@Smiths.CO.ZA
PHONE: +27317194056
MOBILE:+27829035857
 

WhippingBoy

VIP Member
Well, how brave are you? Maybe this really needs some 'out of the box' thinking.

Here's an idea, and it's actually pretty simple to do. Well, it SHOULD be simple.. . . ok, conceptually it's simple.

Use the WTS API.

Take a good look at this function. . .

WTSQuerySessionInformation
The WTSQuerySessionInformation function returns information about the specified session on the specified Terminal Server.
BOOL WTSQuerySessionInformation(
HANDLE hServer,
DWORD SessionId,
WTS_INFO_CLASS WTSInfoClass,
LPTSTR *ppBuffer,
DWORD *pBytesReturned
);

Of interest to you is this parameter:
WTSInfoClass
Specifies the type of information to retrieve from the specified session. This parameter can be one of the values from the WTS_INFO_CLASS enumeration type

and more specifically this value in that parameter:

WTSClientName
Pointer to a null-terminated string containing the name of the client (returned in *ppBuffer).


Get the API doc from microsoft here and look on page 32:

http://www.microsoft.com/ntserver/techresources/deployment/terminal/api.asp


Happy coding!


Darren Ricciardi - OneWorld Whipping Boy

Looking for work in Amsterdam THE NETHERLANDS
 

David Robertson

Reputable Poster
Seeing as there was never a closure to this problem, I thought I quickly add a BSFN that works for me:

nLengthOfName = ExpandEnvironmentStrings("%CLIENTNAME%\0", lpDS->szMachineID, 55);

if ((jdestrncmp( (char*)(lpDS->szMachineID), (char*) "%CLIENTNAME%\0", sizeof(lpDS->szMachineID))==0) || (nLengthOfName == 0))
{
if (!jdeGetHostName(lpDS->szMachineID, sizeof(lpDS->szMachineID),1))
{
return ER_ERROR;
}
}

The CLIENTNAME variable seems to be set for for out TSE clients (we are running Citrix), if that fails it returns the standard JDE vaerion.

I've looked at the WTS API WTSQuerySessiobInformation, but that requires a little more work to get it set up. Seeing as the environment variable method seems to work, I've left it at that for now.

Happy hunting...
 
Top