1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/core/MemoryUtils.h Fri Apr 20 18:32:33 2007 +0000
1.3 @@ -0,0 +1,42 @@
1.4 +/**
1.5 + * vim: set ts=4 :
1.6 + * ===============================================================
1.7 + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.8 + * ===============================================================
1.9 + *
1.10 + * This file is not open source and may not be copied without explicit
1.11 + * written permission of AlliedModders LLC. This file may not be redistributed
1.12 + * in whole or significant part.
1.13 + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
1.14 + *
1.15 + * Version: $Id$
1.16 + */
1.17 +
1.18 +#ifndef _INCLUDE_SOURCEMOD_MEMORYUTILS_H_
1.19 +#define _INCLUDE_SOURCEMOD_MEMORYUTILS_H_
1.20 +
1.21 +#include <IMemoryUtils.h>
1.22 +
1.23 +using namespace SourceMod;
1.24 +
1.25 +struct DynLibInfo
1.26 +{
1.27 + void *baseAddress;
1.28 + size_t memorySize;
1.29 +};
1.30 +
1.31 +class MemoryUtils : public IMemoryUtils
1.32 +{
1.33 +public:
1.34 + MemoryUtils();
1.35 +public:
1.36 + void *FindPattern(void *libPtr, const char *pattern, size_t len);
1.37 +private:
1.38 + bool GetLibraryInfo(void *libPtr, DynLibInfo &lib);
1.39 +private:
1.40 + size_t m_PageSize;
1.41 +};
1.42 +
1.43 +extern MemoryUtils g_MemUtils;
1.44 +
1.45 +#endif // _INCLUDE_SOURCEMOD_MEMORYUTILS_H_