#include #include /// Enumerate all processes on the system. /// The callback for a process. extern "C" void RC_CallConv EnumerateProcesses(EnumerateProcessCallback callbackProcess) { // Enumerate all processes with the current plattform (x86/x64) and call the callback. } /// Enumerate all sections and modules of the remote process. /// The process handle obtained by OpenRemoteProcess. /// The callback for a section. /// The callback for a module. extern "C" void RC_CallConv EnumerateRemoteSectionsAndModules(RC_Pointer handle, EnumerateRemoteSectionsCallback callbackSection, EnumerateRemoteModulesCallback callbackModule) { // Enumerate all sections and modules of the remote process and call the callback for them. } /// Opens the remote process. /// The identifier of the process returned by EnumerateProcesses. /// The desired access. /// A handle to the remote process or nullptr if an error occured. extern "C" RC_Pointer RC_CallConv OpenRemoteProcess(RC_Pointer id, ProcessAccess desiredAccess) { // Open the remote process with the desired access rights and return the handle to use with the other functions. return nullptr; } /// Queries if the process is valid. /// The process handle obtained by OpenRemoteProcess. /// True if the process is valid, false if not. extern "C" bool RC_CallConv IsProcessValid(RC_Pointer handle) { // Check if the handle is valid. return false; } /// Closes the handle to the remote process. /// The process handle obtained by OpenRemoteProcess. extern "C" void RC_CallConv CloseRemoteProcess(RC_Pointer handle) { // Close the handle to the remote process. } /// Reads memory of the remote process. /// The process handle obtained by OpenRemoteProcess. /// The address to read from. /// The buffer to read into. /// The offset into the buffer. /// The number of bytes to read. /// True if it succeeds, false if it fails. extern "C" bool RC_CallConv ReadRemoteMemory(RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size) { // Read the memory of the remote process into the buffer. return false; } /// Writes memory to the remote process. /// The process handle obtained by OpenRemoteProcess. /// The address to write to. /// The buffer to write. /// The offset into the buffer. /// The number of bytes to write. /// True if it succeeds, false if it fails. extern "C" bool RC_CallConv WriteRemoteMemory(RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size) { // Write the buffer into the memory of the remote process. return false; } /// Control the remote process (Pause, Resume, Terminate). /// The process handle obtained by OpenRemoteProcess. /// The action to perform. extern "C" void RC_CallConv ControlRemoteProcess(RC_Pointer handle, ControlRemoteProcessAction action) { // Perform the desired action on the remote process. } /// Attach a debugger to the process. /// The identifier of the process returned by EnumerateProcesses. /// True if it succeeds, false if it fails. extern "C" bool RC_CallConv AttachDebuggerToProcess(RC_Pointer id) { // Attach a debugger to the remote process. return false; } /// Detach a debugger from the remote process. /// The identifier of the process returned by EnumerateProcesses. extern "C" void RC_CallConv DetachDebuggerFromProcess(RC_Pointer id) { // Detach the debugger. } /// Wait for a debug event within the given timeout. /// [out] The occured debug event. /// The timeout in milliseconds. /// True if an event occured within the given timeout, false if not. extern "C" bool RC_CallConv AwaitDebugEvent(DebugEvent* evt, int timeoutInMilliseconds) { // Wait for a debug event. return false; } /// Handles the debug event described by evt. /// [in] The (modified) event returned by AwaitDebugEvent. extern "C" void RC_CallConv HandleDebugEvent(DebugEvent* evt) { // Handle the debug event. } /// Sets a hardware breakpoint. /// The identifier of the process returned by EnumerateProcesses. /// The address of the breakpoint. /// The register to use. /// The type of the breakpoint. /// The size of the breakpoint. /// True to set the breakpoint, false to remove it. /// True if it succeeds, false if it fails. extern "C" bool RC_CallConv SetHardwareBreakpoint(RC_Pointer id, RC_Pointer address, HardwareBreakpointRegister reg, HardwareBreakpointTrigger type, HardwareBreakpointSize size, bool set) { // Set a hardware breakpoint with the given parameters. return false; }