# OpcFileGetPositionMethodNode.FileGetPositionExCallback Delegate

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

GetPosition is used to provide the current position of the file handle.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public delegate ulong OpcFileGetPositionMethodNode.FileGetPositionExCallback(
    OpcMethodContext context,
    uint fileHandle)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
<CLSCompliant(False)>
Public Delegate Function OpcFileGetPositionMethodNode.FileGetPositionExCallback(
    context As OpcMethodContext,
    fileHandle As UInteger) As ULong
```

</div>

## Parameters

| Name | Type | Description |
|---|---|---|
| `context` | [OpcMethodContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcontext/) | The [OpcMethodContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcontext/) to use when querying the position in the file. This instance will be also updated with the outcome of the method call. |
| `fileHandle` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | A file handle indicating the access request and thus indirectly the position inside the file. |

## Returns

[UInt64](https://learn.microsoft.com/dotnet/api/system.uint64)

The position of the file handle in the file. If a Read or Write is called it starts at that position.

## Remarks

This method does provide the following [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) information:

- [BadInvalidArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badinvalidargument)The file handle specified by `fileHandle` or the [SessionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members#sessionid) is not known.
- [BadUnexpectedError](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badunexpectederror)An unexpected error occurred while querying the position in the file.

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
