On Sat, Oct 31, 2020 at 5:46 PM aihui zhu <
mr.z...@gmail.com> wrote:
>
> for example:
>
> void D2D1MakeRotateMatrix(
> FLOAT angle,
> D2D1_POINT_2F center,
> D2D1_MATRIX_3X2_F *matrix
> );
> and a COM based function: D2D1_SIZE_F ID2D1Bitmap_GetSize();
Based on reading
https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention I
think the right way to call this will be to define a variable of type
D2D1MakeRotateMatrix and then pass the address of that variable as the
argument to Bitmap_GetSize. But I haven't tried this or anything.
A simple approach would be to use cgo.
Ian
> On Saturday, October 31, 2020 at 11:40:59 PM UTC+8, Ian Lance Taylor wrote:
>>
>> On Sat, Oct 31, 2020 at 2:52 AM aihui zhu <
mr....@gmail.com> wrote:
>> >
>> > the syscall.Syscall function accept/return only uintptr, how should i deal with structure?
>> >
>> > i'm asking this question is because that i want to avoid CGo and use pure Go in my module.
>>
>> What Windows function do you want to call, and what is the structure type?
>>
>> Ian
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/eebb0188-fea8-4aba-8e6b-296e41b0da8co%40googlegroups.com.