F# syntax for P/Invoke signature using MarshalAs

后端 未结 4 787
忘了有多久
忘了有多久 2020-12-10 16:41

I\'m unsure of the syntax for this. I\'m trying to translate this C# code into F#.

struct LASTINPUTINFO
{
    public uint cbSize;
    public uint dwTime;
}
         


        
4条回答
  •  粉色の甜心
    2020-12-10 16:51

    In addition to Brian's comment, it may be worth pointing out that F# extern signatures reflect C signatures fairly faithfully, so that rather than using the [][] attributes on the reference you can probably just declare the parameter as LASTINPUTINFO* plii, and then pass a reference to a local instance using the && operator when calling the function.

提交回复
热议问题