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

  • Home
  • SEARCH
  • 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 6770795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:21:20+00:00 2026-05-26T15:21:20+00:00

I want to make IPC, but I cannot use blocking mechanism (SendMessage, PIPE, TCP),

  • 0

I want to make IPC, but I cannot use blocking mechanism (SendMessage, PIPE, TCP), and I don’t wanna use Threads (more source of errors), or storing the data (files, registry for example).

Here is 2-4 softwares in every PC, and I want to synchronize the “message existance”.

What is it? I explain it.
Every app is uses same database. They are periodically read the “messages” with two queries, and see when “normal” and “alarm” message arrived – or when they are all opened and read.
But one of them are the “chosen”, protected with mutex, and it control a trayicon, and balloon hint. When message arrived, it reflected on tray.
When this app die, another trying to get the mutex, and control the tray.

I want to use the IPC to say the “master” if the state changed (new message arrived, or all messages read) to master know about this, and we avoid this situation:
Master show the tray and balloon, and user read the messages in another app. In this case the master don’t know about it, and continue to show the “new messsage” controls. Or master read all, but a new message arrived. In this time the master must inform about this.
Because the checking periods are: normal message – 5 minutes, alarm – 2 minutes.

So: why I don’t use blocking IPC, like SendMessage?
Because if the master starts a big query (5 minutes) then the another apps are blocked for these time.. 🙁

Previously I tried with temp files, registry writing, but every of them is have the problem of “cleaning”, so data remaining…

Then I have an idea the every form is visible for “EnumWindows”. If messages are stored in Title, I only do PostMessage with the Handle of this form, and the Master can read the Title, process the message.
If 15 minutes passed, we ignore this message, and the “message” window destroyed.

Ok, ok, it is don’t elegant, but I don’t know about any way that don’t store anything in files, and cannot block (async) – without threading hell.

proc Send(Info : string):
  handles = EnumAndFindHandles();
  for handle in handles:
    o = CreateMessageForm(handle, Info);
    PostMessage(WM_MYMSG, handle, 11111, integer(o.Handle));

proc Recv(var Msg):
  if IsHandleValid(Msg.lParam) and ClassNameIsGood(Msg.lParam):
    txt = ReadWindowText(Msg.lParam);
    if txt > '':
       ...

I want to know two things:
1.) Do you know any situation when this communication can failed? (Caption is missing, changed or other thing that can blocking this way)?
2.) As I see only the Forms can visible in EnumWindows? Do you know a way to do this with another control?

Thanks for any ideas, good informations, suggestions!

dd

  • 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-26T15:21:20+00:00Added an answer on May 26, 2026 at 3:21 pm

    For me it sounds like memory mapped files could be a simple solution: share a block of memory between your applications, just like with a temp file. You said you considered file-based methods but don’t like the traces they leave. With memory mapped files the traces will be in the page file, which might not be such a big deal as with the registry or temporary files.

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

Sidebar

Related Questions

I want to make some graphical dialogs for my script but don't know how.
I want to make an entity that has an autogenerated primary key, but also
I want to make a class serializable but i dont want make serializable some
I have a question: I want make a notification in status bar. But when
I am making a drawing application and I want make my code more readable
i want make a app with xul but some functions and logic in a
I want make submit in this page http://www.enviarsmsacuba.com/?p=join with C# and webbRowser controll but
I want make simple call app. I use this code. Intent intent = new
I use codeigniter, i want make valid data for captcha, if captcha is mixed
I have an EDI form, I want make it more readable especially the naming

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.