Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Module handling.....

Module handling.....

Scheduled Pinned Locked Moved C#
question
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arish rivlin
    wrote on last edited by
    #1

    How can i kill a module without terminating its process?....

    L 1 Reply Last reply
    0
    • A Arish rivlin

      How can i kill a module without terminating its process?....

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      what do you mean by module here ? you can abort or kill a thread (not a very good idea). you cant unload a class or assembly, but you can create a new AppDomain, load it, then remove it (with everything thats in it). :)

      Luc Pattyn


      try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


      A 1 Reply Last reply
      0
      • L Luc Pattyn

        what do you mean by module here ? you can abort or kill a thread (not a very good idea). you cant unload a class or assembly, but you can create a new AppDomain, load it, then remove it (with everything thats in it). :)

        Luc Pattyn


        try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


        A Offline
        A Offline
        Arish rivlin
        wrote on last edited by
        #3

        Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.

        L K D 3 Replies Last reply
        0
        • A Arish rivlin

          Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          A thread does not belong to anything, it is a living being. It gets created by some code, that code probably sits inside an EXE or a DLL file. Tossing out the code at run-time will not achieve the result you are after. whay do you mean by shotdown: is it the app wanting to terminate by itself, is it you telling the app to terminate, or is it you telling the PC to shut down (and then the PC telling all the apps and services of this fact) ? Did you create the EXE and the DLL files, so you can change the source files (and correct whatever you did wrong in the first place, if anything) ? Things to do depend on the answers. :)

          Luc Pattyn


          try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


          1 Reply Last reply
          0
          • A Arish rivlin

            Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.

            K Offline
            K Offline
            kubben
            wrote on last edited by
            #5

            You can load that dll into its own app domain. Then you can shut down that app domain. Ben

            1 Reply Last reply
            0
            • A Arish rivlin

              Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              You can load this DLL, or whatever it is, into it's own AppDomain, but that's not going to stop it from crashing. And, it's more than likely not going to stop an error message from popping up either.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups