Guru3D.com Forums

Go Back   Guru3D.com Forums > Affiliates > RivaTuner Advanced Discussion forum
RivaTuner Advanced Discussion forum This forum is intended for advanced comments, ideas and general discussion of the RivaTuner Utility which is hosted here at the Guru of 3D. This forum is visited by programmer himself - you can only post in this area with a minimum of 10 posts and 7 days forum membership.


Reply
 
Thread Tools Display Modes
RTHM Shared Memory Versioning
Old
  (#1)
stangowner
Master Guru
 
stangowner's Avatar
 
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
Default 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 View Post
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
   
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 1995-2012, All Rights Reserved. The Guru of 3D, the Hardware Guru, and 3D Guru are trademarks owned by Hilbert Hagedoorn.