xcurl_global_init_mem

Initializes XCurl with custom memory allocators.

Syntax

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
)

Parameters

flags   _In_
Type: long

This parameter is ignored by XCurl.

m   _In_
Type: xcurl_alloc_memory_callback*

malloc() replacement

f   _In_
Type: xcurl_free_memory_callback*

free() replacement

r   _In_
Type: xcurl_realloc_memory_callback*

realloc() replacement

s   _In_
Type: curl_strdup_callback*

strdup() replacement

c   _In_
Type: xcurl_calloc_memory_callback*

calloc() replacement

Return value

If this function returns a non-zero value, then something went wrong and you cannot use the other curl functions.

Remarks

This function is identical to curl_global_init_mem, except that this version initializes XCurl with custom memory allocators.

XCurl relies on the Gaming Runtime, and therefore cannot be initialized until after you run XGameRuntimeInitialize.

Wherever you would have included curl.h in your game code, you must replace it with xcurl.h.

Requirements

Header: XCurl.h

Library: xcurl.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XCurl Overview
HTTP and Web Sockets
curl
xcurl_global_suspend
xcurl_global_resume