PC Review


Reply
Thread Tools Rate Thread

Creating dll and windows services with VB Express 2005

 
 
Val3
Guest
Posts: n/a
 
      12th Mar 2005
Hi all.
I need to build dll(s) and windows services using VB .NET 2005 Express. When
I make File/New project the windows contain only Windows application,
Windows control library, Console application, DVD collection starter kit.
How can I do? Any suggest?
Thanks in advance.

VAL


 
Reply With Quote
 
 
 
 
gaidar
Guest
Posts: n/a
 
      12th Mar 2005

Create a Windows Application in the Visual Studio, then conver it to dll
file and use command-line compiler to build the assembly.

Gaidar

"Val3" <(E-Mail Removed)> wrote in message
news:K6CYd.1046395$(E-Mail Removed)...
> Hi all.
> I need to build dll(s) and windows services using VB .NET 2005 Express.
> When I make File/New project the windows contain only Windows application,
> Windows control library, Console application, DVD collection starter kit.
> How can I do? Any suggest?
> Thanks in advance.
>
> VAL
>



 
Reply With Quote
 
Robert Schoen
Guest
Posts: n/a
 
      18th Mar 2005
That is a good question. VB Express is a very powerful tools at its limited feature set. With that said, I believe you can still do most things that is in the full featured parent
products it just does not have all the nice built in stuff that makes it really easy....

There are a couple of options....
1. You should be able to take an existing VS7/VS71 windows service project and open it up in the Express sku...migrate it to 2005 and their you go. Except you
probably do not have such a project
Or
2. You can create one from "scratch". First create a vb win app - remove the form.vb file and add a new class file - next add a .net reference to System.serviceprocess -
next change the class file code to look something like the below where you handle all methods required for the service.

You will have some additional things to work through but hopefully this will get you started in the write direction.

BTW, the default vb .net windows service project when built into an assembly - is an Exe and not a Dll.

Hope this helps.

Robert

------------------------------------------------------
Imports System.ServiceProcess

Public Class Service1
Inherits System.ServiceProcess.ServiceBase

#Region " Component Designer generated code "

Public Sub New()
MyBase.New()

' This call is required by the Component Designer.
InitializeComponent()

' Add any initialization after the InitializeComponent() call

End Sub

'UserService overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' The main entry point for the process
<MTAThread()> _
Shared Sub Main()
Dim ServicesToRun() As System.ServiceProcess.ServiceBase

' More than one NT Service may run within the same process. To add
' another service to this process, change the following line to
' create a second service object. For example,
'
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
'
ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1}

System.ServiceProcess.ServiceBase.Run(ServicesToRun)
End Sub

'Required by the Component Designer
Private components As System.ComponentModel.IContainer

' NOTE: The following procedure is required by the Component Designer
' It can be modified using the Component Designer.
' Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
Me.ServiceName = "Service1"
End Sub

#End Region

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
End Sub

Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
End Sub

End Class
--------------------------------------------------------------------

Robert S (MSFT Visual Basic QA)
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).
--------------------
>From: "Val3" <(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.languages.vb,microsoft.public.dotnet.languages.vb.upgrade
>Subject: Creating dll and windows services with VB Express 2005
>Lines: 10
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>X-Antivirus: avast! (VPS 0510-1, 11/03/2005), Outbound message
>X-Antivirus-Status: Clean
>Message-ID: <K6CYd.1046395$(E-Mail Removed)>
>Date: Sat, 12 Mar 2005 13:27:06 GMT
>NNTP-Posting-Host: 80.180.145.35
>X-Complaints-To: "Please send abuse reports to (E-Mail Removed) and technical notifications to (E-Mail Removed)"
>X-Trace: news4.tin.it 1110634026 80.180.145.35 (Sat, 12 Mar 2005 14:27:06 MET)
>NNTP-Posting-Date: Sat, 12 Mar 2005 14:27:06 MET
>Organization: TIN
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!news-

out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mail
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb.upgrade:7256 microsoft.public.dotnet.languages.vb:264782
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>
>Hi all.
>I need to build dll(s) and windows services using VB .NET 2005 Express. When
>I make File/New project the windows contain only Windows application,
>Windows control library, Console application, DVD collection starter kit.
>How can I do? Any suggest?
>Thanks in advance.
>
>VAL
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vc 2005 express error creating project Gillard Microsoft VC .NET 4 30th Apr 2008 08:35 PM
Sql Server 2005 Express Advanced Services =?Utf-8?B?Uko=?= Microsoft Access ADP SQL Server 1 7th Jun 2007 08:02 PM
Creating a custom installer in VC# 2005 Express alexey_r@mail.ru Microsoft C# .NET 1 17th May 2006 09:56 PM
Creating .xll files in visual c++ 2005 express. =?Utf-8?B?SmFja3NvblJKb25lcw==?= Microsoft Excel Programming 0 15th Mar 2006 07:37 PM
VB Express 2005 and Windows Services gv Microsoft Dot NET 1 14th Dec 2005 09:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:40 PM.