123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __PYTHON_HELPER__
- #define __PYTHON_HELPER__
- #pragma once
- #define THREAD_SIZE 100
- typedef struct __WORK_PARAMTER__
- {
- HANDLE hThread;
- HANDLE hEvent;
- BOOL bStatus;
- TCHAR szScriptPath[MAX_PATH];
- TCHAR szLogPath[MAX_PATH];
-
- HANDLE hStdOutRead;
- HANDLE hStdOutWrite;
- HANDLE hStdErroWrite;
- }WorkParamter, *pWorkParamter;
- class CPythonHelper
- {
- public:
- CPythonHelper(void);
- ~CPythonHelper(void);
- public:
-
-
-
-
- bool AddPythonScript(std::string strScript, std::string strLogPath, int nRunType = 0);
-
- void StopScript();
- protected:
-
- static DWORD WINAPI _WorkerThread(LPVOID lpParam);
- };
- #endif
|