MONITOR.H
上传用户:bjghjy
上传日期:2007-01-07
资源大小:379k
文件大小:1k
- #include <stdio.h>
- #include <string.h>
- #include <windows.h>
- #include <stdlib.h>
- #include <io.h>
- #include <sysstat.h>
- #include <fcntl.h>
- #include <time.h>
- #include "dbf_data.h"
- #ifndef _MONITOR
- #define _MONITOR
- BOOL MonitorInit(void);
- BOOL MonitorExit(void);
- int RegisterUser(char *UserId,char *Pass);
- int WriteUserStatus(int Pos,int Utime,int Lstatus,char * ReqHead);
- char ReadLockControl(int pos);
- #define fld_CODE 0
- #define fld_NAME 1
- #define fld_PASS 2
- #define fld_PRIV 3
- #define fld_LOCK 4
- #define fld_LSTA 5
- #define fld_USED 6
- #define fld_TIME 7
- #define fld_REQU 8
- #define fld_DATE 9
- #define fld_TELE 10
- #define fld_ADDR 11
- #define LOGIN_SUCC 0
- #define LOGIN_NO_THIS_ID -1
- #define LOGIN_NO_PRIV -2
- #define LOGIN_NO_TIME -3
- #define LOGIN_LOCKED -4
- #define LOGIN_SYS_ERR -5
- #define LOGIN_ANOTHER -6
- typedef struct tag_MONITOR
- {
- BOOL IsRun;
- int CheckPoint;
- DBF_DATA File;
- }MONITOR,*LPMONITOR;
- #define SET_SUCC 0
- #define SET_NO_THIS_ID -1
- #define SET_PWD_ERROR -2
- #define SET_DATA_ERROR -3
- #define SET_SYS_ERROR -4
- typedef struct tag_TCP_FRAME_HQ_ENV
- {
- char head[6];
- char ucode[6];
- char pwd[6];
- char newpwd[7];
- }TCP_FRAME_HQ_ENV;
- int SetUserEnv(int pos,TCP_FRAME_HQ_ENV * lpPara,int len);
- #endif