Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 18, 2020

Since there is no real equivalent to size_t in .NET, I hesitated to add it.
The uintptr_t can be used and mapped to size_t if required, however.

I'm not entirely sure if I got everything, as there seems to be a lot of code relating to data types all over the place, but it seems to work for me.

If anything needs to be changed to get this merged in, just let me know and I'll fix it.

There is no real equivalent to size_t in .NET, so I hesitated to add it.
The uintptr_t can be used and mapped to size_t if required, however.
@ghost
Copy link
Author

ghost commented Jan 18, 2020

Mmm, seems like there's a minor bug. Hold off on merging until I can fix it (it's not displaying hexadecimal correctly, it shows 0x{base10} instead of base16. Seems to be an issue with the IntPtr/UIntPtr types themselves, they don't format nicely to strings like other integer types do.

@ghost
Copy link
Author

ghost commented Jan 18, 2020

Fixed, IntPtr has its own ToString(string) method which can take a format specifier, but UIntPtr does not, so I convert it to UInt32 or UInt64 to format it, depending on if RECLASSNET64 is defined. Seemed the most straight forward solution. I was also using the wrong macro name before, oops!

case UInt64Node node:
comparer = new LongMemoryComparer(ScanCompareType.Equal, (long)node.ReadValueFromMemory(selectedNode.Memory), 0);
break;
case UIntPtrNode node:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not correct? If you have a x86 process it should be an IntegerMemoryComparer and not the 64bit LongMemoryComparer.

public class CppTypeMapping
{
public string TypeBool { get; set; } = "bool";
public string TypeSize { get; set; } = "size_t";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type is never used.

@ghost ghost closed this May 8, 2020
@KN4CK3R
Copy link
Member

KN4CK3R commented May 9, 2020

Why did you close this PR?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant