MHSSys

BOOL CastExpression(
    LPEVAL_RET_TYPE lpertExp,
    INT iType)


Casts the supplied expression to the supplied type. The expression must be a valid expression returned from a successful call to EvalExp. The expression will be cast to the type specified by iType. iType must be one of the MT_* type enumerations. The same expression can be cast again later.


VOID Clear()


Clears the output window.


VOID Error(
    const CHAR * pcFormat,
    ...)


Show a message box with an error specified by pcFormat. The format-control string matches that of PrintF().


BOOL EvalExp(
    const CHAR * pcExpression,
    LPEVAL_RET_TYPE lpertRet,
    BOOL bTreatAsHex)


Parses a text expression and returns the result in lpertRet.
lpertRet->iType determines the type of the returned result.
    MT_DOUBLE indicates the return is stored in lpertRet->u.dDouble.
    MT_UINT64 indicates the return is stored in lpertRet->u.ui64Int64.
MT_INT64 indicates the return is stored in lpertRet->u.i64Int64.


DWORD GetCrc(
    const CHAR * pcPath)


Returns the CRC of the specified file.


HANDLE GetCurProcessHandle()


Returns the current process handle.


DWORD GetCurProcessID()


Returns the current process ID.


_TCHAR * GetCurProcessName()


Returns a pointer to a string containing the name of the current process.


LPVOID GetCurProcessPEproc()


Returns the address of the current processí EPROCESS structure.


_TCHAR * GetCurProcessPath(
    _TCHAR * ptcReturn)


Returns a pointer to a string containing the path of the current process. The return value is the same as ptcReturn on success, or NULL otherwise.


BOOL InputFloat(
    const _TCHAR * ptcTitle,
    const _TCHAR * ptcCaption,
    const _TCHAR * ptcDefault,
    DOUBLE * pdReturn)


Displays a dialog box that prompts the user for input in the form of a floating-point number. If the user presses Cancel, FALSE is returned. Otherwise, pdReturn is filled with the floating-point value the user typed into the dialog.


BOOL InputFloat(
    const _TCHAR * ptcTitle,
    const _TCHAR * ptcCaption,
    const _TCHAR * ptcDefault,
    FLOAT * pfReturn)


Displays a dialog box that prompts the user for input in the form of a floating-point number. If the user presses Cancel, FALSE is returned. Otherwise, pfReturn is filled with the floating-point value the user typed into the dialog.


BOOL InputNumber(
    const _TCHAR * ptcTitle,
    const _TCHAR * ptcCaption,
    const _TCHAR * ptcDefault,
    INT * piReturn)


Displays a dialog box that prompts the user for input in the form of an integer number. If the user presses Cancel, FALSE is returned. Otherwise, piReturn is filled with the integer value the user typed into the dialog.


BOOL InputString(
    const _TCHAR * ptcTitle,
    const _TCHAR * ptcCaption,
    const _TCHAR * ptcDefault,
    _TCHAR * ptcReturn,
    INT iMaxLen)


Displays a dialog box that prompts the user for a string. If the user presses Cancel, FALSE is returned. Otherwise, ptcReturn is filled with the string the user typed into the dialog. iMaxLen indicates the length of the buffer specified by ptcReturn.


BOOL LoadProcess(
    DWORD dwID)


Attach Memory Hacking Software to the proces specified by dwID.


INT MessageBox(
    DWORD dwMask,
    const CHAR * pcTitle,
    CHAR * pcFormat,
    ...)


Show a message box with the text specified by pcFormat. The format-control string matches that of PrintF().
The following values are valid for dwMask:
    MBS_OK: Dialog has an OK button.
    MBS_YES: Dialog has a Yes button.
    MBS_NO: Dialog has a No button.
    MBS_CANCEL: Dialog has a Cancel button.

You can combine these flags using bitwise OR (|), however not every combination is valid.
The return value is one of MBS_OK, MBS_YES, MBS_NO, and MBS_CANCEL, depending on which button was pressed. If an invalid value is supplied for dwMask, the function returns MBS_CANCEL without displaying a message box.


BOOL ReadLocalMemory(
    LPVOID lpBaseAddress,
    LPVOID lpBuffer,
    SIZE_T nSize,
    SIZE_T * lpNumberOfBytesRead)


Safely reads local memory inside MHS. If the kernel driver is successfully loaded, this can be used to read kernel RAM as well.


INT RegisterHotkey(
    INT iKey,
    INT iMod,
    INT iFunc,
    DWORD dwParms[3],
    BOOL bPoll)


Registers a hotkey with the system and returns its ID for use with UnregisterHotkey. The return is -1 on error. iKey is the virtual key code of the key to press (VK_*). iMod is the key modifier, for example the Alt key or Shift (MOD_*). iFunc is the ID of the function to be called when the specified keys are pressed, and dwParms are the parameters to pass to that function. bPoll determines whether the polling method is used or the standard Windows hotkey system is used.
iFunc can be any of the following:
    HK_FUNC_NOTHING: No operation.
    HK_FUNC_POKE: Writes a value into an address. dwParm[0] specifies the address, dwParm[1] specifies the value, and dwParm[2] specifies the size (up to 4 bytes).
    HK_FUNC_BEEP: Beeps for dwParm[0] milliseconds.
    HK_FUNC_PAUSE: Pauses the target process.
    HK_FUNC_RESUME: Resumes the target process.
    HK_FUNC_SCRIPTFUNCTION: Calls a script function specified by dwParm[0].
    HK_FUNC_CURPROCSCRIPTFUNCTION: Calls a script function specific to the current process, specified by dwParm[0].
    HK_FUNC_LOADCONVERTER: Loads the Converter. This is not available in trainers.
    HK_FUNC_LOADHEXEDITOR: Loads the Hex Editor. This is not available in trainers.
    HK_FUNC_LOADDISASSEMBLER: Loads the Disassembler. This is not available in trainers.
    HK_FUNC_LOADSCRIPTEDITOR: Loads the Script Editor. This is not available in trainers.
    HK_FUNC_SUBSAMEASBEFORE: Performs a Same as Before Sub Search. This is not available in trainers.
    HK_FUNC_SUBDIFFROMBEFORE: Performs a Different From Before Sub Search. This is not available in trainers.
    HK_FUNC_SUBINCREASED: Performs an Increase Sub Search. This is not available in trainers.
    HK_FUNC_SUBDECREASED: Performs a Decreased Sub Search. This is not available in trainers.
    HK_FUNC_SUBSAMEASORIGINAL: Performs a Same as Original Sub Search. This is not available in trainers.
    HK_FUNC_LOCKSTORED: Locks Stored Values whose Hotkey Key matches dwParm[0]. This is not available in trainers.
    HK_FUNC_UNLOCKSTORED: Unlocks Stored Values whose Hotkey Key matches dwParm[0]. This is not available in trainers.


BOOL UnregisterHotkey(
    INT iId)


Unregisters the specified hotkey by its ID.


VOID Warning(
    const CHAR * pcFormat,
    ...)


Show a message box with a warning specified by pcFormat. The format-control string matches that of PrintF().


BOOL WriteLocalMemory(
    LPVOID lpBaseAddress,
    LPVOID lpBuffer,
    SIZE_T nSize,
    SIZE_T * lpNumberOfBytesWritten)


Safely writes local memory inside MHS. If the kernel driver is successfully loaded, this can be used to write to kernel RAM as well.


Copyright © 2006 Shawn (L. Spiro) Wilcoxen