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 / C++ / MFC
  4. Dll exception

Dll exception

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestionannouncement
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.
  • M Offline
    M Offline
    manu_2205
    wrote on last edited by
    #1

    Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell

    manu

    C H 2 Replies Last reply
    0
    • M manu_2205

      Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell

      manu

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      You should always check the returned HRESULT value, i.e.

      if (FAILED(hr)))
      {
      // report the error code so that manu_2205 can understand what happened
      }

      and never use the pointer (even the smart ones :)) if the CreateInstance failed.

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      1 Reply Last reply
      0
      • M manu_2205

        Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell

        manu

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Whats return value of hr?


        WhiteSky


        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