Created
July 13, 2017 01:49
-
-
Save blogdarkspot/70b6381a108485cca2f873ff27357087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service *pService = NULL; | |
DECLSPEC bool StartDLL() | |
{ | |
bool ret = true; | |
if(!pService) | |
{ | |
if(!(pService = Service::getInstance())) | |
{ | |
ret = false; | |
} | |
} | |
return ret; | |
} | |
DECLSPEC bool StopDLL() | |
{ | |
bool ret = true; | |
if(pService) | |
{ | |
if(pService->stop()) | |
{ | |
delete pSerivce; | |
pService = NULL; | |
} | |
else | |
{ | |
ret = false; | |
} | |
} | |
return ret; | |
} | |
DECLSPEC bool InjectMock(void *mock) | |
{ | |
bool ret = true; | |
pService = static_cast<Service*>(mock); | |
if(!pService) | |
{ | |
ret = false; | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment