blob: d2dcbe0af61cc3a7ad4a7c9a77f7f2e58ea55b0f [file] [log] [blame]
hendrikwb1ac52f2015-10-01 18:29:34 -07001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
Mike Kleinc0bd9f92019-04-23 12:05:21 -05007#include "include/core/SkTypes.h"
Mike Klein8f11d4d2018-01-24 12:42:55 -05008#if defined(SK_BUILD_FOR_WIN)
mtklein1ee76512015-11-02 10:20:27 -08009
Ben Wagnerab6eefe2019-05-20 11:02:49 -040010#include "src/core/SkLeanWindows.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "src/ports/SkOSLibrary.h"
hendrikwb1ac52f2015-10-01 18:29:34 -070012
Mike Klein77482cb2020-07-10 10:43:59 -050013void* SkLoadDynamicLibrary(const char* libraryName) {
jvanverth7a897c02016-01-04 08:14:18 -080014 return LoadLibraryA(libraryName);
hendrikwb1ac52f2015-10-01 18:29:34 -070015}
16
Mike Klein77482cb2020-07-10 10:43:59 -050017void* SkGetProcedureAddress(void* library, const char* functionName) {
cjacekc7211962016-01-25 07:27:36 -080018 return reinterpret_cast<void*>(::GetProcAddress((HMODULE)library, functionName));
hendrikwb1ac52f2015-10-01 18:29:34 -070019}
mtklein1ee76512015-11-02 10:20:27 -080020
Michael Ludwig30217952020-12-04 12:58:35 -050021bool SkFreeDynamicLibrary(void* library) {
22 return FreeLibrary((HMODULE)library);
23}
24
Mike Klein8f11d4d2018-01-24 12:42:55 -050025#endif//defined(SK_BUILD_FOR_WIN)