diff --git a/vnr/texthook/host/textthread.h b/vnr/texthook/host/textthread.h index a2160bb..6d718f4 100644 --- a/vnr/texthook/host/textthread.h +++ b/vnr/texthook/host/textthread.h @@ -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 }; diff --git a/vnr/texthook/host/textthread_p.h b/vnr/texthook/host/textthread_p.h index fa93175..bc1d146 100644 --- a/vnr/texthook/host/textthread_p.h +++ b/vnr/texthook/host/textthread_p.h @@ -23,6 +23,10 @@ template > 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;