Click here to Skip to main content
15,917,859 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Converting Excel application into a Web Service Pin
Gerry Schmitz13-Oct-14 11:14
mveGerry Schmitz13-Oct-14 11:14 
GeneralRe: Converting Excel application into a Web Service Pin
Sujana Alluru13-Oct-14 21:09
professionalSujana Alluru13-Oct-14 21:09 
GeneralRe: Converting Excel application into a Web Service Pin
Gerry Schmitz13-Oct-14 21:49
mveGerry Schmitz13-Oct-14 21:49 
GeneralRe: Converting Excel application into a Web Service Pin
Sujana Alluru14-Oct-14 0:10
professionalSujana Alluru14-Oct-14 0:10 
GeneralRe: Converting Excel application into a Web Service Pin
Gerry Schmitz14-Oct-14 11:29
mveGerry Schmitz14-Oct-14 11:29 
AnswerRe: Converting Excel application into a Web Service Pin
Pete O'Hanlon13-Oct-14 21:21
mvePete O'Hanlon13-Oct-14 21:21 
GeneralRe: Converting Excel application into a Web Service Pin
Sujana Alluru14-Oct-14 19:56
professionalSujana Alluru14-Oct-14 19:56 
GeneralRe: Converting Excel application into a Web Service Pin
Jose Segarra21-Oct-14 3:25
Jose Segarra21-Oct-14 3:25 
GeneralRe: Converting Excel application into a Web Service Pin
Sujana Alluru2-Dec-14 19:42
professionalSujana Alluru2-Dec-14 19:42 
QuestionMessage Closed Pin
11-Oct-14 4:15
Member 1098252111-Oct-14 4:15 
Questiontable compare Pin
byka9-Oct-14 3:48
byka9-Oct-14 3:48 
AnswerRe: table compare Pin
Eddy Vluggen9-Oct-14 9:25
professionalEddy Vluggen9-Oct-14 9:25 
Questionweb development Pin
Member 111411249-Oct-14 3:47
Member 111411249-Oct-14 3:47 
AnswerRe: web development Pin
Eddy Vluggen9-Oct-14 9:21
professionalEddy Vluggen9-Oct-14 9:21 
QuestionWindows application certain GUI elements do not work / display as expected Pin
Johan Hakkesteegt8-Oct-14 3:21
Johan Hakkesteegt8-Oct-14 3:21 
AnswerRe: Windows application certain GUI elements do not work / display as expected Pin
Eddy Vluggen8-Oct-14 7:59
professionalEddy Vluggen8-Oct-14 7:59 
GeneralRe: Windows application certain GUI elements do not work / display as expected Pin
Johan Hakkesteegt8-Oct-14 20:56
Johan Hakkesteegt8-Oct-14 20:56 
GeneralRe: Windows application certain GUI elements do not work / display as expected Pin
Eddy Vluggen9-Oct-14 0:29
professionalEddy Vluggen9-Oct-14 0:29 
QuestionAjax call with RadioButtonList Pin
byka6-Oct-14 6:52
byka6-Oct-14 6:52 
SuggestionRe: Ajax call with RadioButtonList Pin
Eddy Vluggen6-Oct-14 8:18
professionalEddy Vluggen6-Oct-14 8:18 
AnswerRe: Ajax call with RadioButtonList Pin
sankarsan parida7-Oct-14 18:11
professionalsankarsan parida7-Oct-14 18:11 
QuestionWindows Service, design question, threading, how to write a delegate Pin
jkirkerx5-Oct-14 12:26
professionaljkirkerx5-Oct-14 12:26 
This is the same program as the post below

I designed my windows service to run on a timer, and check the queue for email jobs.
So a job is queued, and I run the job on a new thread.

Question: Is this dumb to do and a waste of time?

I have the thread working now, but I need to be able to stop the thread or check on it's progress if the net stop is called, or power down while running. So I guess I need a delegate.

So this leads to the next question; how to write a delegate.

I used this post, http://tech.xster.net/tips/multi-threading-in-vb-net/[^]
but I don't understand where to place the code.

So I have a service code file, and a thread code file.
I call the thread here in the timer

[smtpMessenger.vb]
jRUN = New messageSender()
Dim dwRCode As Integer = jRUN.messageSender(
    sJOBS(idx),
    G_JOB_TIMER
)


And then this is my thread
[messageSender.vb]
Public Class messageSender
    Inherits send_Message_Broadcast_Record
    Implements IDisposable

    Dim disposed As Boolean = False

    Public M_RUNNING As Boolean
    Public M_MAILINGLIST_ID As Integer
    Public m_EMAILS_SENT As Integer
    Public m_STOP As Boolean

    Private mJOB As structure_CRM_JOBS
    Private mList() As structure_MailingList_Array
    Private M_JOBTIMER As System.Timers.Timer    

    Public Function messageSender( _
        ByVal pJOB As structure_CRM_JOBS,
        ByRef P_JOBTIMER As System.Timers.Timer) As Integer

        Dim dwExitCode As Integer = 2

        Dim ms_Container As messageSender = New messageSender()
        ms_Container.mJOB = pJOB
        ms_Container.M_JOBTIMER = P_JOBTIMER
        ms_Container.m_STOP = False

        Dim eLoader As New email_address_loader()
        Dim e_count As Integer = eLoader.get_malingList_Count()
        ReDim ms_Container.mList(e_count - 1)

        eLoader.load_mailingList_Array(ms_Container.mList)

        If Not (M_JOBTIMER Is Nothing) Then
            M_JOBTIMER.Stop()
        End If

        Dim msThread As Thread = New Thread(New ThreadStart(AddressOf ms_Container.messageSender_Proc))
        msThread.Priority = ThreadPriority.Lowest
        msThread.IsBackground = True
        msThread.Start()
        msThread.Join()

        Return dwExitCode

    End Function


I could really use some help here, perhaps just some remarks like delegate here, this there to get a better understanding of how to use the delegate on my current code.
AnswerRe: Windows Service, design question, threading, how to write a delegate Pin
Kornfeld Eliyahu Peter6-Oct-14 1:03
professionalKornfeld Eliyahu Peter6-Oct-14 1:03 
QuestionRe: Windows Service, design question, threading, how to write a delegate Pin
Richard Deeming6-Oct-14 1:24
mveRichard Deeming6-Oct-14 1:24 
GeneralRe: Windows Service, design question, threading, how to write a delegate Pin
jkirkerx6-Oct-14 6:39
professionaljkirkerx6-Oct-14 6:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.