SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_LoadFunction

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

Header File

Defined in SDL_loadso.h

Syntax

void* SDL_LoadFunction(void *handle,
                       const char *name);

Function Parameters

void * handle a valid shared object handle returned by SDL_LoadObject().
const char * name the name of the function to look up.

Return Value

(void *) Returns a pointer to the function or NULL if there was an error; call SDL_GetError() for more information.

Remarks

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.

Version

This function is available since SDL 2.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryLoadSO


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.