Protect memory address

3

I'm developing a simple game. I want to protect the memory address where the player's score is located so that only a specific process can access it, thus preventing the user from changing or accessing this memory address with a cheat tool. Is this possible?

    
asked by anonymous 06.11.2017 / 01:56

1 answer

0

Use the Windows documentation

link

BOOL WINAPI CreateProcess(
  _In_opt_    LPCTSTR               lpApplicationName,
  _Inout_opt_ LPTSTR                lpCommandLine,
  _In_opt_    LPSECURITY_ATTRIBUTES lpProcessAttributes,
  _In_opt_    LPSECURITY_ATTRIBUTES lpThreadAttributes,
  _In_        BOOL                  bInheritHandles,
  _In_        DWORD                 dwCreationFlags,
  _In_opt_    LPVOID                lpEnvironment,
  _In_opt_    LPCTSTR               lpCurrentDirectory,
  _In_        LPSTARTUPINFO         lpStartupInfo,
  _Out_       LPPROCESS_INFORMATION lpProcessInformation
);

or

link

HANDLE WINAPI CreateThread(
  _In_opt_  LPSECURITY_ATTRIBUTES  lpThreadAttributes,
  _In_      SIZE_T                 dwStackSize,
  _In_      LPTHREAD_START_ROUTINE lpStartAddress,
  _In_opt_  LPVOID                 lpParameter,
  _In_      DWORD                  dwCreationFlags,
  _Out_opt_ LPDWORD                lpThreadId
);

Notice the parameter of the two functions whose type is LPSECURITY_ATTRIBUTES. According to Microsoft documentation, if the value is NULL the process or thread is created without inheritance to child processes. But if you want to do something more secure, study the struct SECURITY_ATTRIBUTES.

    
06.11.2017 / 03:59