|
|
|
|
Master Guru
Videocard: 2xMSI N550GTX-Ti Cy II OC
Processor: Intel Core 2 Quad Q9550
Mainboard: ASUS Striker II Extreme
Memory: 4GB DDR3 OCZ Reaper 14400
Soundcard: X-Fi Plat Fatal1ty Champ
PSU: Antec 850w
|
RTHM Shared Memory Versioning -
01-05-2011, 02:06
| posts: 562 | Location: MA
Hi Alex. Happy New Year!
I have a quick question on this:
Quote:
Originally Posted by Unwinder
The reason of problem is highlighed with bold font. Header size is variable and can be changed in future versions too so using hardcoded header offset is giving the trouble, that is why there is dwHeaderSize field. The following code would be more correct way to go:
(LPMAHM_SHARED_MEMORY_ENTRY)((LPBYTE)lpHeader + lpHeader->dwHeaderSize + dwSource * lpHeader->dwEntrySize)
Yep, similar changes are planned for RT too, but tehre is no beta available yet.
|
I plan on doing an update to the gadget, and wanted to include this fix before a new RT leaves thousands of gadgets broken. However, I'm now realizing the header size only exists in Afterburner right now (I guess I missed it by starting with a copy of my RT project, as it is definitely in the Afterburner SDK sample).
Is there any other way for me to get/calculate the size of the header so I can find the first entry once the format changes? I'm currently using the same code as the sample in the SDK:
(LPRTHM_SHARED_MEMORY_ENTRY)((LPBYTE)(lpHeader + 1) + dwSource * lpHeader->dwEntrySize);
I'm currently getting version 0x00010002 in RT 2.24C. Do I need to just gracefully trap versions higher then that for now and show a descriptive error to the user so they know they will need to update once I have the gadget updated?
Thanks!
Nick
|
|
|
|