C++?????????????????????????
?????luoweifu ???????[ 2016/11/4 10:50:15 ] ??????????????????? C++
??????C???
????????????????????????IPage??????IDocument??????ITextUnit??????IPage?????????????????IDocument???????????????????????????????????CreateDoc??DestroyDoc??????????????IDocument??????????????????????????(C????????)??????????????C????????(??????)????????????£?
#pragma once
#include "IDocument.h"
#include "IPage.h"
#include "ITextUnit.h"
//===============================================================
//????????????????????????????????STATIC_LIBRARY????????????????STATIC_LIBRARY??
//????????????????????????????????EXPORT????????????????ü?
//===============================================================
#ifdef EXPORT //??????
#define _API_ __declspec(dllexport)
#else //?????
#define _API_ __declspec(dllimport)
#endif //EXPORT
#ifdef STATIC_LIBRARY //?????????
#define EBAPI int
#else //?????????
#define EBAPI extern "C" _API_ int
#endif //STATIC_LIBRARY
//---------------------------------------------------------------
//function:
// CreateDoc ????Document????
//Access:
// public
//Parameter:
// [in] IDocument * & pDocument -
//Returns:
// EBAPI -
//Remarks:
// ...
//author: luowf[/luoweifu]
//---------------------------------------------------------------
EBAPI CreateDoc(IDocument*& pDocument);
//---------------------------------------------------------------
//function:
// DestroyDoc ???????Document????
//Access:
// public
//Parameter:
// [in] IDocument * pDocument -
//Returns:
// EBAPI -
//Remarks:
// ...
//author: luowf[/luoweifu]
//---------------------------------------------------------------
EBAPI DestroyDoc(IDocument* pDocument);
????????
????????????EBook?????????????????????????μ???????????EBook?????????
????
?3?? ????????(?????????к?????е?EXPORT_STATIC?????????STATIC_LIBRARY??)
????????????μ????UseEBook???EBook??UseEBook?????????
????Generation PropertiesC++PreprocessPreprocess Definitions:STATIC_LIBRARY
????Generation PropertiesLinkerGeneralAddtional Library Directories:lib??????·??
????Generation PropertiesLinkerInputAddtional Dependencies:EBook.lib
???????????
#include "stdafx.h"
#include <iostream>
int _tmain(int argc?? _TCHAR* argv[])
{
IDocument* pDoc = NULL;
if(CreateDoc(pDoc) != 0)
{
return -1;
}
IPage* pPage = pDoc->AddPage();
ITextUnit* pTextUnit = pPage->AddTextUnit();
std::cout << pTextUnit->GetId() << std::endl;
DestroyDoc(pDoc);
return 0;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11