Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/01/20 in all areas

  1. Mahdi Safsafi

    Translation of C headers.

    Those are not stored inside vtable ... you need to skip them(don't declare them). Exactly! That's my bad man ... I'm a little bit bad at explaining since I'm not a native English speaker. First step, add all methods in the order they declared(skip all overloaded versions but keep the original). second step for each added method "A" add just after it "A" all its overloaded versions in the order they declared too. Here is how your vtable looks like.
  2. Mahdi Safsafi

    Translation of C headers.

    @pyscripter I believe you're wrong on $78 ! its for an overloaded GetAttributeValue function (not SetAttributeValue). So your code is calling an overloaded version of GetAttributeValue instead of SetAttributeValue.
  3. Attila Kovacs

    Translation of C headers.

    btw. in the header and also on the screenshot from Mahdi the first parameters are PCWSTR (LPCWSTR) (const) and not always PWSTR (LPWSTR). this however makes no difference, at least at the moment, as they are defined the same in delphi
  4. Attila Kovacs

    Translation of C headers.

    opacity : single := 0.5; Element.SetAttributeValue('opacity', D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, @opacity, SizeOf(opacity)); where element = 'svg' if this was the question
  5. Mahdi Safsafi

    Translation of C headers.

    Not IDA ... its x64dbg 🙂
  6. Mahdi Safsafi

    Translation of C headers.

    Basically vtable respects the order in which functions are declared. But here the overloading is tweaking. Try to respect both the order and overloading name. The below code should demonstrate what I mean. // SetAttributeValue declared first ... we put it first function SetAttributeValue(name: LPWSTR; _type: D2D1_SVG_ATTRIBUTE_STRING_TYPE; value: LPWSTR): HResult; overload; stdcall; // then we put all overloaded methods SetAttributeValue but in the order they were declared: function SetAttributeValue(name: LPWSTR; _type: D2D1_SVG_ATTRIBUTE_POD_TYPE; value: Pointer; valueSizeInBytes: UINT32): HResult; overload; stdcall; // SetAttributeValue2 function SetAttributeValue(name: LPWSTR; value: ID2D1SvgAttribute): HResult; overload; stdcall; // SetAttributeValue3 // GetAttributeValue comes after SetAttributeValue: function GetAttributeValue(name: LPWSTR; _type: D2D1_SVG_ATTRIBUTE_STRING_TYPE; out value: PWideChar; valueCount: UINT32): HResult; overload; stdcall; // overloaded2 first and then overloaded3 function GetAttributeValue(name: LPWSTR; _type: D2D1_SVG_ATTRIBUTE_POD_TYPE; value: Pointer; valueSizeInBytes: UINT32): HResult; overload; stdcall; // overloaded2 function GetAttributeValue(name: LPWSTR; const riid: TGUID; var value: Pointer): HResult; overload; stdcall; // overloaded3 PS: I got the smile SVG 🙂
  7. Attila Kovacs

    Translation of C headers.

    As I first mentioned the in the AV reading address 0x00000001, the "1" is the parameter D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR. Change it to D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE and you will get AV reading address 0x00000002. So I thought that the wrong "SetAttributeValue" is called, so I changed the order of the "SetAttributeValue"'s => swapped the last two. But as I can't see any changes in the image and @Mahdi Safsafi showed in IDA that this is a completely different call, I'm not sure what is going on. But it's a good start for you to sort it out.
  8. Attila Kovacs

    Translation of C headers.

    looks like I'm being ignored here. change the order of the last 2 SetAttributeValue()'s in the interface, no AV but I can't see any changes, maybe you would know why and see if it helps.
  9. As for backups with git you can use a cloud repo in addition to any local ones to give you extra redundancy.
×