Results 1 to 40 of 104

Thread: [VB6] - Module for working with multithreading.

Hybrid View

  1. #1

  2. #2
    New Member
    Join Date
    May 2020
    Posts
    5

    Re: [VB6] - Module for working with multithreading.

    Quote Originally Posted by The trick View Post
    lowe517, you can't call the methods of an object between threads without marshaling. You can pass the socket handle between threads so you can create an auxiliary object which lives in the thread. See the example.
    Thanks! I 'll check this out

  3. #3
    New Member
    Join Date
    May 2020
    Posts
    5

    Re: [VB6] - Module for working with multithreading.

    Dear The trick,
    I find that I can do the some work using VBCreatethread, as well as using a private object as your example showed,all I need to do is that I dim an object(cTCPClient) in the threadFunc and after its method calling I free it. the object exists only in the threadfunc, everything seems all right, but is there anything potentially wrong ?

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Feb 2015
    Posts
    2,797

    Re: [VB6] - Module for working with multithreading.

    Quote Originally Posted by lowe517 View Post
    Dear The trick,
    I find that I can do the some work using VBCreatethread, as well as using a private object as your example showed,all I need to do is that I dim an object(cTCPClient) in the threadFunc and after its method calling I free it. the object exists only in the threadfunc, everything seems all right, but is there anything potentially wrong ?
    The main restriction you shouldn't pass an object reference between threads. The other point is you should track the data and synchronize access. The rules are the same if you would work in C/C++.

Tags for this Thread

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