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. COM
  4. Releasing IDirectinputdevice interface

Releasing IDirectinputdevice interface

Scheduled Pinned Locked Moved COM
helpquestionannouncement
2 Posts 2 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.
  • M Offline
    M Offline
    Manju
    wrote on last edited by
    #1

    hi, I have a problem when releasing the IDirectInput8Device interface as below. if (m_lpdirinde8Device) { m_lpdirinde8Device->Unacquire(); m_lpdirinde8Device->Release(); m_lpdirinde8Device = NULL; } But it hangs at the release. This happens only if I create an effect on this device. Can somebody give a hint why release hangs? Thanks Manju

    J 1 Reply Last reply
    0
    • M Manju

      hi, I have a problem when releasing the IDirectInput8Device interface as below. if (m_lpdirinde8Device) { m_lpdirinde8Device->Unacquire(); m_lpdirinde8Device->Release(); m_lpdirinde8Device = NULL; } But it hangs at the release. This happens only if I create an effect on this device. Can somebody give a hint why release hangs? Thanks Manju

      J Offline
      J Offline
      JJeffrey
      wrote on last edited by
      #2

      I don't know exactaly what may have caused the Release to crash from looking at the code you listed, but the last time this happened to me was when my IUnknown:Release was called while there was a pointer still open or a memory buffer that was not closed/freed (be it a string without an end character or a Malloc-ed memory space) before the call to Release. This MAY be the problem, as it what causes a similar problem for me, but there could be other factors, like an improper declaration of the Release in your COM class declaration and so on.

      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