יום שלישי, 16 ביולי 2024

c# החלפת משתמש בווינדוס / נעילת המחשב


[DllImport("user32.dll")]
public static extern void LockWorkStation();

// The function to switch user/lock the computer
void foo() { LockWorkStation(); }