> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFCloudScriptExecuteFunctionGetResult

> Gets the result of a successful PFCloudScriptExecuteFunctionAsync call.

Gets the result of a successful PFCloudScriptExecuteFunctionAsync call.

## Syntax

```cpp theme={null}
HRESULT PFCloudScriptExecuteFunctionGetResult(  
    XAsyncBlock* async,  
    size_t bufferSize,  
    void* buffer,  
    PFCloudScriptExecuteFunctionResult** result,  
    size_t* bufferUsed  
)  
```

### Parameters

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

**`bufferSize`**   size\_t

The size of the buffer for the result object.

**`buffer`**   void\*<br />\**Out\_writes\_bytes\_to*(bufferSize,*bufferUsed)*

Byte buffer used for the result value and its fields.

**`result`**   [PFCloudScriptExecuteFunctionResult\*\*](/services/playfab/api-references/c/pfcloudscripttypes/structs/pfcloudscriptexecutefunctionresult)<br />*library-allocated output*

Pointer to the result object.

**`bufferUsed`**   size\_t\*<br />*optional output*

The number of bytes in the provided buffer that were used.

### Return value

Type: HRESULT

Result code for this API operation. If the service call is unsuccessful, the result will be E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_ARGUMENT\_SIZE\_EXCEEDED, E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_EVENT\_HUB\_REQUEST\_ERROR, E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_EXECUTION\_TIME\_LIMIT\_EXCEEDED, E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_HTTP\_REQUEST\_ERROR, E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_QUEUE\_REQUEST\_ERROR, E\_PF\_CLOUD\_SCRIPT\_AZURE\_FUNCTIONS\_RETURN\_SIZE\_EXCEEDED, E\_PF\_INVALID\_ENTITY\_TYPE or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Remarks

result is a pointer within buffer and does not need to be freed separately.

## Requirements

**Header:** PFCloudScript.h

## See also

[PFCloudScript members](/services/playfab/api-references/c/pfcloudscript/pfcloudscript_members)


## Related topics

- [PFCloudScriptExecuteFunctionAsync](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptexecutefunctionasync.md)
- [Services C API overview - PFCloudScript.h](/services/playfab/api-references/c/pfcloudscript/pfcloudscript_members.md)
- [PFCloudScriptExecuteFunctionGetResultSize](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptexecutefunctiongetresultsize.md)
- [PFCloudScriptServerExecuteCloudScriptGetResult](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptserverexecutecloudscriptgetresult.md)
- [PFCloudScriptClientExecuteCloudScriptGetResult](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptclientexecutecloudscriptgetresult.md)
