473,471 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

windows service in c#


Hello to all
I have to make windows service(in C#.NET) and use (ATL Com dll made in
visual studio 6) in my service
How can i use that.Is by just add reference or there is some other way
I am using visual studio.net 2003
Please help
Nov 17 '05 #1
6 1071
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...

Hello to all
I have to make windows service(in C#.NET) and use (ATL Com dll made in
visual studio 6) in my service
How can i use that.Is by just add reference or there is some other way
I am using visual studio.net 2003
Please help


Well for starters wll you need to do is create a Windows Service project and
add a reference to thte COM component (which will generate the Runtime
Callable Wrapper - RCW) for the COM component. Are all the COM interfaces
marshalled via the typelib marshaller?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Nov 17 '05 #2
thanks for ur reply sir
Are all the COM interfaces
marshalled via the typelib marshaller?
i am having dll and its code also now how can i know its interfaces are
marshalled or not its in vc++
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:#8**************@TK2MSFTNGP09.phx.gbl...
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...

Hello to all
I have to make windows service(in C#.NET) and use (ATL Com dll made in
visual studio 6) in my service
How can i use that.Is by just add reference or there is some other way
I am using visual studio.net 2003
Please help
Well for starters wll you need to do is create a Windows Service project

and add a reference to thte COM component (which will generate the Runtime
Callable Wrapper - RCW) for the COM component. Are all the COM interfaces
marshalled via the typelib marshaller?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Nov 17 '05 #3
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
thanks for ur reply sir
Are all the COM interfaces
marshalled via the typelib marshaller?
i am having dll and its code also now how can i know its interfaces are
marshalled or not its in vc++


Look in the IDL file and see if all interfaces are marked as "dual" or
"oleautomation"

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Nov 17 '05 #4
They are marked Dual
what if they are marked "Dual" and what if "oleautomation"
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:#h**************@TK2MSFTNGP10.phx.gbl...
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
thanks for ur reply sir
Are all the COM interfaces
marshalled via the typelib marshaller?
i am having dll and its code also now how can i know its interfaces are
marshalled or not its in vc++


Look in the IDL file and see if all interfaces are marked as "dual" or
"oleautomation"

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Nov 17 '05 #5
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:Oz**************@TK2MSFTNGP09.phx.gbl...
They are marked Dual
what if they are marked "Dual" and what if "oleautomation"


In both cases it means that the tools will get their definitions from the
typelibrary that descibes them and build the appropriate wrapper classes for
you which means your life from a build perspective should be
straightforward. There are numerous issues with COM Interop in some of the
darker corners however. Which of these are relevant to you depends on the
kind of thing you are doing with the COM components.

Regards

Richard Blewett - DevelopMentor

http://www.dotnetconsult.co.uk/weblog

http://www.dotnetconsult.co.uk


Regards

Richard Blewett - Deve
Nov 17 '05 #6
ok thanks again for ur help
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:#x**************@TK2MSFTNGP14.phx.gbl...
"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:Oz**************@TK2MSFTNGP09.phx.gbl...
They are marked Dual
what if they are marked "Dual" and what if "oleautomation"
In both cases it means that the tools will get their definitions from the
typelibrary that descibes them and build the appropriate wrapper classes

for you which means your life from a build perspective should be
straightforward. There are numerous issues with COM Interop in some of the
darker corners however. Which of these are relevant to you depends on the
kind of thing you are doing with the COM components.

Regards

Richard Blewett - DevelopMentor

http://www.dotnetconsult.co.uk/weblog

http://www.dotnetconsult.co.uk


Regards

Richard Blewett - Deve

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Michael Riggio | last post by:
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP? Thanks, -Mike
1
by: Artur Kowalski | last post by:
I have a NotifyIcon in my Windows Service project and I am trying to add a ContextMenu to this NotifyIcon or use some of the mouse events. Everything isn't working. I think so base class of the...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
3
by: Doug Bailey | last post by:
I am trying to control a Windows Service via a Web Service interface. (I am developing in .NET2003) I am using the ServiceController object which allows me to read the state of the services with...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
1
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service that I want to host in windows service. The problem is that if I host it as windows service it does not use the configuration file. I have to define the binding,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.