用代码锁定计算机

int (__stdcall *MyLockWorkStation)();
void LockComputer()
{
 HINSTANCE hInst;
 hInst = LoadLibrary("user32.dll");
 if (hInst)
 {
  MyLockWorkStation = (int(__stdcall *)())GetProcAddress(hInst,"LockWorkStation");
  if (MyLockWorkStation!=NULL)
  {
   (MyLockWorkStation)();
  }
 }
 FreeLibrary(hInst);
}

你可能感兴趣的:(user,null)