Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8659207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:57:27+00:00 2026-06-12T15:57:27+00:00

CreateProcess(something.exe, NULL, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &sInfo, &pInfo); ReadProcessMemory(pInfo.hProcess, (LPCVOID) (contx.Ebx +

  • 0
CreateProcess("something.exe", NULL, NULL, NULL, FALSE, CREATE_SUSPENDED, 
    NULL, NULL, &sInfo, &pInfo);

ReadProcessMemory(pInfo.hProcess, (LPCVOID) (contx.Ebx + 8),
  (LPVOID) &baseAddress, sizeof(baseAddress), NULL);

hProcess=OpenProcess(PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION,
  FALSE, pInfo.dwProcessId);

VirtualProtectEx(hProcess, (LPVOID) baseAddress, sizeof(IMAGE_DOS_HEADER),
    PAGE_EXECUTE_READWRITE, NULL);

WriteProcessMemory(hProcess, (LPVOID) baseAddress, (LPCVOID) pidh,
    sizeof(IMAGE_DOS_HEADER), NULL);

Why VirtualProctecEx gives me ERROR_NOACCESS ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:57:29+00:00Added an answer on June 12, 2026 at 3:57 pm

    The VirtualProtectEx docs say

    lpflOldProtect [out] A pointer to a variable that receives the
    previous access protection of the first page in the specified region
    of pages. If this parameter is NULL or does not point to a valid
    variable, the function fails.

    about the last argument. You’re passing NULL so should expect it to fail.

    Its possible there are also other problems. e.g. you don’t check the return value from ReadProcessMemory so baseAddress may be invalid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a process with that code: CreateProcess(NULL, process.exe, NULL, NULL, TRUE, 0,
CreateProcess() returns false when the commandline contains a path.I don't understand why. Here I
I'm calling CreateProcess to launch cl.exe (VS2010 on Win7 64 bit). I get the
Can I use CreateProcess (or ShellExecute , or any other means of invoking cmd.exe
I create a process using CreateProcess() with the CREATE_SUSPENDED and then go ahead to
I use the CreateProcess() function to launch the rdp client app using mstsc.exe. After
I'd like to have something like bash's 2>&1 redirect in Haskell that combines stdout
If you use CreateProcess , it only works on .exe's, apparently . What's the
I have written child command execution code for Win32 using CreateProcess: CreateProcessW(NULL, // app
CreateProcess suspended but it can't be resumed. Here is my code: bool success=CreateProcess(m_Process, NULL,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.