一.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;
}