Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 817561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:00:45+00:00 2026-05-15T02:00:45+00:00

I’m trying to read a PDB file into a C# application. When I call

  • 0

I’m trying to read a PDB file into a C# application. When I call loadDataFromPdb or loadAndValidateDataFromPdb with a file that I know exists, I get an HRESULT of 0x806D0005. Unfortunately, I have no idea what that means. I have the list of possible results [here](http://msdn.microsoft.com/en-us/library/2008hf0e(v=VS.80).aspx) but I’m afraid I can’t conclusively determine the problem.

Does anybody know what I’m doing wrong? Or at least a method of checking what that corresponds to?

Exception: System.Runtime.InteropServices.COMException (0x806D0005): Exception from HRESULT: 0x806D0005
at Dia2Lib.DiaSourceClass.loadDataFromPdb(String pdbPath)

Code Sample:

public static void LoadSymbolsForModule(uint baseAddress, uint size, uint timeStamp, DM_PDB_SIGNATURE signature)
{
    IDiaDataSource m_source = new DiaSourceClass();
    //m_source.loadAndValidateDataFromPdb(signature.path, ref signature.guid, 0, signature.age);
    m_source.loadDataFromPdb(signature.path);
    IDiaSession m_session;
    m_source.openSession(out m_session);
    m_session.loadAddress = baseAddress;
    modules.Add(new Module(baseAddress, size, m_session));
}

Thanks in advance, guys. This problem has been killing me all day.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:00:46+00:00Added an answer on May 15, 2026 at 2:00 am

    Searching for the E_PDB_NOT_FOUND const turned up the source code on google code of dia2.h, which confirmed that 0x806D0005 is E_PDB_NOT_FOUND.

    E_PDB_OK            = ( HRESULT  )(( ( ( ( unsigned long  )1 << 31 )  | ( ( unsigned long  )( LONG  )0x6d << 16 )  )  | ( unsigned long  )1 ) ),
    E_PDB_USAGE         = ( E_PDB_OK + 1 ) ,
    E_PDB_OUT_OF_MEMORY = ( E_PDB_USAGE + 1 ) ,
    E_PDB_FILE_SYSTEM   = ( E_PDB_OUT_OF_MEMORY + 1 ) ,
    E_PDB_NOT_FOUND     = ( E_PDB_FILE_SYSTEM + 1 ) ,
    

    Note that the signature of the function you’re using takes a LPCOLESTR, which is a unicode string. Make sure you’re marshaling your string correctly in your interface declaration, ie:

    Int32 loadDataFromPdb ( [MarshalAs(UnmanagedType.LPWStr)] string pdbPath );
    

    The msdn documentation also implies that if the file exists, that error will be returned if it “determined that the file has an invalid format”. I doubt this is the actual problem, but if you’re generating that pdb file in some non-standard way, the problem could be the pdb file itself.

    Searching for the hresult and E_PDB_NOT_FOUND found someone that encountered the same problem. It seemed that their problem was due to resource consumption, ie too many pdbs being loaded or not being released properly. Other search results for that hresult and that error name seem to support the possibility that this error is being thrown for other failures to load the pdb, such as pdbs being too large.

    Hopefully this helps a bit. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.