7ce1ef6ea1
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40708
44 lines
1.1 KiB
C++
44 lines
1.1 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>
|
|
#include "sm_globals.h"
|
|
|
|
using namespace SourceMod;
|
|
|
|
struct DynLibInfo
|
|
{
|
|
void *baseAddress;
|
|
size_t memorySize;
|
|
};
|
|
|
|
class MemoryUtils :
|
|
public IMemoryUtils,
|
|
public SMGlobalClass
|
|
{
|
|
public: // SMGlobalClass
|
|
void OnSourceModAllInitialized();
|
|
public: // IMemoryUtils
|
|
void *FindPattern(const void *libPtr, const char *pattern, size_t len);
|
|
private:
|
|
bool GetLibraryInfo(const void *libPtr, DynLibInfo &lib);
|
|
};
|
|
|
|
extern MemoryUtils g_MemUtils;
|
|
|
|
#endif // _INCLUDE_SOURCEMOD_MEMORYUTILS_H_
|