c++ code
Code: Select all
STDMETHOD_(void, DrawLine)(
ID2D1RenderTarget *This,
D2D1_POINT_2F point0, ;<-- problem is here, my params don't seem to work in 64bit, but work in 32bit
D2D1_POINT_2F point1,
__in ID2D1Brush *brush,
FLOAT strokeWidth,
__in_opt ID2D1StrokeStyle *strokeStyle
) PURE;
Code: Select all
dllcall(this.vTable(this.renderTarget,15)
,"Ptr",this.renderTarget
,"float",x1,"float",y1 ;D2D1_POINT_2F point0
,"float",x2,"float",y2 ;D2D1_POINT_2F point1
,"ptr",this.brush
,"float",thickness
,"ptr",this.stroke)
My problem is that in 64bit specifying the parameters that way causes the call to fail, but when I call it like below, it does indeed draw a line from 50,0 to 150,0 ..... This made me think it was looking for a pointer to a D2D1_POINT_2F structure since the param count seemed to be correct, but creating 2 D2D1_POINT_2F structures and passing the pointers "ptr",&struct1,"ptr",&struct2 did not work
Code: Select all
dllcall(this.vTable(this.renderTarget,15)
,"Ptr",this.renderTarget
,"float",50 ;using only 2 floats does draw a line, but without y coordinates
,"float",150 ;so the line is from 50,0 to 150,0, so it seems like the correct amount of params...
,"ptr",this.brush
,"float",thickness
,"ptr",this.stroke)