After some more digging, I was able to generate the code. Here is the complete code if anyone is interested.
Declare Auto Function WTSQuerySessionInformation Lib "wtsapi32.dll" ( _
ByVal hServer As Integer, _
ByVal SessionId As Integer, _...
I am trying to get the client's machine name when a user logs onto a Terminal Server. I would like to use the Terminal Server api - wtsapi32.dll. I have found several posts on the Internet that use the wtsapi32.dll but they all refer to C# or VB6. When I try to translate them to VB.Net, the...