Results 1 to 3 of 3

Thread: Multi-threaded -Performed illegal operation

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Location
    Mangalore ,India
    Posts
    22

    Multi-threaded -Performed illegal operation

    hi all genious out there ......,
    I am facing a problem in using multi-threading .......

    i have active-x exe which is apartment model of threading with thread per object option.Each class in it is multi-use...

    From the exe ...
    I create a object of a class say objclass1 and it starts executing asyncronously in its own thread. This class also starts another class i.e classMessenger which also runs in its own thread.
    In my exe i maintain the reference to objclass1 and also to classMessenger.My exe and class1 interact with each other through the classMessenger to know the status etc(thus avoiding blocking of each other when each is busy with something else)

    similarly i create another object of another class say objclass2 and get it run asyncronously (with classmessenger and all)

    now both the class class1 and class2 run simultaneously and asyncronously ..right ......

    (now if i want to inform or get its status or ask it to cancel i do it through the classMessenger ...well this is just extra information)

    now as it is running ...
    i set the reference to objclass1 as nothing and keep the reference to objclass2 as it is...(still both threads continue to run and that is fine )
    but at the end when both objclass1 and objclass2 have finished processing it gives a error saying the active-exe (in fact the project name) has performed an illegal operation ....

    if u could help me ............thanks
    i hope i have clarified the things ........

    c u
    sudhir shetty .

  2. #2
    jim mcnamara
    Guest
    IF you created the ActiveX in VB - note:

    Threading in VB 6.0 has a known bug - it crashes the thread. It has not been fixed by any service pack of VB 6.0 It is fixed in VB.NET, however.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Location
    Mangalore ,India
    Posts
    22

    thanks .......

    thanks ...,
    but i am using vb 5....
    in my case the thread survives itself till the very end point ....
    but i guess at the end of the thread when it finds that it is not referenced by any object(i.e i have set the reference to nothing before it actually completes) may be it is crashing .....
    sudhir shetty .

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