Code C unlock window with usb like usb raptor use winapi

Trường Hoàng 1 Reputation point
2022-11-27T09:00:41.33+00:00

I use visual studio code 2022 and i want to code a program to unlock my window laptop. I don't know where to start, someone can give me some function win api related to my problem? (I used to code some program basic like scan directory, find file, ... by C - use winapi)

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,511 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,916 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RLWA32 43,046 Reputation points
    2022-11-27T09:19:13.183+00:00

    The Windows API LockWorkStation function ( https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-lockworkstation ) can lock a system. However, there is no function to unlock a system. This is mentioned in the LockWorkStation function documentation which says "To unlock the workstation, the user must log in."


  2. Castorix31 83,101 Reputation points
    2022-11-27T10:56:57.157+00:00

    You can see the VB source code of USB Raptor (USB Raptor Code)
    It kills Explorer and other things...