CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Sep 2005
    Posts
    16

    multiThread's question in vb6

    Hello
    When I create a thread in my vb6 program, I met some problems:
    1 if i create a thread , in the debug mode , I can not terminate the thread.
    I use createThread() function to create a thread as following:

    gThreadHandle = CreateThread(ByVal 0&, ByVal 0&, AddressOf Module1.sweep_test, VarPtr(0), ByVal 0&, gThread)

    and I use terminateThread to terminate my thread:

    rc = TerminateThread(gThreadHandle, exitCode)
    CloseHandle (gThreadHandle)
    2. if I make a exe. but the exe can not create the thread. and the message told me that some address can not be written.

    I have no idea of solving these problems. Hope you can give me some tips.
    thanks in advance.
    the attachment is my project
    Attached Files Attached Files

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

Featured