Fixed PInvoke Warning

Fixed Code Analysis Warning CA1901: P/Invoke declarations should be
portable. Reported by wiredancer