Exemplo n.º 1
0
        void HandleOpenFile(string path)
        {
            SYMSRV_INDEX_INFO info = new SYMSRV_INDEX_INFO();

            info.sizeofstruct = Marshal.SizeOf(info);
            if (!SymSrvGetFileIndexInfoW(path, ref info, 0))
            {
                return;
            }

            if (String.IsNullOrEmpty(info.pdbfile) || info.pdbfile.Contains(":"))
            {
                return;
            }

            string cab = info.pdbfile.Replace(".pdb", ".pd_");

            string PdbPath = String.Format("{0}\\{1}\\{2}{3}\\{4}",
                                           m_SymbolDir, info.pdbfile, info.guid.ToString("N").ToUpper(), info.age.ToString("X"), info.pdbfile);

            string DownloadUrl = String.Format("http://msdl.microsoft.com/download/symbols/{0}/{1}{2}/{3}",
                                               info.pdbfile, info.guid.ToString("N").ToUpper(), info.age.ToString("X"), cab);

            PdbItem item = new PdbItem(path, PdbPath, DownloadUrl, 0);

            m_Items.Add(item);
        }
Exemplo n.º 2
0
 static extern bool SymSrvGetFileIndexInfoW(String file, ref SYMSRV_INDEX_INFO info, uint flags);