| 12345678910111213141516171819202122232425262728293031 |
- // dllmain.cpp : 定义 DLL 应用程序的入口点。
- #include "WatchDogClassImpl.h"
- #include "CkLog.h"
- LOG_DECLARE()
- ErrorCodeEnum CreateDevComponent(DeviceBaseClass *&pBaseObj)
- {
- LOG_INIT("WatchDog", "/home/keba/", "/home/keba/keba-WatchDog.log");
- LOG_FUNCTION();
- pBaseObj = new WatchDogClassImpl();
- if (pBaseObj == NULL)
- {
- LogE("CreateDevComponent WatchDogClassImpl failed!");
- return Error_Resource;
- }
- LogM("CreateDevComponent WatchDogClassImpl scessufull!");
- return Error_Succeed;
- }
- ErrorCodeEnum ReleaseDevComponent(DeviceBaseClass *&pBaseObj)
- {
- LOG_FUNCTION();
- if (pBaseObj == NULL)
- return Error_Param;
- WatchDogClassImpl* pTmp = (WatchDogClassImpl*)(pBaseObj);
- delete pTmp;
- pTmp = nullptr;
- pBaseObj = nullptr;
- return Error_Succeed;
- }
|