Results 1 to 32 of 32

Thread: VB6 MultiProcessing (StdExe-IPC via SharedMemory)

Hybrid View

  1. #1
    Fanatic Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    732

    Re: VB6 MultiProcessing (StdExe-IPC via SharedMemory)

    I don't like to have timers with small interval enabled continuously firing useless events.
    So in the "cIPCmaster" class I added these two enable/disable timer lines:

    Code:
    Private Sub tmrJobState_Timer()
    
        Static JobState As eJobState, JobPSec#, JobFSec#, Progress!
        T = ReadInternalType
        If JobState <> T.JobState Or JobPSec <> T.JobPreparedHPSec Or JobFSec <> T.JobFinishedHPSec Then
            JobState = T.JobState: JobPSec = T.JobPreparedHPSec: JobFSec = T.JobFinishedHPSec
    
            RaiseEvent JobStateChanged(JobState)
    
            If JobState = jobFinished Then tmrJobState.Enabled = False
            
        End If
        If Progress <> T.JobProgress Then
            Progress = T.JobProgress
            RaiseEvent ProgressChanged(Progress)
        End If
    
    End Sub
    Code:
    Public Property Let JobState(ByVal RHS As eJobState)
        If BaseAddr = 0 Then Exit Property
        T = ReadInternalType
        T.JobState = RHS
        If RHS = jobPrepared Then T.JobPreparedHPSec = HPTimer: T.JobProgress = 0
        WriteInternalType T
        
        If RHS = jobPrepared Then tmrJobState.Enabled = True
    
    End Property

    could this lead to bad consequences ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width