public static T SafePInvoke<T>(
Expression<Func<T>> expr,
int successValue
)
Public Shared Function SafePInvoke(Of T) (
expr As Expression(Of Func(Of T)),
successValue As Integer
) As T
Dim expr As Expression(Of Func(Of T))
Dim successValue As Integer
Dim returnValue As T
returnValue = UtilWin32.SafePInvoke(expr,
successValue)
public:
generic<typename T>
static T SafePInvoke(
Expression<Func<T>^>^ expr,
int successValue
)
static member SafePInvoke :
expr : Expression<Func<'T>> *
successValue : int -> 'T
No code example is currently available or this language may not be supported.
[Missing <param name="successValue"/> documentation for "M:DevCase.Win32.UtilWin32.SafePInvoke``1(System.Linq.Expressions.Expression{System.Func{``0}},System.Int32)"]
No code example is currently available or this language may not be supported.
<DllImport("User32.dll", SetLastError:=True)>
Public Shared Function GetAsyncKeyState(ByVal vKey As Integer) As Short
End Function
Dim expr As Expression(Of Func(Of Short)) = Function() GetAsyncKeyState(-1) ' -1 is a invalid value.
Dim result As Short = SafePInvoke(Of Short)(expr, successValue:=0)
Console.WriteLine(result)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Win32Exception |