Noob Question - OpenProcess under Vista and 7 menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Noob Question - OpenProcess under Vista and 7

    Hello all.

    I've got a feeling that I am going to take stone throws ^^.

    I use my own bot since 3 months under XP, but I have just passed under Windows 7.
    Since 7, it is impossible to make the OpenProcess function work.

    I use those functions :

    Code:
    //On autorise la lecture de la mémorie sur le jeu
    SetsPrivilege("SeDebugPrivilege", Vrai)
    
    //On crée un ID avec tous les droits qui pointe vers le handle de WoW
    nRes = API("user32", "GetWindowThreadProcessId", gnWOW_HANDLE, &gnWOW_ID)
    
    //On ouvre l'ID avec tous les droits
    gnWOW = API("kernel32", "OpenProcess", 0x1F0FFF, Faux, gnWOW_ID)
    Under XP, OpenProcess always return a non zero Value
    Under 7, the same function always return a 0 value :/.

    I read all the MSDN lib and found this => Windows Server 2003 and Windows XP/2000: The size of the PROCESS_ALL_ACCESS flag increased on Windows Server 2008 and Windows Vista. If an application compiled for Windows Server 2008 and Windows Vista is run on Windows Server 2003 or Windows XP/2000, the PROCESS_ALL_ACCESS flag is too large and the function specifying this flag fails with ERROR_ACCESS_DENIED. To avoid this problem, specify the minimum set of access rights required for the operation. If PROCESS_ALL_ACCESS must be used, set _WIN32_WINNT to the minimum operating system targeted by your application (for example,
    #define _WIN32_WINNT _WIN32_WINNT_WINXP
    ). For more information, see Using the Windows Headers.

    Can someone give me the value of the PROCESS_ALL_ACCESS flag under 7 and Vista.
    Under XP it's 0x1F0FFF but under 7 and Vista ???

    Thx a lot and sorry for my Noobinesstitude ^^.

    OLDER ACCS

    Noob Question - OpenProcess under Vista and 7
  2. #2
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Run your bot as admin.

    Do you still get this?

  3. #3
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I forgot saying that I've put the exe as admin and Windows XP (sp3) compatible.
    OLDER ACCS

  4. #4
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Urm... Not sure them mate...

    Have you tried not using Windows XP (sp3) compatible?
    Juts run it as admin...

  5. #5
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I try this too.
    OLDER ACCS

  6. #6
    flukes1's Avatar Member
    Reputation
    6
    Join Date
    Aug 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try 0x1FFFFF.

    (edited because I fail at adding)
    Last edited by flukes1; 09-23-2009 at 10:35 AM.

  7. #7
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    0x1FFFFF don't work :/.

    I don't know where is the problem.

    I create the exe, and run it with admin rights and it doesn't work.
    OLDER ACCS

  8. #8
    maclone's Avatar / Authenticator enabled
    Reputation
    2420
    Join Date
    Nov 2007
    Posts
    8,726
    Thanks G/R
    0/1029
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You should add that you're coding in WinDev
    Zomfg. And no, don't ask. - Dombo did it.

  9. #9
    Liwyn's Avatar Member
    Reputation
    3
    Join Date
    Jun 2009
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    void SetDebugPrivileges()
    {
        void* tokenHandle;
        OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &tokenHandle);
        TOKEN_PRIVILEGES privilegeToken;
        LookupPrivilegeValue(0, SE_DEBUG_NAME, &privilegeToken.Privileges[0].Luid);
        privilegeToken.PrivilegeCount = 1;
        privilegeToken.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
        AdjustTokenPrivileges(tokenHandle, 0, &privilegeToken, sizeof(TOKEN_PRIVILEGES), 0, 0);
        CloseHandle(tokenHandle);
    }
    If I understand your problem you dont have the rights to open the process (got the same rpoblem in 7) this function works for me to get the rights

  10. #10
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont have to any of that for my vs2010 proj.

    In 64bit Win 7 Legit

  11. #11
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Am I missing something that you should still just use PROCESS_ALL_ACCESS as your value...? If it's set to what platform you want, the precompiler should pick what value to use. That's most likely not the problem.

  12. #12
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stop ****ing using PROCESS_ALL_ACCESS. Just OR the flags you actually need together.

    To inject a DLL you want this:
    // Get a handle for the target process.
    EnsureCloseHandle Process(OpenProcess(
    PROCESS_QUERY_INFORMATION | // Required by Alpha
    PROCESS_CREATE_THREAD | // For CreateRemoteThread
    PROCESS_VM_OPERATION | // For VirtualAllocEx/VirtualFreeEx
    PROCESS_VM_WRITE, // For WriteProcessMemory
    FALSE, ProcID));

    Ugh, I swear this has got to be the millionth time I've told people this on this forum.

  13. #13
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK.

    After many and many trys, I finally found what the problem ...

    And the problem is Windev ^^. How I'm surprised lol.

    I use Windev 12 but there is a new Version : Windev 14.

    I download it, recompiled the project and create the exe, and now it works fine.

    Thx all for help. :wave:

    OLDER ACCS

  14. #14
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool story bro. You're still retarded for putting the flags in manually.

  15. #15
    mmosoft's Avatar Active Member CoreCoins Purchaser
    Reputation
    25
    Join Date
    May 2009
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bro, as U said !

    Have U look the 1st post => gnWOW = API("kernel32", "OpenProcess", 0x1F0FFF, Faux, gnWOW_ID)

    Why are U saying I'm retarded ? I'm not using PROCESS_ALL_ACCESS flag.

    I don't know why U are always criticize us. Sorry about our stupidity.

    And maybe one day somebody is going to create a bot with Windev, and he will be happy to find this post. I'm not telling my life / story ...
    OLDER ACCS

Page 1 of 2 12 LastLast

Similar Threads

  1. Noob Question. C++ start wow memoryread and write
    By Sinobis9000 in forum WoW Memory Editing
    Replies: 4
    Last Post: 01-20-2012, 03:39 PM
  2. Noob question about Config.wtf and 3.0.2
    By Hambeast in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-22-2008, 04:55 PM
  3. [Question] Vista and Glitchys MES
    By Darkbear in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-12-2008, 03:20 AM
  4. noob question about custom classes and mpq
    By Shogun7 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-24-2008, 06:33 AM
  5. [Question] Is there a known error with Vista and WDB Editing?
    By leathergoose in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 04-06-2008, 10:08 AM
All times are GMT -5. The time now is 12:31 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search