|
-
Sep 28th, 2004, 08:13 AM
#1
Thread Starter
Junior Member
processidtosessionid api (terminal services)
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.
-
Sep 29th, 2004, 12:00 AM
#2
I have a similar issue. I need to kill any previous instances of my
app on a terminal server and not other users instances. I got
about as far as just enumerating the processes looking for the
module name matches. Maybe this will help you and if you get it
let me know how. Look at Wokawidget's post.
terminate+process
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|