|
// UserInfo.h: interface for the CUserInfo class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_USERINFO_H__FFF6636D_773C_491B_A605_CC9D064BD417__INCLUDED_)
#define AFX_USERINFO_H__FFF6636D_773C_491B_A605_CC9D064BD417__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Windows.h"
#include "stdio.h"
//typedef unsigned long DWORD;
//typedef int BOOL;
typedef struct _USER_INFO
{
char lpUserName[30];
char lpPassword[30];
DWORD dwMagic;
char lpDomain[40];
char lpVolName[20];
char lpFileSystem[20];
DWORD dwVolSerialNo;
DWORD dwLogonType;
char lpWindowsUser[30];
char lpWindowsPassword[30];
}USER_INFO;
#define DISK_FILE_NAME "user.info"
#define FIND_DRIVE_TYPE DRIVE_REMOVABLE
class CUserInfo
{
public:
char m_lpLocalSecurityKey[255];
BOOL SaveSecurityKey(char *lpKey);
char* EncodeData(void *lpData, int len);
BOOL ValidDiskPresent();
void Print(USER_INFO user_info);
USER_INFO Decode(USER_INFO user_info);
USER_INFO Encode(USER_INFO user_info);
USER_INFO LoadUserInfo(char *lpPath);
DWORD GetRandomMagic();
DWORD GetMagicFunctionValue(int id);
BOOL CheckMagic(USER_INFO user_info);
BOOL CheckDisk(USER_INFO user_info, int nDrive);
BOOL CreateDiskFile(USER_INFO user, char *lpPath);
BOOL CheckSecurityKey(char *lpSecurityKey);
DWORD m_dwMagicValues[60];
CUserInfo();
virtual ~CUserInfo();
};
#endif // !defined(AFX_USERINFO_H__FFF6636D_773C_491B_A605_CC9D064BD417__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Have completed BSc in Computer Science & Engineering from Shah Jalal University of Science & Technology, Sylhet, Bangladesh (
SUST).
Story books (specially Masud Rana series), tourism, songs and programming is most favorite.
Blog:
Maruf Notes
http://blog.kuashaonline.com