验证操作系统密码

一.Windows验证操作系统密码

#include "stdafx.h"
#include <iostream>
#include<windows.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{

    HANDLE hUser;
     if(   LogonUser("Administrator",NULL,"*****",LOGON32_LOGON_INTERACTIVE,LOGON32_PROVIDER_DEFAULT,&hUser))
  {
    cout<<"ok";
  }else{
    cout<<"error";
  };
 

 char i;
 i=getchar();


 return 0;
}

原文地址:https://www.cnblogs.com/hedan/p/2744846.html