Scroll to navigation

SDL_LoadFunction(3) SDL3 FUNCTIONS SDL_LoadFunction(3)

NAME

SDL_LoadFunction - Look up the address of the named function in a shared object.

SYNOPSIS

#include "SDL3/SDL.h"
SDL_FunctionPointer SDL_LoadFunction(void *handle, const char *name);

DESCRIPTION

This function pointer is no longer valid after calling

SDL_UnloadObject ().

This function can only look up C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.

Make sure you declare your function pointers with the same calling convention as the actual library function. Your code will crash mysteriously if you do not do this.

If the requested function doesn't exist, NULL is returned.

FUNCTION PARAMETERS

a valid shared object handle returned by SDL_LoadObject ()
the name of the function to look up

RETURN VALUE

Returns a pointer to the function or NULL if there was an error; call

SDL_GetError () for more information.

AVAILABILITY

This function is available since SDL 3.0.0.

SEE ALSO

SDL_LoadObject(3)

SDL 3.1.0 SDL