internal static bool PDBOpenDBI(PdbPtr ppdb, string szMode, string szTarget, out DbiPtr ppdbi) { szMode += '\0'; szTarget += '\0'; fixed(byte *mb = Encoding.UTF8.GetBytes(szMode)) fixed(byte *tb = Encoding.UTF8.GetBytes(szTarget)) return(PDBOpenDBI(ppdb, mb, tb, out ppdbi)); }
internal static extern bool PDBOpenDBI(PdbPtr ppdb, byte *szMode, byte *szTarget, out DbiPtr ppdbi);
internal static extern bool PDBCommit(PdbPtr ppdb);
internal static extern bool PDBOpen2W(char *wszPDB, byte *szMode, out PDBErrors pec, char *wszError, nuint cchErrMax, out PdbPtr pppdb);
internal static bool PDBOpen2W(string wszPDB, string szMode, out PDBErrors pec, out string error, out PdbPtr pppdb) { wszPDB += '\0'; szMode += '\0'; var chars = wszPDB.ToCharArray(); var bytes = Encoding.UTF8.GetBytes(szMode); var errorChars = new char[2048]; bool result = false; fixed(char *cp = chars) fixed(byte *bp = bytes) fixed(char *ep = errorChars) result = PDBOpen2W(cp, bp, out pec, ep, (nuint)errorChars.Length, out pppdb); var firstZero = Array.IndexOf(errorChars, '\0'); error = new string(errorChars, 0, firstZero); return(result); }
internal static extern uint PDBQueryAge(PdbPtr ppdb);
internal static extern bool PDBQuerySignature2(PdbPtr ppdb, out Guid guid);
internal static extern bool PDBClose(PdbPtr ppdb);