Content deleted Content added
ClueBot NG (talk | contribs) m Reverting possible vandalism by 72.136.107.145 to version by Guy Harris. Report False Positive? Thanks, ClueBot NG. (4415148) (Bot) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 56:
<syntaxhighlight lang="c">
void* sdl_library = dlopen("libSDL.so", RTLD_LAZY);
if (!sdl_library
// report error ...
} else {
Line 68:
<syntaxhighlight lang="c">
void* sdl_library = dlopen("libSDL.dylib", RTLD_LAZY);
if (!sdl_library
// report error ...
} else {
Line 79:
<syntaxhighlight lang="c">
void* sdl_library = dlopen("/Library/Frameworks/SDL.framework/SDL", RTLD_LAZY);
if (!sdl_library
// report error ...
} else {
Line 104:
<syntaxhighlight lang="c">
HMODULE sdl_library = LoadLibrary(TEXT("SDL.dll"));
if (!sdl_library
// report error ...
} else {
Line 117:
<syntaxhighlight lang="c">
void* initializer = dlsym(sdl_library, "SDL_Init");
if (!initializer
// report error ...
} else {
Line 138:
====Windows====
<syntaxhighlight lang="c">
FARPROC initializer = GetProcAddress(sdl_library, "SDL_Init");
if (!initializer
// report error ...
} else {
Line 175:
<syntaxhighlight lang="c">
typedef void (*sdl_init_function_type)(void);
union { sdl_init_function_type func; void
alias.obj = initializer;
sdl_init_function_type init_func = alias.func;
Line 213:
====Unix-like operating systems (Solaris, Linux, *BSD, macOS, etc.)====
<syntaxhighlight lang="c">
void* this_process = dlopen(NULL, 0);
</syntaxhighlight>
Line 221:
HMODULE this_process_again;
GetModuleHandleEx(0, 0, &this_process_again);
</syntaxhighlight>
|