hi everyone,
i have an api call that gets the process id of an application (to get the path of the exe that is running) and in a terminal services environment i need to determine which Terminal Services session that process is using. I am trying to detect if the user is already in an application before logout, and the current procedure is returning the programs from different sessions, and i need to sort them out. I found documentation on msdn for a processidtosessionid api call, but they do not have a vb implementation example. has anyone used this? is this the right approach?

thanks in advance for your help.

m.