Basic signature scanning has arrived!
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40706
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* ===============================================================
|
||||
* SourceMod, Copyright (C) 2004-2007 AlliedModders LLC.
|
||||
* All rights reserved.
|
||||
* ===============================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK. This file may only be
|
||||
* used or modified under the Terms and Conditions of its License Agreement,
|
||||
* which is found in public/licenses/LICENSE.txt. As of this notice, derivative
|
||||
* works must be licensed under the GNU General Public License (version 2 or
|
||||
* greater). A copy of the GPL is included under public/licenses/GPL.txt.
|
||||
*
|
||||
* To view the latest information, see: http://www.sourcemod.net/license.php
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_SOURCEMOD_INTERFACE_BINARYUTILS_H_
|
||||
#define _INCLUDE_SOURCEMOD_INTERFACE_BINARYUTILS_H_
|
||||
|
||||
#include <IShareSys.h>
|
||||
|
||||
#define SMINTERFACE_MEMORYUTILS_NAME "IMemoryUtils"
|
||||
#define SMINTERFACE_MEMORYUTILS_VERSION 1
|
||||
|
||||
namespace SourceMod
|
||||
{
|
||||
class IMemoryUtils : public SMInterface
|
||||
{
|
||||
public:
|
||||
const char *GetInterfaceName()
|
||||
{
|
||||
return SMINTERFACE_MEMORYUTILS_NAME;
|
||||
}
|
||||
unsigned int GetInterfaceVersion()
|
||||
{
|
||||
return SMINTERFACE_MEMORYUTILS_VERSION;
|
||||
}
|
||||
public:
|
||||
/**
|
||||
* @brief Searches for a pattern of bytes within the memory of a dynamic library.
|
||||
*
|
||||
* @param libPtr Pointer to any chunk of memory that resides in the dynamic library.
|
||||
* @param pattern Pattern of bytes to search for. 0x2A can be used as a wildcard.
|
||||
* @param len Size of the pattern in bytes.
|
||||
* @return Pointer to pattern found in memory, NULL if not found.
|
||||
*/
|
||||
virtual void *FindPattern(void *libPtr, const char *pattern, size_t len) =0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // _INCLUDE_SOURCEMOD_INTERFACE_MEMORYUTILS_H_
|
||||
+1
-1
@@ -58,7 +58,7 @@ namespace SourceMod
|
||||
virtual const char *GetInterfaceName() =0;
|
||||
|
||||
/**
|
||||
* @brief Must return whether the requested version number is backwards comaptible.
|
||||
* @brief Must return whether the requested version number is backwards compatible.
|
||||
* Note: This can be overridden for breaking changes or custom versioning.
|
||||
*
|
||||
* @param version Version number to compare against.
|
||||
|
||||
Reference in New Issue
Block a user