Manage My Windows Service from User App

A

AMDRIT

In VS2003, I would like to modify my windows service so that I may remotely
interact with it. I am looking for an article or two, or a detailed
description here of what to do. If you folks could point me into the right
direction, I would appreciate it.

Here is my thinking: (I didn't put any code behind the sample, I am just
attempting to show what I am thinking I need to do.)

Service App

'Processes tasks on a schedule, emails notification

Class Service

#Region " Internal Service Implementation" ....

#Region " Management Implementation"

Event QueueChanged(sender as object. e as system.eventargs)
Event QueueItemStatus(Byval QI as QueueItem, Byval Major as Integer, Byval
Minor as Integer)

Public Readonly Property QueueCount() as Integer
Public Function ReadQueue() as MyQueue
Public Sub RemoveItem(Index as integer)
Public Sub AddItem(QI as QueueItem)

Public Sub Register(CI as ClientInfo)
Public Sub UnRegister(CI as ClientInfo)

Public Function ListRegistrars() as ClientInfo()

#End Region

End Class

Libraries

Class ClientInfo
public username as string
End Class

Client App

Class frmMain

private mservers as hashtable

private sub Connect(ServerAddress as string, ServerPort as Integer)

dim CI as ClientInfo
dim SVR as Service


CI = new ClientInfo
CI.username=system.security.principal.windowsidentity.name

....
Connect to the service and use SVR as the reference
This is where I think I need the help
....

SVR.Registar(CI)

Addhandler SVR.QueueChanged, Addressof Server_QueueChanged
Addhandler SVR.QueueItemStatus, Addressof Server_QueueItemStatus

end Sub

End Class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top