pch.h 1.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// pch.h: 这是预编译标头文件。
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
#pragma once
#ifndef PCH_H
#define PCH_H

// 添加要在此处预编译的标头
#include "framework.h"

#endif //PCH_H
#include <iostream>
#include "stdlib.h"
#include <tchar.h>
#include <stdio.h>
A
amchii 已提交
18
#include <Windows.h>
19 20 21 22 23
#include <TlHelp32.h>
#include <atlconv.h>
#include <tchar.h>
#include <sys/stat.h>
#include <direct.h>
L
ljc545w 已提交
24
#include <vector>
A
amchii 已提交
25
#include <map>
26 27 28 29 30

#include <comutil.h>
#pragma comment(lib, "comsuppw.lib")

#include "robotdata.h"
L
ljc545w 已提交
31
#include "templatefunc.h"
32 33 34

using namespace std;

L
ljc545w 已提交
35 36 37
#define TEXTLENGTHW(buffer) buffer ? (wcslen(buffer) * 2 + 2) : 0
#define TEXTLENGTHA(buffer) buffer ? (strlen(buffer) + 1) : 0

L
ljc545w 已提交
38 39
#ifdef _UNICODE
#define tstring std::wstring
L
ljc545w 已提交
40
#define TEXTLENGTH TEXTLENGTHW
L
ljc545w 已提交
41 42
#else
#define tstring std::string
L
ljc545w 已提交
43
#define TEXTLENGTH TEXTLENGTHW
L
ljc545w 已提交
44 45 46
#endif

BOOL isFileExists_stat(string& name);
L
ljc545w 已提交
47 48
DWORD GetWeChatRobotBase(DWORD pid);
DWORD GetWeChatWinBase(DWORD pid);
49
DWORD GetWeChatPid();
L
ljc545w 已提交
50 51 52
DWORD StartRobotService(DWORD pid);
DWORD StopRobotService(DWORD pid);

L
ljc545w 已提交
53
BOOL CreateConsole();
L
ljc545w 已提交
54 55 56 57 58
wstring GetComWorkPath();

tstring GetWeChatInstallDir();
DWORD GetWeChatVerInt();
tstring GetWeChatVerStr();
L
ljc545w 已提交
59
DWORD StartWeChat();
L
ljc545w 已提交
60 61
BOOL CloseProcessHandle(DWORD pid, wchar_t* handlename);
DWORD GetRemoteProcAddr(DWORD pid, LPWSTR modulename, LPSTR procname);