// dllmain.cpp : 定义 DLL 应用程序的入口点。
|
#include "pch.h"
|
|
#include "JObject.hpp"
|
#include "JFactoryStringImpl.h"
|
//#include "JFileStream.hpp"
|
//#include "JDataBlock.hpp"
|
//#include "JDataStore.hpp"
|
//#include "JDataSet.hpp"
|
|
extern "C"
|
{
|
bool WINAPI CreateJObjectInstance(LPTSTR pStrObject, JObject*& pJObject);
|
}
|
|
BOOL APIENTRY DllMain(HMODULE hModule,
|
DWORD ul_reason_for_call,
|
LPVOID lpReserved
|
)
|
{
|
switch (ul_reason_for_call)
|
{
|
case DLL_PROCESS_ATTACH:
|
case DLL_THREAD_ATTACH:
|
case DLL_THREAD_DETACH:
|
case DLL_PROCESS_DETACH:
|
break;
|
}
|
return TRUE;
|
}
|
|
|
bool WINAPI CreateJObjectInstance(LPTSTR pStrObject, JObject*& pJObject)
|
{
|
pJObject = nullptr;
|
if (wcscmp(pStrObject, L"JFactoryString") == 0)
|
{
|
pJObject = new JFactoryStringImpl();
|
return true;
|
}
|
if (wcscmp(pStrObject, L"JString") == 0)
|
{
|
pJObject = new JStringImpl();
|
return true;
|
}
|
/*
|
else if (wcscmp(pStrObject, L"JDataStore")==0)
|
{
|
pJObject = new JDataStore();
|
return true;
|
}
|
else if (wcscmp(pStrObject, L"JDataBlock")==0)
|
{
|
pJObject = new JDataBlock();
|
return true;
|
}
|
else if (wcscmp(pStrObject, L"JDataSet")==0)
|
{
|
pJObject = new JDataSet();
|
return true;
|
}*/
|
return false;
|
}
|