| author | Scott Ehlert <ds@alliedmods.net> |
| Fri Apr 20 18:50:52 2007 +0000 (2007-04-20) | |
| changeset 701 | 85c77b23ae47 |
| parent 700 | 2b715374ce25 |
| child 702 | ff520b71249c |
| permissions | -rw-r--r-- |
| ds@700 | 1 |
/** |
| ds@700 | 2 |
* vim: set ts=4 : |
| ds@700 | 3 |
* =============================================================== |
| ds@700 | 4 |
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. |
| ds@700 | 5 |
* =============================================================== |
| ds@700 | 6 |
* |
| ds@700 | 7 |
* This file is not open source and may not be copied without explicit |
| ds@700 | 8 |
* written permission of AlliedModders LLC. This file may not be redistributed |
| ds@700 | 9 |
* in whole or significant part. |
| ds@700 | 10 |
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php |
| ds@700 | 11 |
* |
| ds@700 | 12 |
* Version: $Id$ |
| ds@700 | 13 |
*/ |
| ds@700 | 14 |
|
| ds@700 | 15 |
#ifndef _INCLUDE_SOURCEMOD_MEMORYUTILS_H_ |
| ds@700 | 16 |
#define _INCLUDE_SOURCEMOD_MEMORYUTILS_H_ |
| ds@700 | 17 |
|
| ds@700 | 18 |
#include <IMemoryUtils.h> |
| ds@700 | 19 |
|
| ds@700 | 20 |
using namespace SourceMod; |
| ds@700 | 21 |
|
| ds@700 | 22 |
struct DynLibInfo |
| ds@700 | 23 |
{ |
| ds@700 | 24 |
void *baseAddress; |
| ds@700 | 25 |
size_t memorySize; |
| ds@700 | 26 |
}; |
| ds@700 | 27 |
|
| ds@700 | 28 |
class MemoryUtils : public IMemoryUtils |
| ds@700 | 29 |
{ |
| ds@700 | 30 |
public: |
| ds@701 | 31 |
void *FindPattern(const void *libPtr, const char *pattern, size_t len); |
| ds@700 | 32 |
private: |
| ds@701 | 33 |
bool GetLibraryInfo(const void *libPtr, DynLibInfo &lib); |
| ds@700 | 34 |
}; |
| ds@700 | 35 |
|
| ds@700 | 36 |
extern MemoryUtils g_MemUtils; |
| ds@700 | 37 |
|
| ds@700 | 38 |
#endif // _INCLUDE_SOURCEMOD_MEMORYUTILS_H_ |