public int GetSymbolCount(ulong dllBase, int typeIndex) { int value = -1; Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Count, out value); return(value); }
public unsafe Variant GetSymbolValue(ulong dllBase, int typeIndex) { var value = new Variant(); Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Value, out value); return(value); }
public unsafe SymbolTag GetSymbolTag(ulong dllBase, int typeIndex) { var tag = SymbolTag.Null; Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Tag, out tag); return(tag); }
public int GetSymbolBitPosition(ulong dllBase, int typeIndex) { if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.BitPosition, out int value)) { return(value); } return(-1); }
public UdtKind GetSymbolUdtKind(ulong dllBase, int typeIndex) { if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.UdtKind, out int value)) { return((UdtKind)value); } return(UdtKind.Unknown); }
public unsafe string GetTypeInfoName(ulong dllBase, int typeIndex) { if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Name, out char *name)) { var strName = new string(name); Marshal.FreeCoTaskMem(new IntPtr(name)); return(strName); } return(null); }
public unsafe StructDescriptor BuildStructDescriptor(ulong dllBase, int typeIndex) { if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.ChildrenCount, out int childrenCount)) { var structDesc = new StructDescriptor(childrenCount); if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Length, out ulong size)) { structDesc.Length = (int)size; } var childrenParams = new FindChildrenParams { Count = childrenCount }; structDesc.Length = (int)size; if (Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.FindChildren, ref childrenParams)) { for (var i = 0; i < childrenParams.Count; i++) { var sym = SymbolInfo.Create(); var child = childrenParams.Child[i]; if (GetSymbolFromIndex(dllBase, child, ref sym)) { if (Win32.SymGetTypeInfo(_hProcess, dllBase, child, SymbolTypeInfo.Offset, out int offset) && Win32.SymGetTypeInfo(_hProcess, dllBase, child, SymbolTypeInfo.Tag, out SymbolTag tag)) { sym.Tag = tag; sym.TypeIndex = child; var member = new StructMember(sym, offset); structDesc.AddMember(member); } else if (Win32.SymGetTypeInfo(_hProcess, dllBase, child, SymbolTypeInfo.Value, out Variant value)) { sym.Tag = SymbolTag.Enum; sym.Value = value.lValue; sym.TypeIndex = child; var member = new StructMember(sym, 0); switch (sym.Size) { case 8: member.Value = value.lValue; break; case 2: member.Value = value.sValue; break; case 1: member.Value = value.bValue; break; default: member.Value = value.iValue; break; } structDesc.AddMember(member); } } } } return(structDesc); } return(null); }
public int GetSymbolChildrenCount(ulong dllBase, int typeIndex) { bool success = Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.ChildrenCount, out int value); return(value); }
public BasicType GetSymbolBaseType(ulong dllBase, int typeIndex) { bool success = Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.BaseType, out int value); return((BasicType)value); }
public int GetSymbolAddressOffset(ulong dllBase, int typeIndex) { bool success = Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.AddressOffset, out int value); return(value); }
public int GetSymbolType(ulong dllBase, int typeIndex) { Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Type, out int value); return(value); }
public ulong GetSymbolLength(ulong dllBase, int typeIndex) { Win32.SymGetTypeInfo(_hProcess, dllBase, typeIndex, SymbolTypeInfo.Length, out ulong value); return(value); }