refactor textthread a little
This commit is contained in:
parent
79d39ce135
commit
2cf987bef5
@ -17,7 +17,7 @@ struct RepeatCountNode {
|
||||
|
||||
struct ThreadParameter {
|
||||
DWORD pid; // jichi: 5/11/2014: The process ID
|
||||
DWORD hook;
|
||||
DWORD hook; // Artikash 6/6/2018: The start address of the hook
|
||||
DWORD retn; // jichi 5/11/2014: The return address of the hook
|
||||
DWORD spl; // jichi 5/11/2014: the processed split value of the hook parameter
|
||||
};
|
||||
|
@ -23,6 +23,10 @@ template<class T, int default_size, class fComp=BinaryEqual<T> >
|
||||
class MyVector
|
||||
{
|
||||
public:
|
||||
int Used() const { return used; }
|
||||
T *Storage() const { return storage; }
|
||||
void LockVector() { EnterCriticalSection(&cs_store); }
|
||||
void UnlockVector() { LeaveCriticalSection(&cs_store); }
|
||||
MyVector() : size(default_size), used(0)
|
||||
{
|
||||
InitializeCriticalSection(&cs_store);
|
||||
@ -39,6 +43,7 @@ public:
|
||||
DeleteCriticalSection(&cs_store);
|
||||
storage = 0;
|
||||
}
|
||||
protected:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@ -110,11 +115,8 @@ public:
|
||||
//if (storage[i]==item) {c=i;break;}
|
||||
return c;
|
||||
}
|
||||
int Used() const { return used; }
|
||||
T *Storage() const { return storage; }
|
||||
void LockVector() { EnterCriticalSection(&cs_store); }
|
||||
void UnlockVector() { LeaveCriticalSection(&cs_store); }
|
||||
protected:
|
||||
|
||||
|
||||
CRITICAL_SECTION cs_store;
|
||||
int size,
|
||||
used;
|
||||
|
Loading…
Reference in New Issue
Block a user