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 3948888
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:25:41+00:00 2026-05-20T01:25:41+00:00

Is there a variant of APCs, or some other technique in NT-based Windows OSes,

  • 0

Is there a variant of APCs, or some other technique in NT-based Windows OSes, that will force a specific thread to call a specific user function immediately (or, at least, interrupting user code), without waiting for the thread to enter an alertable wait?

I realize this can lead to all kinds of concurrency issues. The main goal I’d like to use it for is forcing a processor level memory barrier from another thread (and waiting for completion) – other methods to achieve this would be helpful, but I’m still curious if this is possible at all 🙂

  • 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-05-20T01:25:42+00:00Added an answer on May 20, 2026 at 1:25 am

    You can do it, but it is not pretty. Since the thread is not expecting this, you will be very limited in what you can call. For example, you will not be able to call anything that uses any synchronization API.

    If you still want to do it – SuspendThread, GetThreadContext, SetThreadContext, and ResumeThread will allow you to simulate a function call. You will have to preserve all registers, including the flags.

    Obviously, this require platform-specific code. Also note that some user-mode code touches locations that are above the stack pointer so you may want to add some margin to the pushed return address.

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

Sidebar

Related Questions

Is there an exec variant that will use the current application directory to locate
Is there a variant of subprocess.call that can run the command without printing to
There is a moment in my app, that I need to force to show
There are some nice debugging tools available for windows like Process Explorer Process Monitor
Is there a specific data structure that a deque in the C++ STL is
There are several variant questions on this on SO, but I did not find
I would like to know if there is a variant data type in Delphi
Is there a case-insensitive variant of the Bob Jenkins hash function? Generics.Defaults.BobJenkinsHash provides a
If all the types in my boost::variant support the same method, is there a
There is a column that exists in 2 tables. In table 1, this column

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.