1-
2- #ifndef __linux__
31#include < windows.h>
4- #endif
5-
62#include < cstdint>
73
84#include < ReClassNET_Plugin.hpp>
95
106// / <summary>Enumerate all processes on the system.</summary>
117// / <param name="callbackProcess">The callback for a process.</param>
12- extern " C" void __stdcall EnumerateProcesses (EnumerateProcessCallback callbackProcess)
8+ extern " C" void RC_CallConv EnumerateProcesses (EnumerateProcessCallback callbackProcess)
139{
1410 // Enumerate all processes with the current plattform (x86/x64) and call the callback.
1511}
@@ -18,7 +14,7 @@ extern "C" void __stdcall EnumerateProcesses(EnumerateProcessCallback callbackPr
1814// / <param name="process">The process handle obtained by OpenRemoteProcess.</param>
1915// / <param name="callbackSection">The callback for a section.</param>
2016// / <param name="callbackModule">The callback for a module.</param>
21- extern " C" void __stdcall EnumerateRemoteSectionsAndModules (RC_Pointer handle, EnumerateRemoteSectionsCallback callbackSection, EnumerateRemoteModulesCallback callbackModule)
17+ extern " C" void RC_CallConv EnumerateRemoteSectionsAndModules (RC_Pointer handle, EnumerateRemoteSectionsCallback callbackSection, EnumerateRemoteModulesCallback callbackModule)
2218{
2319 // Enumerate all sections and modules of the remote process and call the callback for them.
2420}
@@ -27,7 +23,7 @@ extern "C" void __stdcall EnumerateRemoteSectionsAndModules(RC_Pointer handle, E
2723// / <param name="id">The identifier of the process returned by EnumerateProcesses.</param>
2824// / <param name="desiredAccess">The desired access.</param>
2925// / <returns>A handle to the remote process or nullptr if an error occured.</returns>
30- extern " C" RC_Pointer __stdcall OpenRemoteProcess (RC_Pointer id, ProcessAccess desiredAccess)
26+ extern " C" RC_Pointer RC_CallConv OpenRemoteProcess (RC_Pointer id, ProcessAccess desiredAccess)
3127{
3228 // Open the remote process with the desired access rights and return the handle to use with the other functions.
3329
@@ -37,7 +33,7 @@ extern "C" RC_Pointer __stdcall OpenRemoteProcess(RC_Pointer id, ProcessAccess d
3733// / <summary>Queries if the process is valid.</summary>
3834// / <param name="handle">The process handle obtained by OpenRemoteProcess.</param>
3935// / <returns>True if the process is valid, false if not.</returns>
40- extern " C" bool __stdcall IsProcessValid (RC_Pointer handle)
36+ extern " C" bool RC_CallConv IsProcessValid (RC_Pointer handle)
4137{
4238 // Check if the handle is valid.
4339
@@ -46,7 +42,7 @@ extern "C" bool __stdcall IsProcessValid(RC_Pointer handle)
4642
4743// / <summary>Closes the handle to the remote process.</summary>
4844// / <param name="handle">The process handle obtained by OpenRemoteProcess.</param>
49- extern " C" void __stdcall CloseRemoteProcess (RC_Pointer handle)
45+ extern " C" void RC_CallConv CloseRemoteProcess (RC_Pointer handle)
5046{
5147 // Close the handle to the remote process.
5248}
@@ -58,7 +54,7 @@ extern "C" void __stdcall CloseRemoteProcess(RC_Pointer handle)
5854// / <param name="offset">The offset into the buffer.</param>
5955// / <param name="size">The number of bytes to read.</param>
6056// / <returns>True if it succeeds, false if it fails.</returns>
61- extern " C" bool __stdcall ReadRemoteMemory (RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size)
57+ extern " C" bool RC_CallConv ReadRemoteMemory (RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size)
6258{
6359 // Read the memory of the remote process into the buffer.
6460
@@ -72,7 +68,7 @@ extern "C" bool __stdcall ReadRemoteMemory(RC_Pointer handle, RC_Pointer address
7268// / <param name="offset">The offset into the buffer.</param>
7369// / <param name="size">The number of bytes to write.</param>
7470// / <returns>True if it succeeds, false if it fails.</returns>
75- extern " C" bool __stdcall WriteRemoteMemory (RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size)
71+ extern " C" bool RC_CallConv WriteRemoteMemory (RC_Pointer handle, RC_Pointer address, RC_Pointer buffer, int offset, int size)
7672{
7773 // Write the buffer into the memory of the remote process.
7874
@@ -82,15 +78,15 @@ extern "C" bool __stdcall WriteRemoteMemory(RC_Pointer handle, RC_Pointer addres
8278// / <summary>Control the remote process (Pause, Resume, Terminate).</summary>
8379// / <param name="handle">The process handle obtained by OpenRemoteProcess.</param>
8480// / <param name="action">The action to perform.</param>
85- extern " C" void __stdcall ControlRemoteProcess (RC_Pointer handle, ControlRemoteProcessAction action)
81+ extern " C" void RC_CallConv ControlRemoteProcess (RC_Pointer handle, ControlRemoteProcessAction action)
8682{
8783 // Perform the desired action on the remote process.
8884}
8985
9086// / <summary>Attach a debugger to the process.</summary>
9187// / <param name="id">The identifier of the process returned by EnumerateProcesses.</param>
9288// / <returns>True if it succeeds, false if it fails.</returns>
93- extern " C" bool __stdcall AttachDebuggerToProcess (RC_Pointer id)
89+ extern " C" bool RC_CallConv AttachDebuggerToProcess (RC_Pointer id)
9490{
9591 // Attach a debugger to the remote process.
9692
@@ -99,7 +95,7 @@ extern "C" bool __stdcall AttachDebuggerToProcess(RC_Pointer id)
9995
10096// / <summary>Detach a debugger from the remote process.</summary>
10197// / <param name="id">The identifier of the process returned by EnumerateProcesses.</param>
102- extern " C" void __stdcall DetachDebuggerFromProcess (RC_Pointer id)
98+ extern " C" void RC_CallConv DetachDebuggerFromProcess (RC_Pointer id)
10399{
104100 // Detach the debugger.
105101}
@@ -108,7 +104,7 @@ extern "C" void __stdcall DetachDebuggerFromProcess(RC_Pointer id)
108104// / <param name="evt">[out] The occured debug event.</param>
109105// / <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
110106// / <returns>True if an event occured within the given timeout, false if not.</returns>
111- extern " C" bool __stdcall AwaitDebugEvent (DebugEvent* evt, int timeoutInMilliseconds)
107+ extern " C" bool RC_CallConv AwaitDebugEvent (DebugEvent* evt, int timeoutInMilliseconds)
112108{
113109 // Wait for a debug event.
114110
@@ -117,7 +113,7 @@ extern "C" bool __stdcall AwaitDebugEvent(DebugEvent* evt, int timeoutInMillisec
117113
118114// / <summary>Handles the debug event described by evt.</summary>
119115// / <param name="evt">[in] The (modified) event returned by AwaitDebugEvent.</param>
120- extern " C" void __stdcall HandleDebugEvent (DebugEvent* evt)
116+ extern " C" void RC_CallConv HandleDebugEvent (DebugEvent* evt)
121117{
122118 // Handle the debug event.
123119}
@@ -130,7 +126,7 @@ extern "C" void __stdcall HandleDebugEvent(DebugEvent* evt)
130126// / <param name="size">The size of the breakpoint.</param>
131127// / <param name="set">True to set the breakpoint, false to remove it.</param>
132128// / <returns>True if it succeeds, false if it fails.</returns>
133- extern " C" bool __stdcall SetHardwareBreakpoint (RC_Pointer id, RC_Pointer address, HardwareBreakpointRegister reg, HardwareBreakpointTrigger type, HardwareBreakpointSize size, bool set)
129+ extern " C" bool RC_CallConv SetHardwareBreakpoint (RC_Pointer id, RC_Pointer address, HardwareBreakpointRegister reg, HardwareBreakpointTrigger type, HardwareBreakpointSize size, bool set)
134130{
135131 // Set a hardware breakpoint with the given parameters.
136132
0 commit comments