Tech Support > Microsoft Windows > Development Resources > Services and windows messaging
Services and windows messaging
Posted by Peter McCarthy on October 29th, 2003


Services and windows messaging

Folks,
I have a process that uses Windows messaging for IPC. This worked fine,
however I have now converted my process to a service (using Microsoft
Windows NT Resource Kit). Now all the calls to PostMessage or SendMessage no
longer seem to work. The process uses network sockets as well. Any ideas ???

Regards


Posted by Scott McPhillips [MVP] on October 29th, 2003


Peter McCarthy wrote:

In the control panel services settings, try turning on 'Allow service to
interact with desktop.' When this is off any windows created by the
service are in a different desktop 'address space'. If this solves your
problem, you can probably set the same setting by calling Service
Control Manager functions during application installation.

--
Scott McPhillips [VC++ MVP]


Posted by Sten Westerback on October 30th, 2003



"Peter McCarthy" <petergmccarthy@hotmail.com> wrote in message
news:zMNnb.2975$bD.13780@news.indigo.ie...
There is no legitime reason to do send and receive ANY messages in a
service... that is if it's a real service. The mention of Reskit makes me
think that you are using SvcAny which is just a wrapper. If so then you
can possibly get it to work by allowing interaction with the current desktop
(as stated in the other response). But that won't work when there isn't
any interactively logged on user.

What you should do instead is use some more reasonable IPC such as
(named) pipes or mailslots... or sockets.


make the service without utilizing reskit's poor-mans-helpers.

- Sten




Similar Posts