ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.JavaScript
IArrayBuffer Interface
IArrayBuffer Methods
InvokeWithDirectAccess Method
InvokeWithDirectAccess(Action<IntPtr>) Method
InvokeWithDirectAccess<TResult>(Func<IntPtr, TResult>) Method
InvokeWithDirectAccess<TArg>(Action<IntPtr, TArg>, TArg) Method
InvokeWithDirectAccess<TArg, TResult>(Func<IntPtr, TArg, TResult>, TArg) Method

# IArrayBufferInvokeWithDirectAccess TResult(FuncIntPtr, TResult) Method

Invokes a delegate that returns a value, giving it direct access to the ArrayBuffer's contents.
Namespace: Microsoft.ClearScript.JavaScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    TResult InvokeWithDirectAccess<TResult>(
    	Func<IntPtr, TResult> func
    )

    Function InvokeWithDirectAccess(Of TResult) (
    	func As Func(Of IntPtr, TResult)
    ) As TResult

    generic<typename TResult>
    TResult InvokeWithDirectAccess(
    	Func<IntPtr, TResult>^ func
    )

    abstract InvokeWithDirectAccess :
            func : Func<IntPtr, 'TResult> -> 'TResult

#### Parameters

func Func IntPtr, TResult
  The delegate to invoke.

#### Type Parameters

TResult
  The delegate's return type.

#### Return Value

TResult
The delegate's return value.
Remarks
This method invokes the specified delegate, passing in the memory address of the ArrayBuffer's contents. This memory address is valid only while the delegate is executing. The delegate must not access memory outside the ArrayBuffer's range.
See Also

#### Reference

IArrayBuffer Interface
InvokeWithDirectAccess Overload
Microsoft.ClearScript.JavaScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft