C++ Code Guru's

DY357LXDY357LX Playing since day 1. Still can't Comm.England Join Date: 2002-10-27 Member: 1651Members, Constellation
<div class="IPBDescription">Anyone Know About Reading Reg Values?</div> Yes..... I've searched Google! Lets get that out of the way a.s.a.p.
(Actually, i'm on page 6 of Google's results at the moment.)

I'm trying to write a little [DOS] application in C++ to simply view registry keys/values.

For example, if I wanted to find out what what screen resolution Half-Life was running in i'd read the following keys.

Current User \\ Software \\ Valve \\ Half-Life \\ Settings \\ ScreenWidth
Current User \\ Software \\ Valve \\ Half-Life \\ Settings \\ ScreenHeight

(Yes, I realise I can just launch Steam and check these values through the "OPTIONS" menu but I don't learn anything like that.)

So.... can anyone help me and possibly provide alittle sample code or point in the direction of a website that can do either?



Thanks.

Comments

  • GwahirGwahir Join Date: 2002-04-24 Member: 513Members, Constellation
    you'll want to write a tie in using standard C calling convention in assembly. It isn't hard. If you want you can do it by reference and get all the registers at once. Been a while since I've programmed in x86 assembly but if I remember correctly brackets ([]) will reference memory. In you C++ code you'll need to setup an extern with C calling convention, the name of the function in assembly will be _function where function is the name used in your C++ code.
  • SkulkBaitSkulkBait Join Date: 2003-02-11 Member: 13423Members
    Gwahir, he isn't talking about processor registers, hes talking about the Windows regestry.
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    Check out: www.codeproject.com

    There's a good chance you'll find it there. If not with C++, probably with C#. You may also want to consider something as simple as a VBscript.
  • GwahirGwahir Join Date: 2002-04-24 Member: 513Members, Constellation
    that's me for not reading the whole post... darn.


    yeah, never had to do that before, try <a href='http://www.msdn.com' target='_blank'>http://www.msdn.com</a>
Sign In or Register to comment.