|
-
Oct 21st, 2007, 10:25 PM
#1
Thread Starter
Fanatic Member
Lock Computer Programmatically
hi guys! Is it posible to lock my WIndows XP programmatically? If so, can you help me how..Thanks in advance!
-
Oct 22nd, 2007, 12:04 AM
#2
Re: Lock Computer Programmatically
You use the LockWorkstation API function.
-
Oct 22nd, 2007, 12:21 AM
#3
Thread Starter
Fanatic Member
Re: Lock Computer Programmatically
thanks JM...
solution:
Code:
[DllImport("user32.dll")]
public static extern void LockWorkStation();
...im just curious, how can i get the list of available API Function from the user32.dll?
-
Oct 22nd, 2007, 02:58 AM
#4
Re: Lock Computer Programmatically
http://allapi.mentalis.org Download the API Viewer utility.
You may also want to search MSDN as they have everything including the 7000+ new Vista APIs.
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 
-
Oct 22nd, 2007, 04:40 AM
#5
Re: Lock Computer Programmatically
You'll want to get the API Guide from that same link. The Guide basically reproduces the MSDN documentation but it adds a little more in many cases, plus it has a categorised index. The Viewer will then give you the appropriate signature in your chosen langauge. Just note that there are often multiple possibilities for function signatures and the one provided by the API Viewer will not always be the best for your circumstances.
-
Oct 22nd, 2007, 03:34 PM
#6
Re: Lock Computer Programmatically
I would suggest pinvoke but I have never had any sucess with it.
For the API viewer dont forget to set the language to C#
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 
-
Oct 23rd, 2007, 06:40 PM
#7
Thread Starter
Fanatic Member
Re: Lock Computer Programmatically
Thanks a lot for the input guys!I'll try that...
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
|