• COM+ Event Handling (VB6 / COM+)

    • This topic has 0 replies, 1 voice, and was last updated 22 years ago.
    Author
    Topic
    #386667

    I’ve created a COM+ application on a remote server that has a number of components. One of the components (‘RangeDataServices’) performs a number of data updates and when I first designed the object I included a number of Events…

    Public Event RecordProcessed(RecordNumber As Long)
    Public Event MaxValueSet(MaxValue As Long)
    Public Event SetNewClientMessage(Message As String)
    Public Event StageCompleted(CurrentStage As Integer)

    My plan was to raise the events from the COM+ application back to the requesting client, but then I realised the whole ‘Publisher’ & ‘Subscriber’ mechanism of COM+ handles this. So, I created an event class that represents the 4 events as detailed above.

    In my subscriber component ‘RangeDataServices’ I have referenced the event class & implemented the object. Also within the subscriber object I have replaced all RaiseEvent statements with ‘objEvent’ [The Event Class] and the relevant method with input parameters.

    I’ve created the COM+ Application with RangeDataServices configured as a subscriber & the Event class….was hoping I would now be able to receive any events in the client application, but no!

    I’m doing something wrong here I’m sure, but have got bogged down in the Microsoft documentation (which seems to go into great C++ low-level depths, but leaves the simple stuff!). Does anyone have any experience with COM+ Events or know of any sites that have good COM+ Event documentation or examples….?? Any help appreciated.

    Thanks

    Reply To: COM+ Event Handling (VB6 / COM+)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: