mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
This commit is contained in:
10
Plugins/PluginPerfMon/MakePtr.h
Normal file
10
Plugins/PluginPerfMon/MakePtr.h
Normal file
@ -0,0 +1,10 @@
|
||||
// MakePtr is a macro that allows you to easily add two values (including
|
||||
// pointers) together without dealing with C's pointer arithmetic. It
|
||||
// essentially treats the last two parameters as DWORDs. The first
|
||||
// parameter is used to typecast the result to the appropriate pointer type.
|
||||
#ifdef _WIN64
|
||||
#define MakePtr(cast, ptr, addValue) (cast)( (DWORD64)(ptr) + (DWORD64)(addValue))
|
||||
#else
|
||||
#define MakePtr(cast, ptr, addValue) (cast)( (DWORD)(ptr) + (DWORD)(addValue))
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user