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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CoInitializeEx Problem

CoInitializeEx Problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++comdebugginghelpannouncement
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.
  • R Offline
    R Offline
    Raj Prathap
    wrote on last edited by
    #1

    Hi all, I'm facing the problem with the CoInitializeEx. I have a COM dll, when the dll is built in the debug mode, and from the client if I debug "User break point called" message box pops up. The important fact is, the message box pops in a very rare conditions. I have tested several hundred times in the release mode, but never the problem is faced. Problem comes only if the DLL is in debug mode. My dll uses other two DLLS(win32) all(INCLUDING THE COM DLL) uses MFC. Please let me know the root cause of the problem. Thanks in advance, Raja Pratap

    R 1 Reply Last reply
    0
    • R Raj Prathap

      Hi all, I'm facing the problem with the CoInitializeEx. I have a COM dll, when the dll is built in the debug mode, and from the client if I debug "User break point called" message box pops up. The important fact is, the message box pops in a very rare conditions. I have tested several hundred times in the release mode, but never the problem is faced. Problem comes only if the DLL is in debug mode. My dll uses other two DLLS(win32) all(INCLUDING THE COM DLL) uses MFC. Please let me know the root cause of the problem. Thanks in advance, Raja Pratap

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      1. The reason why the message box doesn't pop up when you're building for release is probably that it is generated from an ASSERT and the ASSERT macro is disabled when building for release. 2. If you mix a debug-built DLL with a release-built application and you allocate memory in one of them and deallocates it in the other, you will get into troubles. Not only because it is suspect design, but because the memory checking gets screwed up when it checks for boundaries and how much is allocated for each block. 3. Make sure you're linking with the debug-built libraries when building for debug. 4. If none of the above applies to your situation, post again and describe your problem some more. It would be of great help to know where your application crashes and what the call stack looks like at that point. -- Roger


      "It's supposed to be hard, otherwise anybody could do it!" - selfquote

      "No one remembers a coward!" - Jan Elfström 1998
      "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above

      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