头文件interface.h
#pragma once
#ifndef INTERFACE_H
#define INTERFACE_H
#define _CRT_SECURE_NO_WARNINGS
#define FENGZHUANG_API _declspec(dllexport)
#include <string>
namespace FengZhuang {
class FENGZHUANG_API IInterface {
public:
static IInterface* CreateInterface();
virtual void Init() = 0;
virtual void Destroy() = 0;
virtual const char* GetName() = 0;
virtual void Log(int index, const std::string& windowName, bool includeDate,
const char* format, ...) = 0;
};
}
#endif
source.cpp文件:
#include "interface.h"
#include <iostream>
#include <ctime>