⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataservice_ini.cpp

📁 《AE库通用模块及典型系统开发实例导航》光盘内容分享!
💻 CPP
字号:
// DataService_ini.cpp: implementation of the DataService_ini class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Login.h"
#include "DataService_ini.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

DataService_ini::DataService_ini()
{

}

DataService_ini::~DataService_ini()
{

}

bool DataService_ini::GetPassword(CString *UserName, CString *Password)
{
	//根据用户名得到密码
	DWORD nCount = ::GetPrivateProfileString("UserInfo", UserName->GetBuffer(UserName->GetLength()), "", Password->GetBuffer(255), 255, "User.ini");	
	
	//释放缓冲区
	UserName->ReleaseBuffer();
	Password->ReleaseBuffer();
	
	//如果得到的密码的长度为0,返回false,否则返回true
	if (nCount == 0)
	{
		return false;
	}
	else
	{
		return true;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -