ds@700: /** ds@700: * vim: set ts=4 : ds@700: * =============================================================== ds@700: * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. ds@700: * =============================================================== ds@700: * ds@700: * This file is not open source and may not be copied without explicit ds@700: * written permission of AlliedModders LLC. This file may not be redistributed ds@700: * in whole or significant part. ds@700: * For information, see LICENSE.txt or http://www.sourcemod.net/license.php ds@700: * ds@700: * Version: $Id$ ds@700: */ ds@700: ds@700: #ifndef _INCLUDE_SOURCEMOD_MEMORYUTILS_H_ ds@700: #define _INCLUDE_SOURCEMOD_MEMORYUTILS_H_ ds@700: ds@700: #include ds@702: #include "sm_globals.h" ds@700: ds@700: using namespace SourceMod; ds@700: ds@700: struct DynLibInfo ds@700: { ds@700: void *baseAddress; ds@700: size_t memorySize; ds@700: }; ds@700: ds@702: class MemoryUtils : ds@702: public IMemoryUtils, ds@702: public SMGlobalClass ds@700: { ds@702: public: // SMGlobalClass ds@702: void OnSourceModAllInitialized(); ds@702: public: // IMemoryUtils ds@701: void *FindPattern(const void *libPtr, const char *pattern, size_t len); ds@700: private: ds@701: bool GetLibraryInfo(const void *libPtr, DynLibInfo &lib); ds@700: }; ds@700: ds@700: extern MemoryUtils g_MemUtils; ds@700: ds@700: #endif // _INCLUDE_SOURCEMOD_MEMORYUTILS_H_