C#与C++的混合编程 之二 使用非托管dll 导出标准函数
1
2
3
4
5
6
7
|
//Define.h
///
//
#ifndef _DEFINE_H_
#define _DEFINE_H_
#define _EXTERN_C_ extern "C" _declspec(dllexport)
#endif
|
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
|
//CFunction.h
///
#ifndef _C_FUNCTION_H_
#define _C_FUNCTION_H_
#include "Define.h"
#include <string>
#include <istream>
struct
SystemTime
{
int
year;
int
month;
int
day;
int
hour;
int
minute;
int
second;
int
millsecond;
SystemTime & operator= (SystemTime st)
{
this
->year = st.year;
this
->month = st.month;
this
->day = st.day;
this
->hour = st.hour;
this
->minute = st.minute;
this
->second = st.second;
|