Results 1 to 2 of 2

Thread: Asynchronous?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    1

    Asynchronous?

    I havn't worked much with Asynchronous callbacks so I'm here for some help from the throbing brain...

    I have a program that scans all computers on the network and checks for a specific file, returns details about that file. I have a listview and on the callback I'm populating the results that the asyc function returns. But occasionally some of the results in the listview turn up blank. I'm not sure why... I'm running my async calls in a for loop... like this

    Dim cb As New AsyncCallback(AddressOf Me.ResultsCB)
    For x = 0 To aryComputers.GetUpperBound(0)
    Dim ar As IAsyncResult = cd.BeginInvoke(aryComputers(x), _FilePathName.Text, cb, Nothing)
    Next

    are my callbacks coming in at the same time and overtaking my results function to update my listview?

    Any help is appreciated..., or even a "you're stupid" comment is always nice too....

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: Asynchronous?

    Where is the code for the callback? Are you using Synclock to make sure multiple threads don't try to access anything at the same time?

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