Thread: I tried searching first.. :D

  1. #1
    LiKWiD
    Guest

    I tried searching first.. :D

    I searched around, but couldn't find anything, so I guess I'll post. I've created a proggie that modifies registry keys for a game of mine (half-life). I'm running Windows 98, but my friend is running XP. I gave him the program, and it will query correctly, but it won't actually change the key. I assume the problem has something to do with the access rights to the registry with XP's security stuff... or something like that. Anyway, if you can help me out with some codin' that I can use to set the security settings (I can get his username 'n password if needed) so I can make a version of this program for him. Thx!


    --LiK

  2. #2
    LiKWiD
    Guest

    btw..

    (the program works fine for me. didn't mention that.)


    --LiK

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    I don't think it has to do with security, because if the HalfLife program is able to modify the keys, your program should be able to do that as well.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I agree with Sang-Drax

    Check the return of each call to a registry API to see if it isnt ERROR_SUCCESS.....then investigate that function to see what you are doing wrong

  5. #5
    LiKWiD
    Guest

    Re:

    How could the code be wrong if it works when i run it (Windows 98), but doesn't work when he or his bro run it (Windows XP)? Same program, but different results...


    -LiK
    official nubert.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    >>How could the code be wrong if it works when i run it (Windows 98), but doesn't work when he or his bro run it (Windows XP)?

    You have done something that has later been 'outlawed' by the newer version MS OS's. A common problem in larger apps.

    In Win98 your problem is not being caught but in XP it is.

    I regularly find things I can do in my apps on a Win98 OS that cause problems on the stricter Win2000 and WinXP platforms.

    Use Ford's suggestion on using GetLastError() to find WHERE the app fails. Then you can find WHY.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    LiKWiD
    Guest
    aight, i'll give it a try.. thanks for your help, guys.

    --LiK
    becoming 'un-noobified' one day at a time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Visual C++ 2005 linking and file sizes
    By Rune Hunter in forum C++ Programming
    Replies: 2
    Last Post: 11-12-2005, 10:41 PM
  4. Searching and matching strings: segmentation fault
    By Smola in forum C Programming
    Replies: 18
    Last Post: 07-11-2005, 12:25 AM