文件夹监控wei服务

伪服务
This commit is contained in:
yanshui177
2017-05-17 20:50:34 +08:00
parent 6dcd378738
commit e9f18bbc9b
11 changed files with 340 additions and 241 deletions

View File

@@ -0,0 +1,41 @@
#include <windows.h>
#include <iostream>
#include <dos.h>
#include <stdio.h>
#include <time.h>
#include <vector>
#include <string.h>
#include <io.h>
using namespace std;
/*时间获取函数u*/
#define LOGFILE "D:\\HWCV\\memstatus.txt" //日志存储位置
extern time_t ltime;
extern char *srcTime;
extern char timeNow[22];
extern char msg[100];
/*功能:写入日志
@变量 str 写入内容
@返回值 固定
*/
int WriteToLog(char* str);
/**
功能:获取并返回当前时间
*/
char* GetTime();
/*功能:检查当前木有有无文件,若有,提取文件名,并删除此文件
@变量 path 检查文件位置
@变量 files 获取到的文件名称
@返回值 返回检测到的变量向量
*/
int CheckFile(char* path, vector<string>& files);