38 lines
916 B
C++
38 lines
916 B
C++
#pragma once
|
|
#ifndef INCLUDE_TH_UTILES
|
|
#define INCLUDE_TH_UTILES
|
|
|
|
#include "base_head.h"
|
|
const DWORD MS_VC_EXCEPTION_TH_UTILES=0x406D1388;
|
|
//funciones necesarias-------------
|
|
UTILES_EXPORT void SetThName( DWORD dwThreadID, char* threadName);
|
|
UINT main_th_proceso(LPVOID pp);
|
|
//thead basico---------------------
|
|
class UTILES_EXPORT Cth
|
|
{
|
|
|
|
public:
|
|
bool running;//variable interna no usar
|
|
//variables
|
|
|
|
char nombre[32];//nombre del thread
|
|
CWinThread * m_thread;//puntero a thread
|
|
//cosntructor y destructor---------------
|
|
Cth(void);
|
|
~Cth(void);
|
|
//funicones------------------------------
|
|
virtual void run()=0;//funcion que hace el thread
|
|
bool isRunning();//indica si se esta currando o no
|
|
|
|
BOOL lanza(char *nombre=NULL);//lanzar thread
|
|
|
|
//********************************
|
|
void join();//espera a que el thread termine
|
|
};
|
|
|
|
class UTILES_EXPORT Crunable
|
|
{
|
|
public:
|
|
virtual void frun(int modo=0)=0;
|
|
};
|
|
#endif |