469,568 Members | 1,430 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Windows Service and ActiveX

Hello All,

I have a question about using an ActiveX control with a Windows Servce in
C#. I believe it is not possible to properly setup an ActiveX control in a
windows service as the particular ActiveX control we're using (GrFinger for
fingerprint reader)implements several event handlers. It is also my
understanding that there is no Message Pump within a Windows Service. I
suppose I could create my own message pump, but this seems like a really
wrong approach.

Can anyone confirm my views as my supervisor insists this is the way to code
our current project and I don't want to code down a road that isn't worth
coding down...

My idea is to use a Windows Service with either .NET remoting or Sockets to
interact with a Windows Forms App (which has the ActiveX on it)

If there is a way to setup an event driven ActiveX in a Windows Service,
please give me suggestions.

Thanks for your time,
John F.
Mar 22 '07 #1
2 2533
John,

Do you ever wonder how managers become managers? Sometimes when I see
what managers insist upon, I ask the same thing.

But I digress. A windows service can not interact with the desktop by
default. Meaning, it can't use window functions. There is a checkbox which
allows the service to interact with the desktop, but generally, this is a
really bad idea.

Now, you have a Windows Forms app that has the ActiveX control, and
that's ok, because the Windows Forms app is not the service, but rather,
running on the user's desktop. However, if you wanted to create the ActiveX
control in the service app, you shouldn't. COM components are one thing,
but ActiveX are much more than that.

So the question is, do you require the ActiveX control to run in the
service? If so, then yes, the design is wrong. If it only runs in the
Windows Forms app, then you should be ok.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John F" <jf@rt.comwrote in message
news:89**********************************@microsof t.com...
Hello All,

I have a question about using an ActiveX control with a Windows Servce in
C#. I believe it is not possible to properly setup an ActiveX control in
a
windows service as the particular ActiveX control we're using (GrFinger
for
fingerprint reader)implements several event handlers. It is also my
understanding that there is no Message Pump within a Windows Service. I
suppose I could create my own message pump, but this seems like a really
wrong approach.

Can anyone confirm my views as my supervisor insists this is the way to
code
our current project and I don't want to code down a road that isn't worth
coding down...

My idea is to use a Windows Service with either .NET remoting or Sockets
to
interact with a Windows Forms App (which has the ActiveX on it)

If there is a way to setup an event driven ActiveX in a Windows Service,
please give me suggestions.

Thanks for your time,
John F.

Mar 22 '07 #2
Thanks Nicholas! I appreciate your assistance.
--
John F
"Nicholas Paldino [.NET/C# MVP]" wrote:
John,

Do you ever wonder how managers become managers? Sometimes when I see
what managers insist upon, I ask the same thing.

But I digress. A windows service can not interact with the desktop by
default. Meaning, it can't use window functions. There is a checkbox which
allows the service to interact with the desktop, but generally, this is a
really bad idea.

Now, you have a Windows Forms app that has the ActiveX control, and
that's ok, because the Windows Forms app is not the service, but rather,
running on the user's desktop. However, if you wanted to create the ActiveX
control in the service app, you shouldn't. COM components are one thing,
but ActiveX are much more than that.

So the question is, do you require the ActiveX control to run in the
service? If so, then yes, the design is wrong. If it only runs in the
Windows Forms app, then you should be ok.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John F" <jf@rt.comwrote in message
news:89**********************************@microsof t.com...
Hello All,

I have a question about using an ActiveX control with a Windows Servce in
C#. I believe it is not possible to properly setup an ActiveX control in
a
windows service as the particular ActiveX control we're using (GrFinger
for
fingerprint reader)implements several event handlers. It is also my
understanding that there is no Message Pump within a Windows Service. I
suppose I could create my own message pump, but this seems like a really
wrong approach.

Can anyone confirm my views as my supervisor insists this is the way to
code
our current project and I don't want to code down a road that isn't worth
coding down...

My idea is to use a Windows Service with either .NET remoting or Sockets
to
interact with a Windows Forms App (which has the ActiveX on it)

If there is a way to setup an event driven ActiveX in a Windows Service,
please give me suggestions.

Thanks for your time,
John F.


Mar 22 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by jayderk | last post: by
5 posts views Thread by andy.g.ward | last post: by
reply views Thread by Charles Leonard | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.