> ## 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.

# xcurl_global_init_mem

> xcurl_global_init_mem

# xcurl\_global\_init\_mem

Inicializa o XCurl com alocadores de memória personalizados.

<a id="syntaxSection" />

## Sintaxe

```cpp theme={null}
CURL_EXTERN CURLcode xcurl_global_init_mem(long flags,
    xcurl_alloc_memory_callback m,
    xcurl_free_memory_callback f,
    xcurl_realloc_memory_callback r,
    curl_strdup_callback s,
    xcurl_calloc_memory_callback c
)
```

<a id="parametersSection" />

### Parâmetros

*flags*   \_In\_\
Tipo: long

Este parâmetro é ignorado pelo XCurl.

*m*   \_In\_\
Tipo: xcurl\_alloc\_memory\_callback\*

Substituto de malloc()

*f*   \_In\_\
Tipo: xcurl\_free\_memory\_callback\*

Substituto de free()

*r*   \_In\_\
Tipo: xcurl\_realloc\_memory\_callback\*

Substituto de realloc()

*s*   \_In\_\
Tipo: curl\_strdup\_callback\*

Substituto de strdup()

*c*   \_In\_\
Tipo: xcurl\_calloc\_memory\_callback\*

Substituto de calloc()

<a id="retvalSection" />

### Valor retornado

Se esta função retornar um valor diferente de zero, algo deu errado e você não poderá usar as outras funções do curl.

<a id="remarksSection" />

## Comentários

Esta função é idêntica a [curl\_global\_init\_mem](https://curl.haxx.se/libcurl/c/curl_global_init_mem.html), exceto pelo fato de que esta versão inicializa o XCurl com alocadores de memória personalizados.

O XCurl depende do Gaming Runtime e, portanto, não pode ser inicializado antes de você executar [XGameRuntimeInitialize](/pt-BR/reference/system/xgameruntimeinit/functions/xgameruntimeuninitialize).

Onde quer que você incluiria `curl.h` no código do seu jogo, é necessário substituí-lo por `xcurl.h`.

<a id="requirementsSection" />

## Requisitos

**Cabeçalho:** XCurl.h

**Biblioteca:** xcurl.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

<a id="seealsoSection" />

## Confira também

[Visão geral do XCurl](/pt-BR/build/console-features/networking/web-requests/intro-xcurl)\
[HTTP e Web Sockets](/pt-BR/build/console-features/networking/web-requests/http-networking)\
[curl](https://curl.se/)\
[xcurl\_global\_suspend](/pt-BR/reference/networking/xcurl/functions/xcurl_global_suspend)\
[xcurl\_global\_resume](/pt-BR/reference/networking/xcurl/functions/xcurl_global_resume)


## Related topics

- [xcurl_global_init_mem](/reference/networking/xcurl/functions/xcurl_global_init_mem.md)
- [xCurl overview](/build/console-features/networking/web-requests/intro-xcurl.md)
- [xCurl 概述](/zh-CN/build/console-features/networking/web-requests/intro-xcurl.md)
- [xCurl 개요](/ko/build/console-features/networking/web-requests/intro-xcurl.md)
- [Información general de xCurl](/es/build/console-features/networking/web-requests/intro-xcurl.md)
