473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 2806
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
7
by: Will | last post by:
I'm working on a C# Windows Service that needs to monitor serial port communication. Because the .Net framework does not include support for serial communications, I've decided to use the...
18
by: jayderk | last post by:
a customer was trying to install some of our software after they installed the windows XP service pack 2 and he is getting a message that says something about it not being compatable with windows...
5
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown :...
3
by: Angshuman Agarwal | last post by:
Hello, I have written a Windows Service in VB6 and a VB Dll separately. When I call the DLL normally in VB (i.e. by adding the reference in some other form) it works fine , but if I try calling...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
3
by: Joseph Geretz | last post by:
Our application is primarily VB6, however we are migrating toward .NET and a newer architecture. For the time being though, we're stuck with a hybrid approach with our ActiveX client application...
28
by: | last post by:
I have a multi threaded windows form application that runs great after calling Application.Run(). Application.Run is required for a COM component I a using in the app (required for message loop). ...
41
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.