From 89c226a7da5ffc6748ff3ef70aacad7625bafa3e Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期四, 05 九月 2024 15:03:11 +0800 Subject: [PATCH] update so payterm --- jrj/ext-jrj/dllmain.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 48 insertions(+), 4 deletions(-) diff --git a/jrj/ext-jrj/dllmain.cpp b/jrj/ext-jrj/dllmain.cpp index daed8c8..a0816b0 100644 --- a/jrj/ext-jrj/dllmain.cpp +++ b/jrj/ext-jrj/dllmain.cpp @@ -1,10 +1,22 @@ 锘�// dllmain.cpp : 瀹氫箟 DLL 搴旂敤绋嬪簭鐨勫叆鍙g偣銆� #include "pch.h" -BOOL APIENTRY DllMain( HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) +#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) { @@ -17,3 +29,35 @@ 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; +} -- Gitblit v1.9.3