-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCommon.h
34 lines (23 loc) · 784 Bytes
/
Common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __HOSTCOMMON__H__
#define __HOSTCOMMON__H__
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#ifndef _WIN32_WINNT
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#endif
#define LOCK_TRACE 0xCAFEBABE
#include <stdio.h>
#include <tchar.h>
#include <metahost.h>
#pragma comment(lib, "mscoree.lib")
// Import mscorlib.tlb (Microsoft Common Language Runtime Class Library).
#import "mscorlib.tlb" raw_interfaces_only \
high_property_prefixes("_get","_put","_putref") \
rename("ReportEvent", "InteropServices_ReportEvent")
using namespace mscorlib;
//
#include <string>
std::wstring toWstring(const std::string& s);
std::string toString(const std::wstring& s);
bstr_t toBSTR(const std::string& s);
std::wstring CurrentDirectory();
#endif