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.

    @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.
  2. 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.
  3. 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 🙂
  4. 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
  5. 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
  6. Mahdi Safsafi

    Translation of C headers.

    Not IDA ... its x64dbg 🙂
  7. Kas Ob.

    Translation of C headers.

    This is the right order as Mahdi shown and this will recolor and get the Paint item right, @Attila Kovacs your last file still reversed.
  8. Kas Ob.

    Translation of C headers.

    OK, i giving up on this. And that exactly what you should do. I count them 10 times, the count is 30 and when i ran out of fingers and toes, i draw 10 fingers on my table and used them, this should not be happening and i am lost here ! the parent ID2D1Resource does have only one function and it is coming form IUknown, so please when you figure it out i want.., no , i have to know to able to sleep tonight.
  9. 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.
  10. 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.
  11. As for backups with git you can use a cloud repo in addition to any local ones to give you extra redundancy.
×