F# syntax for P/Invoke signature using MarshalAs

后端 未结 4 785
忘了有多久
忘了有多久 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:59

    Honestly I haven't tried to run or use this, but this compiles, and hopefully will steer you in the right direction.

    open System
    open System.Runtime.InteropServices 
    
    []
    type LASTINPUTINFO = 
        val cbSize : UInt32
        val dwTime : UInt32
    
    module IdleTimer =
        []
        extern [] bool GetLastInputInfo([][] LASTINPUTINFO plii)
    

提交回复
热议问题