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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:30:40+00:00 2026-06-11T15:30:40+00:00

I have 2 programs, and I need a way for one of them to

  • 0

I have 2 programs, and I need a way for one of them to somehow send a message to the other. I’ve looked into the SendMessage function in the Win32 API, and while it works great as long as you have a window handle, my program needs to be able to run while logged off under a service, which means it cannot create a window handle.

Is there any way I can receive messages from another process without having a window handle created? I’ve been looking to see if Win32 has some other way that I can hook into the messaging so that I don’t depend on having a window handle, but there has to be some way to communicate between processes at a basic level, doesn’t there?

I have looked into using Pipe’s to do this, but have run into huge permissions issues with that on top of that being much higher level than I’m really looking for. All I need to be able to do is send a simple custom int message so my process knows it’s time to shut down.

  • 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-11T15:30:41+00:00Added an answer on June 11, 2026 at 3:30 pm

    If it’s really as simple as signalling the other program to shut down, then you can create a named event. Both processes create the event with the same name. One watches it and the other can signal it. The one watching can do that with a modified message pump that uses MsgWaitForMultipleObjects instead of PeekMessage.

    There’s a slight denial-of-service risk here, as a malicious process could create an event with the same name and cause your other application to exit.

    If you need more sophisticated communication, you’ll need a pipe, mailslot, shared memory, file watches, registry watches, or use another synchronizable kernel event (Mutex, Semaphore, etc.).

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

Sidebar

Related Questions

I have a makefile for compiling Arduino programs . I need to add some
I have written quite a few Ruby programs, but if I need to show
I need an XML-serializable dictionary. Actually, I now have two quite different programs that
I have a program in which I need to store a Class object into
I have three programs that need to be compiled at the same time, 2
I have a C shell script that calls two C programs - one after
I two programs running, one in Python and one in C++, and I need
I often need to make a core function that's used in many places somehow
I have a program where I need to find all instances of a class
I have a program that I need to be able to search a file

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.