DynaCall Parameter position adjustment

Ask for help, how to use AHK_H, etc.
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

DynaCall Parameter position adjustment

07 Sep 2017, 09:25

I encountered a problem when wrapping D2D1, this function can not adjust the parameter position.

Its DllCall way is this: (where this.ptr is a fixed constant.)

Code: [Select all] [Download] GeSHi © Codebox Plus

         CreateSolidColorBrush(color, brushProperties, Byref solidColorBrush)
         {
                 return DllCall (NumGet (this.vt + 8 * A_PtrSize), "ptr", this.ptr, "ptr", color, "ptr", brushProperties, "ptr *", solidColorBrush)
         }

But I wrap it like this, both ways are invalid:

Code: [Select all] [Download] GeSHi © Codebox Plus

this.CreateSolidColorBrush:=DynaCall(NumGet(vt+8*A_PtrSize),["tttt*",2],this.ptr)
this.CreateSolidColorBrush:=DynaCall(NumGet(vt+8*A_PtrSize),"tttt*",this.ptr)
normal: oRenderTarget.CreateSolidColorBrush[pRenderTarget,&tD2D1_COLOR_F,&tD2D1_BRUSH_PROPERTIES,pBrush]
error: oRenderTarget.CreateSolidColorBrush[&tD2D1_COLOR_F,&tD2D1_BRUSH_PROPERTIES,pBrush]



Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

HotKeyIt
Posts: 1536
Joined: 29 Sep 2013, 18:35
Contact:

Re: DynaCall Parameter position adjustment

07 Sep 2017, 15:40

When I run your code I get an error for CreateHwndRenderTarget: https://social.msdn.microsoft.com/Forum ... evelopment

As far as I understand what you want is ["tttt*",2,3,4], otherwise you get ["tttt*",2,1,3,4].
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

Re: DynaCall Parameter position adjustment

08 Sep 2017, 09:05

This is a bit strange because I can run the test code normally. (win10-64 h2-32)
thanks.
HotKeyIt
Posts: 1536
Joined: 29 Sep 2013, 18:35
Contact:

Re: DynaCall Parameter position adjustment

08 Sep 2017, 15:05

Ahh, I run it in 64, 32 works fine :)

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 2 guests