sourcemod/core/MemoryUtils.h
Scott Ehlert efa6067669 Basic signature scanning has arrived!
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40706
2007-04-20 18:32:33 +00:00

43 lines
1.0 KiB
C++

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