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. Help! Release the COM Pointer

Help! Release the COM Pointer

Scheduled Pinned Locked Moved C#
comcsharpsysadmintestingtools
3 Posts 3 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.
  • S Offline
    S Offline
    sning
    wrote on last edited by
    #1

    Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.

    J S 2 Replies Last reply
    0
    • S sning

      Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.

      J Offline
      J Offline
      Jarrod Marshall
      wrote on last edited by
      #2

      Try Marshal.ReleaseComObject()

      1 Reply Last reply
      0
      • S sning

        Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.

        S Offline
        S Offline
        Stephane Rodriguez
        wrote on last edited by
        #3

        A lot of exe COM servers expose a fvapp.Quit method. If that's not enough, try sending the WM_QUIT message.

        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