refactor textthread a little

This commit is contained in:
Akash Mozumdar 2018-06-06 23:11:35 -04:00
parent 79d39ce135
commit 2cf987bef5
2 changed files with 8 additions and 6 deletions

View File

@ -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
};

View File

@ -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;